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
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 27 def to_h { :id => id, :title => title, :description => description } end