pangdudu-ruby-dbus 0.2.4.3 → 0.2.4.4
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/dbus/introspect.rb +4 -3
- metadata +1 -1
data/lib/dbus/introspect.rb
CHANGED
@@ -200,7 +200,7 @@ module DBus
|
|
200
200
|
# Creates a new parser for XML data in string _xml_.
|
201
201
|
def initialize(xml)
|
202
202
|
@xml = xml
|
203
|
-
@hpricot =
|
203
|
+
@hpricot = false
|
204
204
|
end
|
205
205
|
|
206
206
|
# Recursively parses the subnodes, constructing the tree.
|
@@ -223,8 +223,9 @@ module DBus
|
|
223
223
|
|
224
224
|
#make it easy to switch
|
225
225
|
def parse
|
226
|
-
parse_rexml unless @hpricot
|
227
|
-
parse_hpricot if @hpricot
|
226
|
+
ret = parse_rexml unless @hpricot
|
227
|
+
ret = parse_hpricot if @hpricot
|
228
|
+
return ret
|
228
229
|
end
|
229
230
|
|
230
231
|
# Parses the XML, constructing the tree, using hpricot
|