rexle 1.3.22 → 1.3.23

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 5859ab26778f60354c699ca00884fe003b8701ba
4
- data.tar.gz: d937cbc44b7760eb192d7dbf600eca832f8f6be1
3
+ metadata.gz: a6c5957458176112c174e906f22b66b4bcf89491
4
+ data.tar.gz: d90e7b7fab6073f713389f5322bb77e9360f4051
5
5
  SHA512:
6
- metadata.gz: 9c86d4f2cda3b03ef41ea38aac2784df50332aae2e6195e5af09f275850c022835f6ff73b0ca4a95ed963b9af6ab83936df7998db5d8848e6cbf8f444dda9e80
7
- data.tar.gz: dedcbd5c2afd5eae4381ff8dfceb3d16accd784adea2596233a2fdd6a30331bc5017c32b453c8f7ae9ba507f24f27e74881ff87ebfbdf1154a94f5ad3330fff3
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, i) : 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,i) : e if i == attr_search
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,i) : 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,i) : 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,i) : 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,i) : 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,i) : 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,i) : 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,i) : e
1185
+ block_given? ? blk.call(e) : e
1188
1186
  end
1189
1187
 
1190
1188
  r2
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: 1.3.22
4
+ version: 1.3.23
5
5
  platform: ruby
6
6
  authors:
7
7
  - James Robertson
metadata.gz.sig CHANGED
Binary file