rexle 0.9.1 → 0.9.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/lib/rexle.rb +4 -4
- metadata +1 -1
data/lib/rexle.rb
CHANGED
@@ -140,7 +140,7 @@ class Rexle
|
|
140
140
|
return @value
|
141
141
|
else
|
142
142
|
attribute = xpath_value[/^attribute::(.*)/,1]
|
143
|
-
return @attributes[attribute] if attribute and @attributes and @attributes.has_key?(attribute)
|
143
|
+
return @attributes[attribute.to_sym] if attribute and @attributes and @attributes.has_key?(attribute.to_sym)
|
144
144
|
|
145
145
|
s = a_path.shift
|
146
146
|
end
|
@@ -238,7 +238,7 @@ class Rexle
|
|
238
238
|
end
|
239
239
|
|
240
240
|
def add_text(s) @value = s; self end
|
241
|
-
def attribute(key) @attributes[key] end
|
241
|
+
def attribute(key) @attributes[key.to_sym] end
|
242
242
|
def attributes() @attributes end
|
243
243
|
def children() @child_elements end
|
244
244
|
def children=(a) @child_elements = a end
|
@@ -384,8 +384,8 @@ class Rexle
|
|
384
384
|
|
385
385
|
if condition[/^@/] then
|
386
386
|
attribute = condition[/@(.*)/,1]
|
387
|
-
if h and h.has_key? attribute then
|
388
|
-
rlist << h[attribute]
|
387
|
+
if h and h.has_key? attribute.to_sym then
|
388
|
+
rlist << h[attribute.to_sym]
|
389
389
|
end
|
390
390
|
else
|
391
391
|
rlist << x if h and eval(attr_search)
|