Sha256: cb487193c15833e0417e81821ff0916f25fab62c2112e5da575a072310be29f9

Contents?: true

Size: 680 Bytes

Versions: 7

Compression:

Stored size: 680 Bytes

Contents

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

cs__scoped_require 'contrast/utils/string_utils'

module Contrast
  module Api
    module Decorators
      # Used to decorate the ServerFeatures protobuf model to handle setting translation
      module ServerFeatures
        # 'defend' is legacy for 'protect' in the dtm.
        def protect_enabled?
          !!defend.enabled
        end

        def assess_enabled?
          !!assess.enabled
        end
      end
    end
  end
end

Contrast::Api::Settings::ServerFeatures.include(Contrast::Api::Decorators::ServerFeatures)

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
contrast-agent-3.13.2 lib/contrast/api/decorators/server_features.rb
contrast-agent-3.13.1 lib/contrast/api/decorators/server_features.rb
contrast-agent-3.13.0 lib/contrast/api/decorators/server_features.rb
contrast-agent-3.12.2 lib/contrast/api/decorators/server_features.rb
contrast-agent-3.12.1 lib/contrast/api/decorators/server_features.rb
contrast-agent-3.12.0 lib/contrast/api/decorators/server_features.rb
contrast-agent-3.11.0 lib/contrast/api/decorators/server_features.rb