Class: Helium::Configurable::Configuration
- Inherits:
-
Object
- Object
- Helium::Configurable::Configuration
- Defined in:
- lib/helium/configurable.rb
Instance Method Summary collapse
-
#initialize(hash = {}) ⇒ Configuration
constructor
A new instance of Configuration.
- #method_missing(name, value = nil) ⇒ Object
Constructor Details
#initialize(hash = {}) ⇒ Configuration
Returns a new instance of Configuration.
14 15 16 |
# File 'lib/helium/configurable.rb', line 14 def initialize(hash = {}) @options = {}.merge(hash) end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(name, value = nil) ⇒ Object
18 19 20 21 |
# File 'lib/helium/configurable.rb', line 18 def method_missing(name, value = nil) @options[name] = value unless value.nil? @options[name] end |