Class: Inthegra::VehiclesSerializer
- Inherits:
-
BaseSerializer
- Object
- BaseSerializer
- Inthegra::VehiclesSerializer
- Defined in:
- lib/inthegra/serializer/vehicles.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 11 12 13 14 15 |
# File 'lib/inthegra/serializer/vehicles.rb', line 6 def parse collection = [] input.each do |line| line['Linha']['Veiculos'].each do |vehicles| collection << vehicles end end CollectionSerializer.parse(collection, model) end |