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.
7 8 9 10 |
# File 'lib/active_triples/configuration/item.rb', line 7 def initialize(object, key) @object = object @key = key end |
Instance Attribute Details
#key ⇒ Object (readonly)
Returns the value of attribute key.
6 7 8 |
# File 'lib/active_triples/configuration/item.rb', line 6 def key @key end |
#object ⇒ Object (readonly)
Returns the value of attribute object.
6 7 8 |
# File 'lib/active_triples/configuration/item.rb', line 6 def object @object end |
Instance Method Details
#set(value) ⇒ Object
16 17 18 |
# File 'lib/active_triples/configuration/item.rb', line 16 def set(value) object.inner_hash[key] = value end |
#value ⇒ Object
12 13 14 |
# File 'lib/active_triples/configuration/item.rb', line 12 def value object.inner_hash[key] end |