Class: Afterbanks::Collection

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

Instance Method Summary collapse

Constructor Details

#initialize(response, item_klass) ⇒ Collection

Returns a new instance of Collection.



3
4
5
6
7
# File 'lib/afterbanks/collection.rb', line 3

def initialize(response, item_klass)
  response.each do |item|
    self << item_klass.new(item)
  end
end