class OpenscapParser::Profile
Public Instance Methods
description()
click to toggle source
# File lib/openscap_parser/profile.rb, line 17 def description @description ||= @parsed_xml.at_css('description') && @parsed_xml.at_css('description').text end
extends_profile_id()
click to toggle source
# File lib/openscap_parser/profile.rb, line 7 def extends_profile_id @extends ||= @parsed_xml['extends'] end
id()
click to toggle source
# File lib/openscap_parser/profile.rb, line 3 def id @id ||= @parsed_xml['id'] end
selected_rule_ids()
click to toggle source
# File lib/openscap_parser/profile.rb, line 22 def selected_rule_ids @selected_rule_ids ||= @parsed_xml.xpath("select[@selected='true']/@idref") && @parsed_xml.xpath("select[@selected='true']/@idref").map(&:text) end
set_values()
click to toggle source
# File lib/openscap_parser/profile.rb, line 27 def set_values @set_values ||= @parsed_xml.xpath("set-value") && @parsed_xml.xpath("set-value").map do |set_value| [set_value['idref'], set_value.text] end.to_h end
title()
click to toggle source
# File lib/openscap_parser/profile.rb, line 11 def title @title ||= @parsed_xml.at_css('title') && @parsed_xml.at_css('title').text end
Also aliased as: name
to_h()
click to toggle source
# File lib/openscap_parser/profile.rb, line 34 def to_h { :id => id, :title => title, :description => description } end