Class: Configuratron
- Inherits:
-
BlankSlate
- Object
- BlankSlate
- Configuratron
- Defined in:
- lib/configuratron.rb
Defined Under Namespace
Modules: Configurable Classes: ConfigHash
Instance Method Summary collapse
- #[](key) ⇒ Object
- #[]=(key, value) ⇒ Object
-
#initialize ⇒ Configuratron
constructor
A new instance of Configuratron.
- #method_missing(name, *args, &block) ⇒ Object
Methods inherited from BlankSlate
find_hidden_method, hide, reveal
Constructor Details
#initialize ⇒ Configuratron
Returns a new instance of Configuratron.
4 5 6 |
# File 'lib/configuratron.rb', line 4 def initialize @config = ConfigHash.new end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(name, *args, &block) ⇒ Object
16 17 18 |
# File 'lib/configuratron.rb', line 16 def method_missing(name, *args, &block) @config.__send__(name, *args, &block) end |