Class: EnvironmentConfigurable::ConfigWrapper

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

Instance Method Summary collapse

Constructor Details

#initialize(hash) ⇒ ConfigWrapper

Returns a new instance of ConfigWrapper.



29
30
31
# File 'lib/environment_configurable.rb', line 29

def initialize(hash)
  @hash = hash
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(method_name, *args) ⇒ Object



32
33
34
35
36
# File 'lib/environment_configurable.rb', line 32

def method_missing(method_name,*args)
  key = method_name.to_s
  super unless @hash.keys.include?(key)
  @hash[key] 
end