Class: LedgerSync::ResourceAttribute::Reference::One
- Inherits:
-
LedgerSync::ResourceAttribute::Reference
- Object
- LedgerSync::ResourceAttribute
- LedgerSync::ResourceAttribute::Reference
- LedgerSync::ResourceAttribute::Reference::One
- 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, #resource_class, #type, #value
Instance Method Summary collapse
-
#initialize(args = {}) ⇒ One
constructor
A new instance of One.
Methods inherited from LedgerSync::ResourceAttribute
#assert_valid, #cast, #reference?, #references_many?, #valid_with?, #will_change?
Methods included from Util::Mixins::DupableMixin
Constructor Details
#initialize(args = {}) ⇒ One
Returns a new instance of One.
33 34 35 36 37 38 39 40 |
# File 'lib/ledger_sync/resource_attribute/reference/one.rb', line 33 def initialize(args = {}) to = args.fetch(:to) super( args.except(:to).merge( type: Type::ReferenceOne.new(resource_class: to) ) ) end |