rexle 1.3.22 → 1.3.23
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- checksums.yaml.gz.sig +0 -0
- data.tar.gz.sig +0 -0
- data/lib/rexle.rb +9 -11
- metadata +1 -1
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a6c5957458176112c174e906f22b66b4bcf89491
|
4
|
+
data.tar.gz: d90e7b7fab6073f713389f5322bb77e9360f4051
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0dfd23f375e064a7fb3521c72e8c9d2797f39199aff63921fc9220ef345c37c30e51a62efa06798a73d9edc174956b70de7c068738e762099efb6bea61b56142
|
7
|
+
data.tar.gz: 494fef4519f78b160ba8ffb9e8cc99246b1c8e30626c40d65e440b0e22043dce2a36cf7add7c694b34a4e8fd25949c23f9a3e726d73afb0b0331d24fa727db52
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data.tar.gz.sig
CHANGED
Binary file
|
data/lib/rexle.rb
CHANGED
@@ -14,8 +14,6 @@ require 'backtrack-xpath'
|
|
14
14
|
|
15
15
|
# 21-Apr-2016: feature: The xpath() method now returns a Rexle::Recordset object
|
16
16
|
# which itself can be treat as a Rexle document
|
17
|
-
# feature: The element index can now be used through an
|
18
|
-
# xpath block parameter
|
19
17
|
# An xpath predicate can now contain the mod operator as well as
|
20
18
|
# containing nested logic e.g. [(position() mod 2) == 1]
|
21
19
|
# 16-Apr-2016: improvement: The HTML element div is no longer printed as
|
@@ -1149,7 +1147,7 @@ class Rexle
|
|
1149
1147
|
r6
|
1150
1148
|
else
|
1151
1149
|
|
1152
|
-
block_given? ? blk.call(e
|
1150
|
+
block_given? ? blk.call(e) : e
|
1153
1151
|
end
|
1154
1152
|
|
1155
1153
|
end
|
@@ -1157,21 +1155,21 @@ class Rexle
|
|
1157
1155
|
def attribute_search(attr_search, e, h, i=nil, &blk)
|
1158
1156
|
|
1159
1157
|
r2 = if attr_search.is_a? Fixnum then
|
1160
|
-
block_given? ? blk.call(e
|
1158
|
+
block_given? ? blk.call(e) : e if i == attr_search
|
1161
1159
|
elsif attr_search[/i\s(?:<|>|==|%)\s\d+/] and eval(attr_search) then
|
1162
|
-
block_given? ? blk.call(e
|
1160
|
+
block_given? ? blk.call(e) : e
|
1163
1161
|
elsif h and !h.empty? and attr_search[/^h\[/] and eval(attr_search) then
|
1164
|
-
block_given? ? blk.call(e
|
1162
|
+
block_given? ? blk.call(e) : e
|
1165
1163
|
elsif attr_search[/^\(name ==/] and e.child_elements.select {|x|
|
1166
1164
|
next unless x.is_a? Rexle::Element
|
1167
1165
|
name, attributes, value = x.name, x.attributes, x.value.to_s
|
1168
1166
|
b = eval(attr_search)
|
1169
1167
|
b}.length > 0
|
1170
1168
|
|
1171
|
-
block_given? ? blk.call(e
|
1169
|
+
block_given? ? blk.call(e) : e
|
1172
1170
|
|
1173
1171
|
elsif attr_search[/^\(name ==/] and eval(attr_search)
|
1174
|
-
block_given? ? blk.call(e
|
1172
|
+
block_given? ? blk.call(e) : e
|
1175
1173
|
elsif attr_search[/^e\.value/]
|
1176
1174
|
|
1177
1175
|
v = attr_search[/[^\s]+$/]
|
@@ -1179,12 +1177,12 @@ class Rexle
|
|
1179
1177
|
attr_search.sub!(/^e.value/,'e.value.' + duck_type)
|
1180
1178
|
|
1181
1179
|
if eval(attr_search) then
|
1182
|
-
block_given? ? blk.call(e
|
1180
|
+
block_given? ? blk.call(e) : e
|
1183
1181
|
end
|
1184
1182
|
elsif attr_search[/e\.xpath/] and eval(attr_search)
|
1185
|
-
block_given? ? blk.call(e
|
1183
|
+
block_given? ? blk.call(e) : e
|
1186
1184
|
elsif attr_search[/^\w+\(/] and e.element(attr_search)
|
1187
|
-
block_given? ? blk.call(e
|
1185
|
+
block_given? ? blk.call(e) : e
|
1188
1186
|
end
|
1189
1187
|
|
1190
1188
|
r2
|
metadata
CHANGED
metadata.gz.sig
CHANGED
Binary file
|