lib/eucalyptus/response.rb in eucalyptus-0.3.1 vs lib/eucalyptus/response.rb in eucalyptus-0.3.2

- old
+ new

@@ -12,25 +12,20 @@ new_ostruct_member(k) end end end - class ResponseCollection + class ResponseCollection < Array def initialize(klass, koala_response) @koala_response = koala_response @klass = klass - @array = elements(@koala_response) + self.concat elements(@koala_response) end def next_page next_page = @koala_response.next_page self.class.new(@klass, next_page) - end - - # for array methods - def method_missing(method_sym, *args, &block) - @array.send(method_sym) end private def elements(response) response.collect{ |res| @klass.new(res) }