Module: TCFG

Extended by:
Helper
Defined in:
lib/tcfg/tcfg_module.rb,
lib/tcfg/tcfg_base.rb,
lib/tcfg/tcfg_helper.rb

Overview

The TCFG module can be used as singleton for accessing and specifying configuration

All of the public methods from TCFG::Helper are available as class methods right off the TCFG module

TCFG.tcfg_set 'some_key', 'some_value'

TCFG['some_key']
=> 'some_value'

TCFG.tcfg
=> { 'some_key' => 'some_value', ... }

Defined Under Namespace

Modules: Helper Classes: BadParentInDeepOverrideError, Base, NoSuchConfigFileError, NoSuchConfigurationKeyError, NoSuchEnvironmentError

Constant Summary

Constants included from Helper

Helper::DEFAULT_CONFIG_FILE, Helper::DEFAULT_ENV_VAR_PREFIX

Class Method Summary collapse

Methods included from Helper

tcfg, tcfg_config_file, tcfg_fetch, tcfg_get, tcfg_reset, tcfg_secret_config_file, tcfg_set, tcfg_set_env_var_prefix

Class Method Details

.[](key) ⇒ Object

the simplest way to acces configuration

TCFG['my_key']
=> 'some_value'


27
28
29
# File 'lib/tcfg/tcfg_module.rb', line 27

def [](key)
  tcfg_get key
end