Class: OpenscapParser::Tailoring

Inherits:
XmlNode
  • Object
show all
Includes:
Profiles
Defined in:
lib/openscap_parser/tailoring.rb

Instance Attribute Summary

Attributes inherited from XmlNode

#namespaces

Instance Method Summary collapse

Methods included from Profiles

included

Methods inherited from XmlNode

#initialize, #parsed_xml, #text, #xpath_node, #xpath_nodes

Constructor Details

This class inherits a constructor from OpenscapParser::XmlNode

Instance Method Details

#benchmarkObject



12
13
14
15
# File 'lib/openscap_parser/tailoring.rb', line 12

def benchmark
  @benchmark ||= @parsed_xml.at_xpath('benchmark/@href') &&
    @parsed_xml.at_xpath('benchmark/@href').text
end

#idObject



8
9
10
# File 'lib/openscap_parser/tailoring.rb', line 8

def id
  @id ||= @parsed_xml['id']
end

#versionObject



17
18
19
20
# File 'lib/openscap_parser/tailoring.rb', line 17

def version
  @version ||= @parsed_xml.at_xpath('version') &&
    @parsed_xml.at_xpath('version').text
end

#version_timeObject



22
23
24
25
# File 'lib/openscap_parser/tailoring.rb', line 22

def version_time
  @version_time ||= @parsed_xml.at_xpath('version/@time') &&
    @parsed_xml.at_xpath('version/@time').text
end