Module: Serega::ConvertItem::ConvertItemClassMethods
- Included in:
- Serega::ConvertItem
- Defined in:
- lib/serega/convert_item.rb
Instance Method Summary collapse
Instance Method Details
#call(object, context, map) ⇒ Object
6 7 8 9 10 11 12 13 |
# File 'lib/serega/convert_item.rb', line 6 def call(object, context, map) return unless object map.each_with_object({}) do |(attribute, nested_attributes), hash| value = attribute.value(object, context) attach_value(value, hash, attribute, nested_attributes, context) end end |