class ConstantContact::Components::ResultSet

Attributes

next[RW]
results[RW]

Public Class Methods

new(results, meta) click to toggle source

Constructor to create a ResultSet from the results/meta response when performing a get on a collection @param [Array<Hash>] results - results array from request @param [Hash] meta - meta hash from request

# File lib/constantcontact/components/result_set.rb, line 16
def initialize(results, meta)
  @results = results

  if meta.has_key?('pagination') and meta['pagination'].has_key?('next_link')
    next_link = meta['pagination']['next_link']
    @next = next_link[next_link.index('?'), next_link.length]
  end
end