Sha256: bf79d30ba80f56440d29caa080ddc85a2639326f58bca5bde5166e389749970f

Contents?: true

Size: 1.11 KB

Versions: 3

Compression:

Stored size: 1.11 KB

Contents

# Copyright (c) 2022 Contrast Security, Inc. See https://www.contrastsecurity.com/enduser-terms-0317a for more details.
# frozen_string_literal: true

module Contrast
  module Agent
    module DiagnosticsConfig
      # All In effect config values stored in a easy to write representation.
      class EffectiveConfigValue
        # @return [String] Name of the config starting form root of yaml config.
        attr_accessor :canonical_name
        # @return [String] Name of the config.
        attr_accessor :name
        # @return [String] Value set for the config.
        attr_accessor :value
        # @return [String] The source for the entry in the config.
        attr_accessor :source
        # @return [String,nil] The filename for the source of the config, if the source was "yaml".
        attr_accessor :filename

        def to_controlled_hash
          {
              canonical_name: canonical_name,
              name: name, # rubocop:disable Security/Module/Name
              value: value,
              Source: source,
              Filename: filename
          }.compact
        end
      end
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
contrast-agent-6.11.0 lib/contrast/config/effective_config_value.rb
contrast-agent-6.10.0 lib/contrast/config/effective_config_value.rb
contrast-agent-6.9.0 lib/contrast/config/effective_config_value.rb