Class: LedgerSync::ResourceAttribute::Reference::Many

Inherits:
LedgerSync::ResourceAttribute::Reference show all
Defined in:
lib/ledger_sync/resource_attribute/reference/many.rb

Defined Under Namespace

Modules: Mixin

Instance Attribute Summary

Attributes inherited from LedgerSync::ResourceAttribute

#name, #reference, #type, #value

Instance Method Summary collapse

Methods inherited from LedgerSync::ResourceAttribute

#cast, #reference?, #valid_with?

Constructor Details

#initialize(name:, to:) ⇒ Many

Returns a new instance of Many.



24
25
26
27
28
29
30
# File 'lib/ledger_sync/resource_attribute/reference/many.rb', line 24

def initialize(name:, to:)
  super(
    name: name,
    type: Type::ReferenceMany.new(resource_class: to),
    value: []
  )
end