Module: Contrast::Api::Decorators::ServerFeatures

Included in:
Settings::ServerFeatures
Defined in:
lib/contrast/api/decorators/server_features.rb

Overview

Used to decorate the Settings::ServerFeatures protobuf model to handle setting translation to boolean values.

Instance Method Summary collapse

Instance Method Details

#assess_enabled?Boolean

Returns:

  • (Boolean)


17
18
19
# File 'lib/contrast/api/decorators/server_features.rb', line 17

def assess_enabled?
  !!assess.enabled
end

#protect_enabled?Boolean

‘defend’ is legacy for ‘protect’ in the dtm.

Returns:

  • (Boolean)


13
14
15
# File 'lib/contrast/api/decorators/server_features.rb', line 13

def protect_enabled?
  !!defend.enabled
end