Sha256: 341908d5b86d4c0b157d3c6ed07d3d2a2c943b07c9fb039432a4872ed128cf3f

Contents?: true

Size: 284 Bytes

Versions: 2

Compression:

Stored size: 284 Bytes

Contents

# frozen_string_literal: true

require_relative './base'

module RrxConfig
  module Sources
    class EnvironmentSource < Base
      VARIABLE_NAME = 'RRX_CONFIG'

      # @return [Struct, nil]
      def read
        read_json ENV.fetch(VARIABLE_NAME, nil)
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
rrx_config-0.1.1 lib/rrx_config/sources/environment_source.rb
rrx_config-0.1.0 lib/rrx_config/sources/environment_source.rb