Class: AfterbanksPSD2::Collection

Inherits:
Array
  • Object
show all
Defined in:
lib/afterbanks_psd2/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_psd2/collection.rb', line 3

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