Class: Fnf::Client
- Inherits:
-
Object
- Object
- Fnf::Client
- Defined in:
- lib/fnf/client.rb
Instance Attribute Summary collapse
-
#params ⇒ Object
Returns the value of attribute params.
-
#url ⇒ Object
Returns the value of attribute url.
-
#verb ⇒ Object
Returns the value of attribute verb.
Class Method Summary collapse
Instance Attribute Details
#params ⇒ Object
Returns the value of attribute params.
5 6 7 |
# File 'lib/fnf/client.rb', line 5 def params @params end |
#url ⇒ Object
Returns the value of attribute url.
5 6 7 |
# File 'lib/fnf/client.rb', line 5 def url @url end |
#verb ⇒ Object
Returns the value of attribute verb.
5 6 7 |
# File 'lib/fnf/client.rb', line 5 def verb @verb end |
Class Method Details
.get_verb(hsh) ⇒ Object
15 16 17 18 19 |
# File 'lib/fnf/client.rb', line 15 def self.get_verb(hsh) [:delete, :get, :post, :put, :head].each do |verb| return verb if hsh[verb] end end |
.queue(hsh) ⇒ Object
7 8 9 10 11 12 |
# File 'lib/fnf/client.rb', line 7 def self.queue(hsh) verb = get_verb(hsh) url = hsh[verb] params = hsh[:params] FifoWriter.write_to_fifo "#{[verb,url,params].to_msgpack}\n" end |