rexle 0.7.0 → 0.7.1

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 +11 -1
  2. metadata +2 -2
data/lib/rexle.rb CHANGED
@@ -204,6 +204,16 @@ class Rexle
204
204
  end
205
205
  end
206
206
 
207
+ def value=(s)
208
+ @value = s
209
+ a = self.parent.instance_variable_get(:@child_lookup)
210
+ if a then
211
+ i = a.index(a.assoc(@name))
212
+ a[i][-1] = @value
213
+ self.parent.instance_variable_set(:@child_lookup, a)
214
+ end
215
+ end
216
+
207
217
  alias text= value=
208
218
 
209
219
  private
@@ -308,7 +318,7 @@ class Rexle
308
318
  x = raw_element
309
319
  e = @child_elements[x.last]
310
320
  h = x[0][1] # <-- fetch the attributes
311
-
321
+
312
322
  if attr_search then
313
323
  if attr_search.is_a? Fixnum then
314
324
  block_given? ? blk.call(e) : e if i == 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.7.0
4
+ version: 0.7.1
5
5
  platform: ruby
6
6
  authors: []
7
7
 
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2010-12-14 00:00:00 +00:00
12
+ date: 2010-12-18 00:00:00 +00:00
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency