Sha256: a4c2653093dbea768da9ca572a02ed398a5fc0c8658a4773ff9f8ed8c93eac9e

Contents?: true

Size: 1.64 KB

Versions: 11

Compression:

Stored size: 1.64 KB

Contents

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

require 'contrast/utils/object_share'

module Contrast
  module Config
    # Common Configuration settings. Those in this section pertain to the
    # application identification functionality of the Agent.
    class ApplicationConfiguration
      include Contrast::Config::BaseConfiguration

      # @return [String]
      attr_accessor :name
      # @return [String]
      attr_accessor :version
      # @return [String]
      attr_accessor :language
      # @return [String]
      attr_accessor :path
      # @return [String]
      attr_accessor :group
      # @return [String]
      attr_accessor :tags
      # @return [String]
      attr_accessor :code
      # @return [String]
      attr_accessor :metadata
      attr_writer :session_id, :session_metadata

      def initialize hsh = {}
        return unless hsh

        @name = hsh[:name]
        @version = hsh[:version]
        @language = hsh[:language]
        @path = hsh[:path]
        @group = hsh[:group]
        @tags = hsh[:tags]
        @code = hsh[:code]
        @metadata = hsh[:metadata]
        @session_id = hsh[:session_id]
        @session_metadata = hsh[:session_metadata]
      end

      # @return [String, Contrast::Utils::ObjectShare::EMPTY_STRING]
      def session_id
        @session_id ||= Contrast::Utils::ObjectShare::EMPTY_STRING
      end

      # @return [String, Contrast::Utils::ObjectShare::EMPTY_STRING]
      def session_metadata
        @session_metadata ||= Contrast::Utils::ObjectShare::EMPTY_STRING
      end
    end
  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
contrast-agent-6.6.2 lib/contrast/config/application_configuration.rb
contrast-agent-6.6.1 lib/contrast/config/application_configuration.rb
contrast-agent-6.6.0 lib/contrast/config/application_configuration.rb
contrast-agent-6.5.1 lib/contrast/config/application_configuration.rb
contrast-agent-6.5.0 lib/contrast/config/application_configuration.rb
contrast-agent-6.4.0 lib/contrast/config/application_configuration.rb
contrast-agent-6.3.0 lib/contrast/config/application_configuration.rb
contrast-agent-6.2.0 lib/contrast/config/application_configuration.rb
contrast-agent-6.1.2 lib/contrast/config/application_configuration.rb
contrast-agent-6.1.1 lib/contrast/config/application_configuration.rb
contrast-agent-6.1.0 lib/contrast/config/application_configuration.rb