Class: OpenscapParser::Sub

Inherits:
XmlNode
  • Object
show all
Defined in:
lib/openscap_parser/sub.rb

Instance Attribute Summary

Attributes inherited from XmlNode

#namespaces

Instance Method Summary collapse

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

#idObject



6
7
8
# File 'lib/openscap_parser/sub.rb', line 6

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

#to_hObject



14
15
16
# File 'lib/openscap_parser/sub.rb', line 14

def to_h
  { :id => id, :text => text, :use => use }
end

#useObject



10
11
12
# File 'lib/openscap_parser/sub.rb', line 10

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