Class: BlendedConfig::Sources::Environment

Inherits:
BlendedConfig::Source show all
Defined in:
lib/blended_config/sources/environment.rb

Instance Attribute Summary

Attributes inherited from BlendedConfig::Source

#raw_source

Instance Method Summary collapse

Methods inherited from BlendedConfig::Source

#prefix_with, #prefixes

Instance Method Details

#[](key) ⇒ Object



8
9
10
11
12
# File 'lib/blended_config/sources/environment.rb', line 8

def [](key)
  var = (prefixes + [key]).join('_').upcase

  env[var]
end