class OpenscapParser::TestResult
Public Instance Methods
benchmark_id()
click to toggle source
# File lib/openscap_parser/test_result.rb, line 39 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 57 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 29 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 20 def platform_nodes @platform_nodes ||= parsed_xml.xpath('platform') end
profile_id()
click to toggle source
# File lib/openscap_parser/test_result.rb, line 34 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 48 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 44 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 53 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 10 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 16 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 24 def title @title ||= parsed_xml.at_xpath('title') && parsed_xml.at_xpath('title').text || '' end