class OpenscapParser::TestResult
Public Instance Methods
benchmark_id()
click to toggle source
# File lib/openscap_parser/test_result.rb, line 37 def benchmark_id @benchmark_id ||= parsed_xml.at_xpath('benchmark') && parsed_xml.at_xpath('benchmark')['id'] || '' end
end_time()
click to toggle source
# File lib/openscap_parser/test_result.rb, line 55 def end_time @end_time ||= DateTime.parse(parsed_xml['end-time']) end
identity()
click to toggle source
# File lib/openscap_parser/test_result.rb, line 27 def identity @identity ||= parsed_xml.at_xpath('identity') && parsed_xml.at_xpath('identity').text || '' end
platform_nodes()
click to toggle source
# File lib/openscap_parser/test_result.rb, line 18 def platform_nodes @platform_nodes ||= parsed_xml.xpath('platform') end
profile_id()
click to toggle source
# File lib/openscap_parser/test_result.rb, line 32 def profile_id @profile_id ||= parsed_xml.at_xpath('profile') && parsed_xml.at_xpath('profile')['idref'] || '' end
score()
click to toggle source
# File lib/openscap_parser/test_result.rb, line 46 def score @score ||= parsed_xml.at_xpath('score') && parsed_xml.at_xpath('score').text.to_f end
set_value_nodes()
click to toggle source
# File lib/openscap_parser/test_result.rb, line 42 def set_value_nodes @set_value_nodes ||= parsed_xml.xpath('set-value') end
start_time()
click to toggle source
# File lib/openscap_parser/test_result.rb, line 51 def start_time @start_time ||= DateTime.parse(parsed_xml['start-time']) end
target()
click to toggle source
# File lib/openscap_parser/test_result.rb, line 8 def target @target ||= parsed_xml.at_xpath('target') && parsed_xml.at_xpath('target').text || '' end
Also aliased as: host
target_fact_nodes()
click to toggle source
# File lib/openscap_parser/test_result.rb, line 14 def target_fact_nodes @target_fact_nodes ||= parsed_xml.xpath('target-facts/fact') end
title()
click to toggle source
# File lib/openscap_parser/test_result.rb, line 22 def title @title ||= parsed_xml.at_xpath('title') && parsed_xml.at_xpath('title').text || '' end