Class: LHC::Response::Data::Collection
- Inherits:
-
Array
- Object
- Array
- LHC::Response::Data::Collection
- Includes:
- Base
- Defined in:
- lib/lhc/response/data/collection.rb
Instance Method Summary collapse
-
#initialize(response, data: nil) ⇒ Collection
constructor
A new instance of Collection.
Methods included from Base
Constructor Details
#initialize(response, data: nil) ⇒ Collection
Returns a new instance of Collection.
6 7 8 9 10 11 12 13 14 15 |
# File 'lib/lhc/response/data/collection.rb', line 6 def initialize(response, data: nil) @response = response @data = data super( as_json.map do |i| LHC::Response::Data.new(response, data: i) end ) end |