rexle 0.9.1 → 0.9.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (2) hide show
  1. data/lib/rexle.rb +4 -4
  2. 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)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rexle
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.1
4
+ version: 0.9.2
5
5
  platform: ruby
6
6
  authors: []
7
7