Class: Inthegra::CollectionSerializer
- Inherits:
-
BaseSerializer
- Object
- BaseSerializer
- Inthegra::CollectionSerializer
- Defined in:
- lib/inthegra/serializer/collection.rb
Instance Attribute Summary
Attributes inherited from BaseSerializer
Instance Method Summary collapse
-
#parse ⇒ Array
Parse a generic collection with your model type.
Methods inherited from BaseSerializer
Constructor Details
This class inherits a constructor from Inthegra::BaseSerializer
Instance Method Details
#parse ⇒ Array
Parse a generic collection with your model type
6 7 8 9 10 |
# File 'lib/inthegra/serializer/collection.rb', line 6 def parse input.map do |item| model.new(item) end end |