Class: ROM::Factory::Attributes::Association::Core Private
- Inherits:
-
Object
- Object
- ROM::Factory::Attributes::Association::Core
- Defined in:
- lib/rom/factory/attributes/association.rb
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
Direct Known Subclasses
Instance Attribute Summary collapse
- #assoc ⇒ Object readonly private
- #options ⇒ Object readonly private
- #traits ⇒ Object readonly private
Instance Method Summary collapse
- #builder ⇒ Object private
- #count ⇒ Object private
- #dependency? ⇒ Boolean private
- #factories ⇒ Object private
- #foreign_key ⇒ Object private
-
#initialize(assoc, builder, *traits, **options) ⇒ Core
constructor
private
A new instance of Core.
- #name ⇒ Object private
- #through? ⇒ Boolean private
- #value? ⇒ Boolean private
Constructor Details
#initialize(assoc, builder, *traits, **options) ⇒ Core
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns a new instance of Core.
19 20 21 22 23 24 |
# File 'lib/rom/factory/attributes/association.rb', line 19 def initialize(assoc, builder, *traits, **) @assoc = assoc @builder_proc = builder @traits = traits @options = end |
Instance Attribute Details
#assoc ⇒ Object (readonly)
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
16 17 18 |
# File 'lib/rom/factory/attributes/association.rb', line 16 def assoc @assoc end |
#options ⇒ Object (readonly)
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
16 17 18 |
# File 'lib/rom/factory/attributes/association.rb', line 16 def @options end |
#traits ⇒ Object (readonly)
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
16 17 18 |
# File 'lib/rom/factory/attributes/association.rb', line 16 def traits @traits end |
Instance Method Details
#builder ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
30 31 32 |
# File 'lib/rom/factory/attributes/association.rb', line 30 def builder @__builder__ ||= @builder_proc.call end |
#count ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
50 |
# File 'lib/rom/factory/attributes/association.rb', line 50 def count = .fetch(:count, 1) |
#dependency? ⇒ Boolean
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
38 |
# File 'lib/rom/factory/attributes/association.rb', line 38 def dependency?(*) = false |
#factories ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
44 |
# File 'lib/rom/factory/attributes/association.rb', line 44 def factories = builder.factories |
#foreign_key ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
47 |
# File 'lib/rom/factory/attributes/association.rb', line 47 def foreign_key = assoc.foreign_key |
#name ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
35 |
# File 'lib/rom/factory/attributes/association.rb', line 35 def name = assoc.key |
#through? ⇒ Boolean
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
27 |
# File 'lib/rom/factory/attributes/association.rb', line 27 def through? = false |
#value? ⇒ Boolean
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
41 |
# File 'lib/rom/factory/attributes/association.rb', line 41 def value? = false |