Class: OpenSCAP::Xccdf::RuleResult
- Inherits:
-
Object
- Object
- OpenSCAP::Xccdf::RuleResult
- Defined in:
- lib/openscap/xccdf/ruleresult.rb
Instance Method Summary collapse
- #destroy ⇒ Object
- #id ⇒ Object
-
#initialize(t) ⇒ RuleResult
constructor
A new instance of RuleResult.
- #override!(param) ⇒ Object
- #result ⇒ Object
Constructor Details
#initialize(t) ⇒ RuleResult
Returns a new instance of RuleResult.
18 19 20 21 22 23 24 25 |
# File 'lib/openscap/xccdf/ruleresult.rb', line 18 def initialize(t) case t when FFI::Pointer @rr = t else fail OpenSCAP::OpenSCAPError, "Cannot initialize TestResult with #{t}" end end |
Instance Method Details
#destroy ⇒ Object
47 48 49 |
# File 'lib/openscap/xccdf/ruleresult.rb', line 47 def destroy OpenSCAP.xccdf_rule_result_free @rr end |
#id ⇒ Object
27 28 29 |
# File 'lib/openscap/xccdf/ruleresult.rb', line 27 def id OpenSCAP.xccdf_rule_result_get_idref @rr end |
#override!(param) ⇒ Object
36 37 38 39 40 41 42 43 44 45 |
# File 'lib/openscap/xccdf/ruleresult.rb', line 36 def override!(param) validate_xccdf_result! param[:new_result] t = OpenSCAP::Text.new t.text = param[:raw_text] unless OpenSCAP.xccdf_rule_result_override(@rr, OpenSCAP::XccdfResult[param[:new_result]], param[:time], param[:authority], t.raw) OpenSCAP.raise! end end |