polyrex-objects 0.9.7 → 0.9.8
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/lib/polyrex-objects.rb +13 -1
- data.tar.gz.sig +0 -0
- 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: 25b8434f164aa4e2628a78c4fa5e294b1c869498
|
4
|
+
data.tar.gz: e8c7156c27a25fc5cea2e412d0e7dac1ea4a7da1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3d702cc22105d9717206b384a24374cd1bbae24d378b14e27800367097101126b3f224cd973862965b2e1aa3f982de14eb461e813427b008cbf1afa4c112cf7c
|
7
|
+
data.tar.gz: 34227d46a258030d4ca441b5e9bcddbfb52c0e640eaa88b4697b73657973a2f8c3c0c3b89daace3bfc15b5ae3427c14dded38c3fe7c2b01ec626ffbbfeb120d4
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data/lib/polyrex-objects.rb
CHANGED
@@ -61,6 +61,18 @@ class PolyrexObjects
|
|
61
61
|
def deep_clone()
|
62
62
|
self.class.new Rexle.new(self.to_xml).root
|
63
63
|
end
|
64
|
+
|
65
|
+
def each_recursive(parent=self, level=0, &blk)
|
66
|
+
|
67
|
+
parent.records.each.with_index do |x, index|
|
68
|
+
|
69
|
+
blk.call(x, parent, level, index) if block_given?
|
70
|
+
|
71
|
+
each_recursive(x, level+1, &blk) if x.records.any?
|
72
|
+
|
73
|
+
end
|
74
|
+
|
75
|
+
end
|
64
76
|
|
65
77
|
def element(xpath)
|
66
78
|
@node.element(xpath)
|
@@ -358,4 +370,4 @@ EOF
|
|
358
370
|
|
359
371
|
|
360
372
|
|
361
|
-
end
|
373
|
+
end
|
data.tar.gz.sig
CHANGED
Binary file
|
metadata
CHANGED
metadata.gz.sig
CHANGED
Binary file
|