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, OneToOneThrough

Instance Attribute Summary collapse

Instance Method Summary collapse

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, **options)
  @assoc = assoc
  @builder_proc = builder
  @traits = traits
  @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.


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

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.


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

def options
  @options
end

#traitsObject (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

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


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

def builder
  @__builder__ ||= @builder_proc.call
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)

42
43
44
# File 'lib/rom/factory/attributes/association.rb', line 42

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.


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

def name
  assoc.key
end

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

Returns:

  • (Boolean)

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

def through?
  false
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)

47
48
49
# File 'lib/rom/factory/attributes/association.rb', line 47

def value?
  false
end