Module: ConfigModule

Defined in:
lib/config_module.rb,
lib/config_module/version.rb,
lib/config_module/exceptions.rb,
lib/config_module/config_helper.rb,
lib/config_module/config_option.rb

Defined Under Namespace

Classes: ConfigError, ConfigHelper, ConfigOption, InvalidNamespaceError

Constant Summary collapse

VERSION =
'1.2.1'

Instance Method Summary collapse

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(name, *args, &block) ⇒ Object (private)



38
39
40
# File 'lib/config_module.rb', line 38

def method_missing name, *args, &block
  __config_module_helper.method_missing_handler name, caller(1), *args
end

Instance Method Details

#[](key, *args) ⇒ Object



10
11
12
# File 'lib/config_module.rb', line 10

def [] key, *args
  __config_module_helper.field_lookup_handler key, caller(1), *args
end

#configObject



14
15
16
# File 'lib/config_module.rb', line 14

def config
  __config_module_helper.config
end

#has_key?(key) ⇒ Boolean

Returns:

  • (Boolean)


18
19
20
# File 'lib/config_module.rb', line 18

def has_key? key
  __config_module_helper.config.has_key? key
end