Sha256: f190e04401a9bcef456bcc554e594e428d582c26155e4bec0b0aeff399efd2d8

Contents?: true

Size: 1.07 KB

Versions: 1

Compression:

Stored size: 1.07 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 < BaseConfiguration
      DEFAULT_PATH = './messages'

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

      def initialize hsh = {}
        @enable = traverse_config(hsh, :enable)
        @requests = traverse_config(hsh, :requests)
        @responses = traverse_config(hsh, :responses)
        @path = traverse_config(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

1 entries across 1 versions & 1 rubygems

Version Path
contrast-agent-6.0.0 lib/contrast/config/request_audit_configuration.rb