rexle 0.9.73 → 0.9.74
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 +14 -4
- metadata +2 -2
- 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: 590eb51dca93ee47c6f09424ac9c67ac0f93f08d
|
4
|
+
data.tar.gz: e9cd05c97302109a4807d915ca2bfdd814905755
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2c44f01716888432242b46d564e4d9ffdc662e6dcfa799f7bf2d32997f973f9b653fcb5f9facbfbcca5e2611d07f2635c56a095f4f464a127271864d8b77fad0
|
7
|
+
data.tar.gz: b30abeb74306a72468277b68bbb9538b6746a49929ef96646adccd681340fa852c927afae3e60c47a1d4ec19a6ac43e08458b0364a23154d77df794cd7f84673
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data.tar.gz.sig
CHANGED
Binary file
|
data/lib/rexle.rb
CHANGED
@@ -10,6 +10,7 @@ require 'cgi'
|
|
10
10
|
include REXML
|
11
11
|
|
12
12
|
# modifications:
|
13
|
+
# 30-jul-2013: feature: Rexle::Element#xml now accepts an xpath
|
13
14
|
# 25-jun-2013: bug fix: doc.root.delete(xpath) fixed
|
14
15
|
# 10-Nov-2012: Elements can now be added starting from an empty document
|
15
16
|
# 06-Nov-2012: additional xpath predicate now implemented e.g.
|
@@ -179,7 +180,7 @@ class Rexle
|
|
179
180
|
|
180
181
|
end
|
181
182
|
|
182
|
-
end
|
183
|
+
end
|
183
184
|
|
184
185
|
def xpath(path, &blk)
|
185
186
|
@doc.xpath(path, &blk)
|
@@ -583,9 +584,18 @@ class Rexle
|
|
583
584
|
end
|
584
585
|
|
585
586
|
def xml(options={})
|
586
|
-
|
587
|
-
|
588
|
-
|
587
|
+
h = {
|
588
|
+
Hash: lambda {|x|
|
589
|
+
o = {pretty: false}.merge(x)
|
590
|
+
msg = o[:pretty] == false ? :doc_print : :doc_pretty_print
|
591
|
+
method(msg).call(self.children)
|
592
|
+
},
|
593
|
+
String: lambda {|x|
|
594
|
+
r = self.element(x)
|
595
|
+
r ? r.xml : ''
|
596
|
+
}
|
597
|
+
}
|
598
|
+
h[options.class.to_s.to_sym].call options
|
589
599
|
end
|
590
600
|
|
591
601
|
alias to_s xml
|
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.9.
|
4
|
+
version: 0.9.74
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- James Robertson
|
@@ -29,7 +29,7 @@ cert_chain:
|
|
29
29
|
EgghkUCgC30KsgaYheoN5ILHCE52JXCfr1Qto26qUSdC49xWkxnQz2yrSq8z085Q
|
30
30
|
h0bKDk/qqjLsNUnSPxhypj3wTgJNdHKX
|
31
31
|
-----END CERTIFICATE-----
|
32
|
-
date: 2013-07-
|
32
|
+
date: 2013-07-30 00:00:00.000000000 Z
|
33
33
|
dependencies:
|
34
34
|
- !ruby/object:Gem::Dependency
|
35
35
|
name: rexleparser
|
metadata.gz.sig
CHANGED
Binary file
|