Sha256: 4a2ec6828f10cabc861d048ddd6cb9a55c438ae287f1f176f2cb17cf1e5b395c

Contents?: true

Size: 1008 Bytes

Versions: 12

Compression:

Stored size: 1008 Bytes

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 Reporting
      module Settings
        # Base class to represent common exclusions fields.
        class ExclusionBase
          BASE_ATTRIBUTES = %i[name modes assess_rules protect_rules].cs__freeze

          # @return name [String]
          attr_accessor :name
          # @return modes [Array<String>]
          attr_accessor :modes
          # @return assess_rules [Array<String>]
          attr_accessor :assess_rules
          # @return protect_rules [Array<String>]
          attr_accessor :protect_rules

          def to_controlled_hash
            {
                name: name, # rubocop:disable Security/Module/Name
                modes: modes,
                assessRules: assess_rules,
                protectRules: protect_rules
            }
          end
        end
      end
    end
  end
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
contrast-agent-6.7.0 lib/contrast/agent/reporting/settings/exclusion_base.rb
contrast-agent-6.6.5 lib/contrast/agent/reporting/settings/exclusion_base.rb
contrast-agent-6.6.4 lib/contrast/agent/reporting/settings/exclusion_base.rb
contrast-agent-6.6.3 lib/contrast/agent/reporting/settings/exclusion_base.rb
contrast-agent-6.6.2 lib/contrast/agent/reporting/settings/exclusion_base.rb
contrast-agent-6.6.1 lib/contrast/agent/reporting/settings/exclusion_base.rb
contrast-agent-6.6.0 lib/contrast/agent/reporting/settings/exclusion_base.rb
contrast-agent-6.5.1 lib/contrast/agent/reporting/settings/exclusion_base.rb
contrast-agent-6.5.0 lib/contrast/agent/reporting/settings/exclusion_base.rb
contrast-agent-6.4.0 lib/contrast/agent/reporting/settings/exclusion_base.rb
contrast-agent-6.3.0 lib/contrast/agent/reporting/settings/exclusion_base.rb
contrast-agent-6.2.0 lib/contrast/agent/reporting/settings/exclusion_base.rb