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.54 lib/fedux_org_stdlib/process_environment.rb
fedux_org-stdlib-0.6.53 lib/fedux_org_stdlib/process_environment.rb
fedux_org-stdlib-0.6.52 lib/fedux_org_stdlib/process_environment.rb
fedux_org-stdlib-0.6.51 lib/fedux_org_stdlib/process_environment.rb
fedux_org-stdlib-0.6.50 lib/fedux_org_stdlib/process_environment.rb
fedux_org-stdlib-0.6.48 lib/fedux_org_stdlib/process_environment.rb
fedux_org-stdlib-0.6.47 lib/fedux_org_stdlib/process_environment.rb
fedux_org-stdlib-0.6.46 lib/fedux_org_stdlib/process_environment.rb
fedux_org-stdlib-0.6.45 lib/fedux_org_stdlib/process_environment.rb
fedux_org-stdlib-0.6.44 lib/fedux_org_stdlib/process_environment.rb
fedux_org-stdlib-0.6.43 lib/fedux_org_stdlib/process_environment.rb
fedux_org-stdlib-0.6.40 lib/fedux_org_stdlib/process_environment.rb
fedux_org-stdlib-0.6.39 lib/fedux_org_stdlib/process_environment.rb
fedux_org-stdlib-0.6.38 lib/fedux_org_stdlib/process_environment.rb
fedux_org-stdlib-0.6.37 lib/fedux_org_stdlib/process_environment.rb
fedux_org-stdlib-0.6.34 lib/fedux_org_stdlib/process_environment.rb
fedux_org-stdlib-0.6.33 lib/fedux_org_stdlib/process_environment.rb
fedux_org-stdlib-0.6.32 lib/fedux_org_stdlib/process_environment.rb
fedux_org-stdlib-0.6.31 lib/fedux_org_stdlib/process_environment.rb
fedux_org-stdlib-0.6.30 lib/fedux_org_stdlib/process_environment.rb