Class: Helium::Configurable::Configuration

Inherits:
Object
  • Object
show all
Defined in:
lib/helium/configurable.rb

Instance Method Summary collapse

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