Class: OpenscapParser::RegexHandler

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

Instance Attribute Summary

Attributes inherited from XmlNode

#namespaces

Class 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

Class Method Details

.regex(node_set, regex) ⇒ Object



5
6
7
# File 'lib/openscap_parser/regex_handler.rb', line 5

def self.regex node_set, regex
  node_set.find_all { |node| node.to_s =~ /#{regex}/ }
end