rexle 0.6.6 → 0.6.7
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/rexle.rb +5 -1
- metadata +2 -2
data/lib/rexle.rb
CHANGED
@@ -185,6 +185,10 @@ class Rexle
|
|
185
185
|
procs[s.class.to_s.to_sym].call(s)
|
186
186
|
end
|
187
187
|
|
188
|
+
def leaf_value(e, path)
|
189
|
+
(path[/\//] ? e.xpath(path).first : e).value
|
190
|
+
end
|
191
|
+
|
188
192
|
def root() self end
|
189
193
|
def text(s='')
|
190
194
|
if s.empty? then
|
@@ -244,7 +248,7 @@ class Rexle
|
|
244
248
|
if x[0] != '.' then
|
245
249
|
"name == '%s' and value %s %s" % [x[0], x[1], x[2]]
|
246
250
|
else
|
247
|
-
"e
|
251
|
+
"leaf_value(e) %s %s" % [x[1], x[2]]
|
248
252
|
end
|
249
253
|
else
|
250
254
|
x
|
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.6.
|
4
|
+
version: 0.6.7
|
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-
|
12
|
+
date: 2010-12-10 00:00:00 +00:00
|
13
13
|
default_executable:
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|