Class: OpenscapParser::RuleReference

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

#hrefObject



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

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

#labelObject



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

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

#to_hObject



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

def to_h
  {
    href: href,
    label: label
  }
end