Class: ComplianceEngine::Check

Inherits:
Component show all
Defined in:
lib/compliance_engine/check.rb

Overview

A compliance engine data check

Instance Attribute Summary

Attributes inherited from Component

#component, #enforcement_tolerance, #environment_data, #facts

Instance Method Summary collapse

Methods inherited from Component

#[], #add, #ces, #controls, #description, #identifiers, #initialize, #invalidate_cache, #key, #oval_ids, #title, #to_a, #to_h

Constructor Details

This class inherits a constructor from ComplianceEngine::Component

Instance Method Details

#hieraHash

Returns the Puppet class parameters of the check

Returns:

  • (Hash)

    the Puppet class parameters of the check



17
18
19
20
21
22
23
# File 'lib/compliance_engine/check.rb', line 17

def hiera
  return @hiera unless @hiera.nil?

  return @hiera = nil unless type == 'puppet-class-parameter'

  @hiera = { settings['parameter'] => settings['value'] }
end

#remediationHash

Returns the remediation data of the check

Returns:

  • (Hash)

    the remediation data of the check



35
36
37
# File 'lib/compliance_engine/check.rb', line 35

def remediation
  element['remediation']
end

#settingsHash

Returns the settings of the check

Returns:

  • (Hash)

    the settings of the check



10
11
12
# File 'lib/compliance_engine/check.rb', line 10

def settings
  element['settings']
end

#typeString

Returns the type of the check

Returns:

  • (String)

    the type of the check



28
29
30
# File 'lib/compliance_engine/check.rb', line 28

def type
  element['type']
end