Sha256: 3bd04ce7cdc561affa89f9b5ca0e5a5001ca451888ee9f262b69da877ed680ce

Contents?: true

Size: 411 Bytes

Versions: 61

Compression:

Stored size: 411 Bytes

Contents

# encoding: utf-8
module FeduxOrgStdlib
  class ProcessEnvironment
    private

    attr_reader :environment

    public

    def initialize(environment = ENV)
      @environment = environment

    end

    def fetch(key, default_value = nil)
      environment.to_hash.symbolize_keys.fetch(key.to_sym, default_value).to_s
    end

    def write(key, value)
      environment[key.to_s] = value
    end
  end
end

Version data entries

61 entries across 61 versions & 1 rubygems

Version Path
fedux_org-stdlib-0.7.21 lib/fedux_org_stdlib/process_environment.rb
fedux_org-stdlib-0.7.20 lib/fedux_org_stdlib/process_environment.rb
fedux_org-stdlib-0.7.19 lib/fedux_org_stdlib/process_environment.rb
fedux_org-stdlib-0.7.18 lib/fedux_org_stdlib/process_environment.rb
fedux_org-stdlib-0.7.17 lib/fedux_org_stdlib/process_environment.rb
fedux_org-stdlib-0.7.16 lib/fedux_org_stdlib/process_environment.rb
fedux_org-stdlib-0.7.15 lib/fedux_org_stdlib/process_environment.rb
fedux_org-stdlib-0.7.14 lib/fedux_org_stdlib/process_environment.rb
fedux_org-stdlib-0.7.12 lib/fedux_org_stdlib/process_environment.rb
fedux_org-stdlib-0.7.11 lib/fedux_org_stdlib/process_environment.rb
fedux_org-stdlib-0.7.10 lib/fedux_org_stdlib/process_environment.rb
fedux_org-stdlib-0.7.8 lib/fedux_org_stdlib/process_environment.rb
fedux_org-stdlib-0.7.7 lib/fedux_org_stdlib/process_environment.rb
fedux_org-stdlib-0.7.6 lib/fedux_org_stdlib/process_environment.rb
fedux_org-stdlib-0.7.5 lib/fedux_org_stdlib/process_environment.rb
fedux_org-stdlib-0.7.4 lib/fedux_org_stdlib/process_environment.rb
fedux_org-stdlib-0.7.3 lib/fedux_org_stdlib/process_environment.rb
fedux_org-stdlib-0.7.2 lib/fedux_org_stdlib/process_environment.rb
fedux_org-stdlib-0.7.1 lib/fedux_org_stdlib/process_environment.rb
fedux_org-stdlib-0.7.0 lib/fedux_org_stdlib/process_environment.rb