Class: LedgerSync::Serialization::Type::SerializerReferencesManyType

Inherits:
SerializerType show all
Defined in:
lib/ledger_sync/serialization/type/serializer_references_many_type.rb

Instance Attribute Summary

Attributes inherited from SerializerType

#serializer

Instance Method Summary collapse

Methods inherited from SerializerType

#initialize

Methods included from Type::ValueMixin

#assert_valid, #cast, included, #valid?

Constructor Details

This class inherits a constructor from LedgerSync::Serialization::Type::SerializerType

Instance Method Details

#cast_value(args = {}) ⇒ Object



9
10
11
12
13
14
15
16
17
# File 'lib/ledger_sync/serialization/type/serializer_references_many_type.rb', line 9

def cast_value(args = {})
  value = args.fetch(:value)

  return if value.nil?

  value.map do |one_value|
    super(value: one_value)
  end
end