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.



94
95
96
97
# File 'lib/dbus/xml.rb', line 94

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

Instance Method Details

#each(path, &block) ⇒ Object



99
100
101
# File 'lib/dbus/xml.rb', line 99

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