Class: KDecor::Configuration
- Inherits:
-
Object
- Object
- KDecor::Configuration
- Defined in:
- lib/k_decor/configuration.rb
Overview
Configuration class for KDecor
Instance Attribute Summary collapse
-
#decorators ⇒ Object
Returns the value of attribute decorators.
Instance Method Summary collapse
- #get_decorator(key) ⇒ Object
-
#initialize ⇒ Configuration
constructor
A new instance of Configuration.
- #register_decorator(key, decorator) ⇒ Object
Constructor Details
#initialize ⇒ Configuration
Returns a new instance of Configuration.
8 9 10 |
# File 'lib/k_decor/configuration.rb', line 8 def initialize @decorators = KDecor::DecoratorHash.new end |
Instance Attribute Details
#decorators ⇒ Object
Returns the value of attribute decorators.
6 7 8 |
# File 'lib/k_decor/configuration.rb', line 6 def decorators @decorators end |
Instance Method Details
#get_decorator(key) ⇒ Object
16 17 18 |
# File 'lib/k_decor/configuration.rb', line 16 def get_decorator(key) decorators[key] end |
#register_decorator(key, decorator) ⇒ Object
12 13 14 |
# File 'lib/k_decor/configuration.rb', line 12 def register_decorator(key, decorator) decorators.add(key, decorator) end |