Module: EnvironmentHelpers
- Defined in:
- lib/potassium/helpers/environment-helpers.rb
Instance Method Summary collapse
Instance Method Details
#default_env(hash = {}) ⇒ Object
13 14 15 16 17 |
# File 'lib/potassium/helpers/environment-helpers.rb', line 13 def default_env(hash = {}) hash.each do |key, value| set_env(key, value) end end |
#get_env(key) ⇒ Object
8 9 10 11 |
# File 'lib/potassium/helpers/environment-helpers.rb', line 8 def get_env(key) ensure_variable(:default_env, {}) get(:default_env)[key] end |
#set_env(key, value) ⇒ Object
2 3 4 5 6 |
# File 'lib/potassium/helpers/environment-helpers.rb', line 2 def set_env(key, value) ensure_variable(:default_env, {}) get(:default_env)[key] = value ENV[key] = value end |