Class: LedgerSync::ResourceAttribute::Reference::One

Inherits:
LedgerSync::ResourceAttribute::Reference show all
Defined in:
lib/ledger_sync/resource_attribute/reference/one.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?, #references_many?, #valid_with?

Constructor Details

#initialize(name:, to:) ⇒ One

Returns a new instance of One.



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

def initialize(name:, to:)
  super(
    name: name,
    type: Type::ReferenceOne.new(resource_class: to)
  )
end