Sha256: 8ea3eae726800b1dba235bfe4cda76f639152939b9c4c472f1b85170095ac234

Contents?: true

Size: 230 Bytes

Versions: 7

Compression:

Stored size: 230 Bytes

Contents

require_relative "adapter"

module Blinkist
  class Config
    class EnvAdapter < Adapter
      def get(key, default = nil, **)
        env_key = key.tr("/", "_").upcase
        ENV[env_key] || default
      end
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
blinkist-config-1.3.1 lib/blinkist/config/adapters/env_adapter.rb
blinkist-config-1.2.2 lib/blinkist/config/adapters/env_adapter.rb
blinkist-config-1.2.0 lib/blinkist/config/adapters/env_adapter.rb
blinkist-config-1.1.0 lib/blinkist/config/adapters/env_adapter.rb
blinkist-config-1.0.2 lib/blinkist/config/adapters/env_adapter.rb
blinkist-config-1.0.1 lib/blinkist/config/adapters/env_adapter.rb
blinkist-config-1.0.0 lib/blinkist/config/adapters/env_adapter.rb