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

Inherits:
Object
  • Object
show all
Defined in:
lib/rom/factory/attributes/value.rb

Overview

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.

API:

  • private

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.

API:

  • private



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.

API:

  • private



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.

API:

  • private



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.

API:

  • private



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.

API:

  • private



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:

API:

  • private



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

def value?
  true
end