Class: Mailjet::CollectionProxy
- Inherits:
-
Object
- Object
- Mailjet::CollectionProxy
- Defined in:
- lib/mailjet/collection_proxy.rb
Instance Attribute Summary collapse
-
#count ⇒ Object
Returns the value of attribute count.
Instance Method Summary collapse
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(name, *args, &block) ⇒ Object
10 11 12 |
# File 'lib/mailjet/collection_proxy.rb', line 10 def method_missing(name, *args, &block) @proxy.send(name, *args, &block) end |
Instance Attribute Details
#count ⇒ Object
Returns the value of attribute count.
3 4 5 |
# File 'lib/mailjet/collection_proxy.rb', line 3 def count @count end |
Instance Method Details
#intialize(response = {}) ⇒ Object
5 6 7 8 |
# File 'lib/mailjet/collection_proxy.rb', line 5 def intialize(response = {}) self.count = response['Total'] @proxy = response['Data'] ? Array.new(response['Data']) : [] end |