Sha256: 7ce29509ac982afb4f560be0100eec39cf00012de4a4bec358411ac7610483a2

Contents?: true

Size: 347 Bytes

Versions: 37

Compression:

Stored size: 347 Bytes

Contents

module EnvironmentHelpers
  def set_env(key, value)
    ensure_variable(:default_env, {})
    get(:default_env)[key] = value
    ENV[key] = value
  end

  def get_env(key)
    ensure_variable(:default_env, {})
    get(:default_env)[key]
  end

  def default_env(hash = {})
    hash.each do |key, value|
      set_env(key, value)
    end
  end
end

Version data entries

37 entries across 37 versions & 1 rubygems

Version Path
potassium-7.2.0 lib/potassium/helpers/environment-helpers.rb
potassium-7.1.0 lib/potassium/helpers/environment-helpers.rb
potassium-7.0.0 lib/potassium/helpers/environment-helpers.rb
potassium-6.7.0 lib/potassium/helpers/environment-helpers.rb
potassium-6.6.0 lib/potassium/helpers/environment-helpers.rb
potassium-6.5.0 lib/potassium/helpers/environment-helpers.rb
potassium-6.4.0 lib/potassium/helpers/environment-helpers.rb
potassium-6.3.0 lib/potassium/helpers/environment-helpers.rb
potassium-6.2.0 lib/potassium/helpers/environment-helpers.rb
potassium-6.1.0 lib/potassium/helpers/environment-helpers.rb
potassium-6.0.0 lib/potassium/helpers/environment-helpers.rb
potassium-5.2.3 lib/potassium/helpers/environment-helpers.rb
potassium-5.2.2 lib/potassium/helpers/environment-helpers.rb
potassium-5.2.1 lib/potassium/helpers/environment-helpers.rb
potassium-5.2.0 lib/potassium/helpers/environment-helpers.rb
potassium-5.1.4 lib/potassium/helpers/environment-helpers.rb
potassium-5.1.3 lib/potassium/helpers/environment-helpers.rb
potassium-5.1.2 lib/potassium/helpers/environment-helpers.rb
potassium-5.1.1 lib/potassium/helpers/environment-helpers.rb
potassium-3.0.0 lib/potassium/helpers/environment-helpers.rb