Class: ComplianceEngine::Check
- 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
-
#hiera ⇒ Hash
Returns the Puppet class parameters of the check.
-
#remediation ⇒ Hash
Returns the remediation data of the check.
-
#settings ⇒ Hash
Returns the settings of the check.
-
#type ⇒ String
Returns the type of the check.
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
#hiera ⇒ Hash
Returns 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 |
#remediation ⇒ Hash
Returns the remediation data of the check
35 36 37 |
# File 'lib/compliance_engine/check.rb', line 35 def remediation element['remediation'] end |
#settings ⇒ Hash
Returns the settings of the check
10 11 12 |
# File 'lib/compliance_engine/check.rb', line 10 def settings element['settings'] end |
#type ⇒ String
Returns the type of the check
28 29 30 |
# File 'lib/compliance_engine/check.rb', line 28 def type element['type'] end |