Module: ComplexConfig::Provider::Shortcuts

Included in:
ComplexConfig::Provider, Object
Defined in:
lib/complex_config/provider/shortcuts.rb

Instance Method Summary collapse

Instance Method Details

#complex_config(name = nil) ⇒ Object



13
14
15
16
17
18
19
# File 'lib/complex_config/provider/shortcuts.rb', line 13

def complex_config(name = nil)
  if name
    ComplexConfig::Provider[name]
  else
    ComplexConfig::Provider.proxy
  end
end

#complex_config_with_env(name = nil, env = ComplexConfig::Provider.env) ⇒ Object Also known as: cc



3
4
5
6
7
8
9
# File 'lib/complex_config/provider/shortcuts.rb', line 3

def complex_config_with_env(name = nil, env = ComplexConfig::Provider.env)
  if name
    ComplexConfig::Provider[name][env.to_s]
  else
    ComplexConfig::Provider.proxy(env.to_s)
  end
end