class OpenscapParser::TestResult

Public Instance Methods

benchmark_id() click to toggle source
# File lib/openscap_parser/test_result.rb, line 40
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 58
def end_time
  @end_time ||= DateTime.parse(parsed_xml['end-time'])
end
host()
Alias for: target
identity() click to toggle source
# File lib/openscap_parser/test_result.rb, line 30
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 21
def platform_nodes
  @platform_nodes ||= parsed_xml.xpath('platform')
end
profile_id() click to toggle source
# File lib/openscap_parser/test_result.rb, line 35
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 49
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 45
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 54
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 11
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 17
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 25
def title
  @title ||= parsed_xml.at_xpath('title') &&
    parsed_xml.at_xpath('title').text || ''
end