Class: ROM::Factory::Attributes::Value Private

Inherits:
Object
  • Object
show all
Defined in:
lib/rom/factory/attributes/value.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.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name, value) ⇒ Value

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



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

def initialize(name, value)
  @name = name
  @value = value
end

Instance Attribute Details

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



7
8
9
# File 'lib/rom/factory/attributes/value.rb', line 7

def name
  @name
end

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



7
8
9
# File 'lib/rom/factory/attributes/value.rb', line 7

def value
  @value
end

Instance Method Details

#call(attrs = EMPTY_HASH) ⇒ 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.



16
17
18
19
20
# File 'lib/rom/factory/attributes/value.rb', line 16

def call(attrs = EMPTY_HASH)
  return if attrs.key?(name)

  {name => value}
end

#dependency_namesObject

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.



28
29
30
# File 'lib/rom/factory/attributes/value.rb', line 28

def dependency_names
  EMPTY_ARRAY
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)


23
24
25
# File 'lib/rom/factory/attributes/value.rb', line 23

def value?
  true
end