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.
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
#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.
5 6 7 |
# File 'lib/rom/factory/attributes/value.rb', line 5 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.
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_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.
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.
21 22 23 |
# File 'lib/rom/factory/attributes/value.rb', line 21 def value? true end |