Module: LedgerSync::ResourceAttribute::Reference::Many::Mixin::ClassMethods

Defined in:
lib/ledger_sync/resource_attribute/reference/many.rb

Instance Method Summary collapse

Instance Method Details

#references_many(name, to:) ⇒ Object



50
51
52
53
54
55
56
57
58
# File 'lib/ledger_sync/resource_attribute/reference/many.rb', line 50

def references_many(name, to:)
  resource_attribute = ResourceAttribute::Reference::Many.new(
    name: name,
    resource_class: self,
    to: to
  )
  resource_attributes.add resource_attribute
  _define_attribute_methods(name)
end