Class: Factual::Multi
- Inherits:
-
Object
- Object
- Factual::Multi
- Defined in:
- lib/factual/multi.rb
Instance Attribute Summary collapse
-
#action ⇒ Object
readonly
Returns the value of attribute action.
-
#params ⇒ Object
readonly
Returns the value of attribute params.
-
#path ⇒ Object
readonly
Returns the value of attribute path.
Instance Method Summary collapse
-
#initialize(api, queries) ⇒ Multi
constructor
A new instance of Multi.
- #send ⇒ Object
Constructor Details
#initialize(api, queries) ⇒ Multi
Returns a new instance of Multi.
5 6 7 8 9 10 11 12 13 14 |
# File 'lib/factual/multi.rb', line 5 def initialize(api, queries) @api = api @queries = queries @action = nil @path = :multi @params = queries_param @responses = {} end |
Instance Attribute Details
#action ⇒ Object (readonly)
Returns the value of attribute action.
3 4 5 |
# File 'lib/factual/multi.rb', line 3 def action @action end |
#params ⇒ Object (readonly)
Returns the value of attribute params.
3 4 5 |
# File 'lib/factual/multi.rb', line 3 def params @params end |
#path ⇒ Object (readonly)
Returns the value of attribute path.
3 4 5 |
# File 'lib/factual/multi.rb', line 3 def path @path end |
Instance Method Details
#send ⇒ Object
16 17 18 19 20 21 22 23 24 |
# File 'lib/factual/multi.rb', line 16 def send res = @api.get(self) @queries.each do |name, query| query.populate(res[name]) @responses[name] = query end @responses end |