Class: OpenscapParser::RuleIdentifier

Inherits:
XmlNode
  • Object
show all
Defined in:
lib/openscap_parser/rule_identifier.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

#labelObject



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

def label
  @label ||= @parsed_xml && @parsed_xml.text
end

#systemObject



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

def system
  @system ||= @parsed_xml && @parsed_xml['system']
end

#to_hObject



14
15
16
17
18
19
# File 'lib/openscap_parser/rule_identifier.rb', line 14

def to_h
  {
    :label => label,
    :system => system
  }
end