Class: Zoomba::Collection

Inherits:
Array
  • Object
show all
Defined in:
lib/zoomba/collection.rb

Instance Method Summary collapse

Constructor Details

#initialize(api_response, type = nil) ⇒ Collection

Returns a new instance of Collection.



4
5
6
# File 'lib/zoomba/collection.rb', line 4

def initialize(api_response, type = nil)
  super(api_response[type.to_s].map { |u| Zoomba::User.new(u) })
end