Class: DBus::IntrospectXMLParser::REXMLParser

Inherits:
AbstractXML
  • Object
show all
Defined in:
lib/dbus/xml.rb

Defined Under Namespace

Classes: REXMLNode

Instance Method Summary collapse

Methods inherited from AbstractXML

have_nokogiri?

Constructor Details

#initialize(xml) ⇒ REXMLParser

Returns a new instance of REXMLParser.



86
87
88
# File 'lib/dbus/xml.rb', line 86

def initialize(xml)
  @doc = REXML::Document.new(xml)
end

Instance Method Details

#each(path, &block) ⇒ Object



90
91
92
# File 'lib/dbus/xml.rb', line 90

def each(path, &block)
  @doc.elements.each(path) { |node| block.call REXMLNode.new(node) }
end