Sha256: ec56e300ab03d877327eec968dc3cd1a0aae333a27ca4c1653b045ec36f164d2

Contents?: true

Size: 989 Bytes

Versions: 11

Compression:

Stored size: 989 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 Components
    module Inventory
      # A wrapper build around the Common Agent Configuration project to allow
      # for access of the values contained in its
      # parent_configuration_spec.yaml.
      # Specifically, this allows for querying the state of the Inventory
      # product.
      class Interface
        include Contrast::Components::ComponentBase

        def enabled?
          @_enabled = !false?(::Contrast::CONFIG.root.inventory.enable) if @_enabled.nil?
          @_enabled
        end

        def analyze_libraries?
          @_analyze_libraries = !false?(::Contrast::CONFIG.root.inventory.analyze_libraries) if @_analyze_libraries.nil?
          @_analyze_libraries
        end

        def tags
          ::Contrast::CONFIG.root.inventory&.tags
        end
      end
    end
  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
contrast-agent-6.4.0 lib/contrast/components/inventory.rb
contrast-agent-6.3.0 lib/contrast/components/inventory.rb
contrast-agent-6.2.0 lib/contrast/components/inventory.rb
contrast-agent-6.1.2 lib/contrast/components/inventory.rb
contrast-agent-6.1.1 lib/contrast/components/inventory.rb
contrast-agent-6.1.0 lib/contrast/components/inventory.rb
contrast-agent-6.0.0 lib/contrast/components/inventory.rb
contrast-agent-5.3.0 lib/contrast/components/inventory.rb
contrast-agent-5.2.0 lib/contrast/components/inventory.rb
contrast-agent-5.1.0 lib/contrast/components/inventory.rb
contrast-agent-5.0.0 lib/contrast/components/inventory.rb