Class: AfterbanksPSD2::Collection
- Inherits:
-
Array
- Object
- Array
- AfterbanksPSD2::Collection
- Defined in:
- lib/afterbanks_psd2/collection.rb
Instance Method Summary collapse
-
#initialize(response, item_klass) ⇒ Collection
constructor
A new instance of Collection.
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 |