rexle 0.9.40 → 0.9.41
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.
- data/lib/rexle.rb +6 -1
- metadata +2 -2
data/lib/rexle.rb
CHANGED
|
@@ -10,6 +10,8 @@ require 'cgi'
|
|
|
10
10
|
include REXML
|
|
11
11
|
|
|
12
12
|
# modifications:
|
|
13
|
+
# 11-Aug-2012: bug fix: separated the max() method from 1 line into 3
|
|
14
|
+
# and that fixed it
|
|
13
15
|
# 08-Aug-2012: feature: added Element#insert_before and Element#insert_after
|
|
14
16
|
# 19-Jul-2012: Changed children to elements where appropriate
|
|
15
17
|
# 15-Jul-2012: bug fix: self.root.value is no longer appended
|
|
@@ -166,7 +168,10 @@ class Rexle
|
|
|
166
168
|
length
|
|
167
169
|
end
|
|
168
170
|
|
|
169
|
-
def max(path)
|
|
171
|
+
def max(path)
|
|
172
|
+
a = query_xpath(path).flatten.compact.map(&:to_i)
|
|
173
|
+
a.max
|
|
174
|
+
end
|
|
170
175
|
|
|
171
176
|
def name()
|
|
172
177
|
|
metadata
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
name: rexle
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
4
|
prerelease:
|
|
5
|
-
version: 0.9.
|
|
5
|
+
version: 0.9.41
|
|
6
6
|
platform: ruby
|
|
7
7
|
authors:
|
|
8
8
|
- James Robertson
|
|
@@ -10,7 +10,7 @@ autorequire:
|
|
|
10
10
|
bindir: bin
|
|
11
11
|
cert_chain: []
|
|
12
12
|
|
|
13
|
-
date: 2012-08-
|
|
13
|
+
date: 2012-08-11 00:00:00 Z
|
|
14
14
|
dependencies:
|
|
15
15
|
- !ruby/object:Gem::Dependency
|
|
16
16
|
name: rexleparser
|