Class: AppYamlConfig

Inherits:
Object
  • Object
show all
Includes:
Singleton
Defined in:
lib/yaml_config/app_yaml_config.rb

Instance Method Summary collapse

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(name, *params) ⇒ Object



16
17
18
19
20
# File 'lib/yaml_config/app_yaml_config.rb', line 16

def method_missing(name, *params)
  @yaml_config.respond_to?(name) ?
    @yaml_config.send(name, *params) :
    super
end

Instance Method Details

#init!(file, options = {}) ⇒ Object



7
8
9
10
# File 'lib/yaml_config/app_yaml_config.rb', line 7

def init!(file, options = {})
  @yaml_config = YamlConfig.new(file, options)
  self
end

#respond_to?(name) ⇒ Boolean

Returns:

  • (Boolean)


12
13
14
# File 'lib/yaml_config/app_yaml_config.rb', line 12

def respond_to?(name)
  super || @yaml_config.respond_to?(name)
end