Class: ROM::Factory::Attributes::Value Private
- Inherits:
-
Object
- Object
- ROM::Factory::Attributes::Value
- 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
- #name ⇒ Object readonly private
- #value ⇒ Object readonly private
Instance Method Summary collapse
- #call(attrs = EMPTY_HASH) ⇒ Object private
- #dependency_names ⇒ Object private
-
#initialize(name, value) ⇒ Value
constructor
private
A new instance of Value.
- #value? ⇒ Boolean private
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
#name ⇒ Object (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 |
#value ⇒ Object (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_names ⇒ 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.
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.
23 24 25 |
# File 'lib/rom/factory/attributes/value.rb', line 23 def value? true end |