Class: ActiveTriples::Configuration::Item
- Inherits:
-
Object
- Object
- ActiveTriples::Configuration::Item
- Defined in:
- lib/active_triples/configuration/item.rb
Overview
Basic configuration item which overrides the value for a key on the object.
Direct Known Subclasses
Instance Attribute Summary collapse
-
#key ⇒ Object
readonly
Returns the value of attribute key.
-
#object ⇒ Object
readonly
Returns the value of attribute object.
Instance Method Summary collapse
-
#initialize(object, key) ⇒ Item
constructor
A new instance of Item.
- #set(value) ⇒ Object
- #value ⇒ Object
Constructor Details
#initialize(object, key) ⇒ Item
Returns a new instance of Item.
6 7 8 9 |
# File 'lib/active_triples/configuration/item.rb', line 6 def initialize(object, key) @object = object @key = key end |
Instance Attribute Details
#key ⇒ Object (readonly)
Returns the value of attribute key.
5 6 7 |
# File 'lib/active_triples/configuration/item.rb', line 5 def key @key end |
#object ⇒ Object (readonly)
Returns the value of attribute object.
5 6 7 |
# File 'lib/active_triples/configuration/item.rb', line 5 def object @object end |
Instance Method Details
#set(value) ⇒ Object
15 16 17 |
# File 'lib/active_triples/configuration/item.rb', line 15 def set(value) object.inner_hash[key] = value end |
#value ⇒ Object
11 12 13 |
# File 'lib/active_triples/configuration/item.rb', line 11 def value object.inner_hash[key] end |