Sha256: 4bb847043714f187395b8c2755c93b864afad8a5f7feb3004f203feddbd5abc1

Contents?: true

Size: 280 Bytes

Versions: 6

Compression:

Stored size: 280 Bytes

Contents

# frozen_string_literal: true

module Hypertrace::EnvVarSettings
  PREFIXES = ['HT']
  class << self
    def env_value target_key
      PREFIXES.each do |prefix|
        key = "#{prefix}_#{target_key}"
        return ENV[key] if ENV.key?(key)
      end
      nil
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
hypertrace-agent-0.3.0 lib/hypertrace/env_var_settings.rb
hypertrace-agent-0.2.2 lib/hypertrace/env_var_settings.rb
hypertrace-agent-0.2.1 lib/hypertrace/env_var_settings.rb
hypertrace-agent-0.1.2 lib/hypertrace/env_var_settings.rb
hypertrace-agent-0.1.1 lib/hypertrace/env_var_settings.rb
hypertrace-agent-0.1.0 lib/hypertrace/env_var_settings.rb