Class: Wardrobe::OptionStore
- Defined in:
- lib/wardrobe/option_store.rb
Instance Attribute Summary collapse
-
#defaults ⇒ Object
readonly
Returns the value of attribute defaults.
-
#store ⇒ Object
readonly
Returns the value of attribute store.
Attributes inherited from Store
Instance Method Summary collapse
Methods inherited from Store
#[], #del, #each, #initialize, #merge, #method_missing, #values
Constructor Details
This class inherits a constructor from Wardrobe::Store
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class Wardrobe::Store
Instance Attribute Details
#defaults ⇒ Object (readonly)
Returns the value of attribute defaults.
5 6 7 |
# File 'lib/wardrobe/option_store.rb', line 5 def defaults @defaults end |
#store ⇒ Object (readonly)
Returns the value of attribute store.
5 6 7 |
# File 'lib/wardrobe/option_store.rb', line 5 def store @store end |
Instance Method Details
#add(name, instance) ⇒ Object
12 13 14 |
# File 'lib/wardrobe/option_store.rb', line 12 def add(name, instance) mutate { store[name] = instance } end |
#freeze ⇒ Object
7 8 9 10 |
# File 'lib/wardrobe/option_store.rb', line 7 def freeze @defaults = select_defaults super end |