Sha256: 297d2841219958542b644370d2fe596b6610961fa5079a83a5cd4ee9e6cb6682

Contents?: true

Size: 625 Bytes

Versions: 7

Compression:

Stored size: 625 Bytes

Contents

require 'fig/environment_variables'

module Fig; end;
module EnvironmentVariables; end

# Manager of a set of environment variables where the variable names are
# case-sensitive, e.g. on *nix.
class Fig::EnvironmentVariables::CaseSensitive
  include Fig::EnvironmentVariables

  def [](key)
    return @variables[key]
  end

  def []=(new_key, new_value)
    @variables[new_key] = new_value

    return
  end

  def prepend_variable(key, new_value)
    if @variables.key?(key)
      @variables[key] = new_value + File::PATH_SEPARATOR + @variables[key]
    else
      @variables[key] = new_value
    end

    return
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
fig-0.1.77 lib/fig/environment_variables/case_sensitive.rb
fig-0.1.76 lib/fig/environment_variables/case_sensitive.rb
fig-0.1.75 lib/fig/environment_variables/case_sensitive.rb
fig-0.1.73 lib/fig/environment_variables/case_sensitive.rb
fig-0.1.71 lib/fig/environment_variables/case_sensitive.rb
fig-0.1.69 lib/fig/environment_variables/case_sensitive.rb
fig-0.1.67 lib/fig/environment_variables/case_sensitive.rb