Class: Eucalyptus::ResponseCollection

Inherits:
Array
  • Object
show all
Defined in:
lib/eucalyptus/response.rb

Instance Method Summary collapse

Constructor Details

#initialize(klass, koala_response) ⇒ ResponseCollection

Returns a new instance of ResponseCollection.



18
19
20
21
22
# File 'lib/eucalyptus/response.rb', line 18

def initialize(klass, koala_response)
  @koala_response = koala_response
  @klass = klass
  self.concat elements(@koala_response)
end

Instance Method Details

#next_pageObject



25
26
27
28
29
30
# File 'lib/eucalyptus/response.rb', line 25

def next_page
  next_p = @koala_response.next_page
  if next_p
    self.class.new(@klass, next_p)
  end
end