Class: DBus::IntrospectXMLParser::NokogiriParser
- Inherits:
-
AbstractXML
- Object
- AbstractXML
- DBus::IntrospectXMLParser::NokogiriParser
- Defined in:
- lib/dbus/xml.rb
Defined Under Namespace
Classes: NokogiriNode
Instance Method Summary collapse
- #each(path, &block) ⇒ Object
-
#initialize(xml) ⇒ NokogiriParser
constructor
A new instance of NokogiriParser.
Methods inherited from AbstractXML
Constructor Details
#initialize(xml) ⇒ NokogiriParser
Returns a new instance of NokogiriParser.
73 74 75 76 |
# File 'lib/dbus/xml.rb', line 73 def initialize(xml) super() @doc = Nokogiri.XML(xml) end |
Instance Method Details
#each(path, &block) ⇒ Object
78 79 80 |
# File 'lib/dbus/xml.rb', line 78 def each(path, &block) @doc.search("//#{path}").each { |node| block.call NokogiriNode.new(node) } end |