Class: ROM::Factory::Attributes::Association::Core Private

Inherits:
Object
  • Object
show all
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

ManyToOne, OneToMany

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(assoc, builder, 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.



14
15
16
17
18
# File 'lib/rom/factory/attributes/association.rb', line 14

def initialize(assoc, builder, options = {})
  @assoc = assoc
  @builder_proc = builder
  @options = options
end

Instance Attribute Details

#assocObject (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.



11
12
13
# File 'lib/rom/factory/attributes/association.rb', line 11

def assoc
  @assoc
end

#optionsObject (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.



11
12
13
# File 'lib/rom/factory/attributes/association.rb', line 11

def options
  @options
end

Instance Method Details

#builderObject

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.



21
22
23
# File 'lib/rom/factory/attributes/association.rb', line 21

def builder
  @__builder__ ||= @builder_proc.()
end

#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.

Returns:

  • (Boolean)


31
32
33
# File 'lib/rom/factory/attributes/association.rb', line 31

def dependency?(*)
  false
end

#nameObject

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.



26
27
28
# File 'lib/rom/factory/attributes/association.rb', line 26

def name
  assoc.key
end

#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.

Returns:

  • (Boolean)


36
37
38
# File 'lib/rom/factory/attributes/association.rb', line 36

def value?
  false
end