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, ConfigFileNotFound, ConfigFileNotSpecified, ConfigHelper, ConfigOption, InvalidNamespaceError

Constant Summary collapse

VERSION =
"1.2.4".freeze

Instance Method Summary collapse

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

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

rubocop:disable Style/MethodMissing


41
42
43
# File 'lib/config_module.rb', line 41

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

Instance Method Details

#[](key, *args) ⇒ Object


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

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

#configObject


16
17
18
# File 'lib/config_module.rb', line 16

def config
  __config_module_helper.config
end

#has_key?(key) ⇒ Boolean

Returns:

  • (Boolean)

20
21
22
# File 'lib/config_module.rb', line 20

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