Class: ConstantContact::Components::ResultSet
- Inherits:
-
Object
- Object
- ConstantContact::Components::ResultSet
- Defined in:
- lib/constantcontact/components/result_set.rb
Instance Attribute Summary collapse
-
#next ⇒ Object
Returns the value of attribute next.
-
#results ⇒ Object
Returns the value of attribute results.
Instance Method Summary collapse
-
#initialize(results, meta) ⇒ ResultSet
constructor
Constructor to create a ResultSet from the results/meta response when performing a get on a collection.
Constructor Details
#initialize(results, meta) ⇒ ResultSet
Constructor to create a ResultSet from the results/meta response when performing a get on a collection
16 17 18 19 20 21 22 23 |
# File 'lib/constantcontact/components/result_set.rb', line 16 def initialize(results, ) @results = results if .has_key?('pagination') and ['pagination'].has_key?('next_link') next_link = ['pagination']['next_link'] @next = next_link[next_link.index('?'), next_link.length] end end |
Instance Attribute Details
#next ⇒ Object
Returns the value of attribute next
10 11 12 |
# File 'lib/constantcontact/components/result_set.rb', line 10 def next @next end |
#results ⇒ Object
Returns the value of attribute results
10 11 12 |
# File 'lib/constantcontact/components/result_set.rb', line 10 def results @results end |