class Eucalyptus::ResponseCollection

Public Class Methods

new(klass, koala_response) click to toggle source
# File lib/eucalyptus/response.rb, line 18
def initialize(klass, koala_response)
  @koala_response = koala_response
  @klass = klass
  self.concat elements(@koala_response)
end

Public Instance Methods

next_page() click to toggle source
# 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

Private Instance Methods

elements(response) click to toggle source
# File lib/eucalyptus/response.rb, line 33
def elements(response)
  response.collect{ |res| @klass.new(res) }
end