Class: OpenscapParser::RuleReference
- Inherits:
-
XmlNode
- Object
- XmlNode
- OpenscapParser::RuleReference
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
Instance Method Details
#href ⇒ Object
6
7
8
|
# File 'lib/openscap_parser/rule_reference.rb', line 6
def href
@href ||= @parsed_xml && @parsed_xml['href']
end
|
#label ⇒ Object
10
11
12
|
# File 'lib/openscap_parser/rule_reference.rb', line 10
def label
@label ||= @parsed_xml && @parsed_xml.text
end
|
#to_h ⇒ Object
14
15
16
17
18
19
|
# File 'lib/openscap_parser/rule_reference.rb', line 14
def to_h
{
href: href,
label: label
}
end
|