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.



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

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.



5
6
7
# File 'lib/rom/factory/attributes/value.rb', line 5

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.



5
6
7
# File 'lib/rom/factory/attributes/value.rb', line 5

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.



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

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.



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

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)


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

def value?
  true
end