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.6.29 lib/fedux_org_stdlib/process_environment.rb
fedux_org-stdlib-0.6.28 lib/fedux_org_stdlib/process_environment.rb
fedux_org-stdlib-0.6.27 lib/fedux_org_stdlib/process_environment.rb
fedux_org-stdlib-0.6.26 lib/fedux_org_stdlib/process_environment.rb
fedux_org-stdlib-0.6.25 lib/fedux_org_stdlib/process_environment.rb
fedux_org-stdlib-0.6.23 lib/fedux_org_stdlib/process_environment.rb
fedux_org-stdlib-0.6.22 lib/fedux_org_stdlib/process_environment.rb
fedux_org-stdlib-0.6.21 lib/fedux_org_stdlib/process_environment.rb
fedux_org-stdlib-0.6.20 lib/fedux_org_stdlib/process_environment.rb
fedux_org-stdlib-0.6.18 lib/fedux_org_stdlib/process_environment.rb
fedux_org-stdlib-0.6.17 lib/fedux_org_stdlib/process_environment.rb
fedux_org-stdlib-0.6.16 lib/fedux_org_stdlib/process_environment.rb
fedux_org-stdlib-0.6.15 lib/fedux_org_stdlib/process_environment.rb
fedux_org-stdlib-0.6.14 lib/fedux_org_stdlib/process_environment.rb
fedux_org-stdlib-0.6.13 lib/fedux_org_stdlib/process_environment.rb
fedux_org-stdlib-0.6.12 lib/fedux_org_stdlib/process_environment.rb
fedux_org-stdlib-0.6.11 lib/fedux_org_stdlib/process_environment.rb
fedux_org-stdlib-0.6.9 lib/fedux_org_stdlib/process_environment.rb
fedux_org-stdlib-0.6.8 lib/fedux_org_stdlib/process_environment.rb
fedux_org-stdlib-0.6.7 lib/fedux_org_stdlib/process_environment.rb