Sha256: 61846559ab80bfffe30fd85d87b547b010a8a904fd2d84c5a6662a0989944e5b

Contents?: true

Size: 1.06 KB

Versions: 16

Compression:

Stored size: 1.06 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 Config
    # This class holds the Common Settings for the hidden functionality of the TS
    class RequestAuditConfiguration
      include Contrast::Config::BaseConfiguration

      DEFAULT_PATH = './messages'

      attr_writer :enable, :requests, :responses, :path

      def initialize hsh = {}
        return unless hsh

        @enable = hsh[:enable]
        @requests = hsh[:requests]
        @responses = hsh[:responses]
        @path = hsh[:path]
      end

      # @return [Boolean, false]
      def enable
        @enable.nil? ? false : @enable
      end

      # @return [Boolean, false]
      def requests
        @requests.nil? ? false : @requests
      end

      # @return [Boolean, false]
      def responses
        @responses.nil? ? false : @responses
      end

      # @return [String, ::DEFAULT_PATH]
      def path
        @path.nil? ? DEFAULT_PATH : @path
      end
    end
  end
end

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
contrast-agent-6.8.0 lib/contrast/config/request_audit_configuration.rb
contrast-agent-6.7.0 lib/contrast/config/request_audit_configuration.rb
contrast-agent-6.6.5 lib/contrast/config/request_audit_configuration.rb
contrast-agent-6.6.4 lib/contrast/config/request_audit_configuration.rb
contrast-agent-6.6.3 lib/contrast/config/request_audit_configuration.rb
contrast-agent-6.6.2 lib/contrast/config/request_audit_configuration.rb
contrast-agent-6.6.1 lib/contrast/config/request_audit_configuration.rb
contrast-agent-6.6.0 lib/contrast/config/request_audit_configuration.rb
contrast-agent-6.5.1 lib/contrast/config/request_audit_configuration.rb
contrast-agent-6.5.0 lib/contrast/config/request_audit_configuration.rb
contrast-agent-6.4.0 lib/contrast/config/request_audit_configuration.rb
contrast-agent-6.3.0 lib/contrast/config/request_audit_configuration.rb
contrast-agent-6.2.0 lib/contrast/config/request_audit_configuration.rb
contrast-agent-6.1.2 lib/contrast/config/request_audit_configuration.rb
contrast-agent-6.1.1 lib/contrast/config/request_audit_configuration.rb
contrast-agent-6.1.0 lib/contrast/config/request_audit_configuration.rb