Class: Tamashii::Config::Shared
- Inherits:
-
Object
- Object
- Tamashii::Config::Shared
- Includes:
- Tamashii::Configurable
- Defined in:
- lib/tamashii/config.rb
Overview
:nodoc:
Instance Method Summary collapse
- #add(name, options = {}) ⇒ Object
-
#initialize ⇒ Shared
constructor
A new instance of Shared.
- #register(name, configurable) ⇒ Object
Methods included from Tamashii::Configurable
Constructor Details
Instance Method Details
#add(name, options = {}) ⇒ Object
21 22 23 |
# File 'lib/tamashii/config.rb', line 21 def add(name, = {}) self.class.config(name, ) end |
#register(name, configurable) ⇒ Object
25 26 27 28 29 |
# File 'lib/tamashii/config.rb', line 25 def register(name, configurable) raise NotConfigurableError unless configurable.is_a?(Configurable) add(name) self[name] = configurable end |