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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 0bec2a24766ede363dd2e2b9cb9548b8640ad836
4
- data.tar.gz: 20324100b83396ac7e714d7abd357fd58011975b
3
+ metadata.gz: 25b8434f164aa4e2628a78c4fa5e294b1c869498
4
+ data.tar.gz: e8c7156c27a25fc5cea2e412d0e7dac1ea4a7da1
5
5
  SHA512:
6
- metadata.gz: 46863e6d945fbcda5aae331806c5d8a34fd0b34b119184eea726e3e8f0610a0d21638da86a70d7c636e497b444cbc0ed0523135a3f1474b40047da514e62e8f4
7
- data.tar.gz: e52be1b01911396b4955e2639b7ce520ad699d4ec7053ff5bf7d1ff167af9bcb30b1463a2d2a693defd50be514214c76881505fc26d0266011c34fb5de01517b
6
+ metadata.gz: 3d702cc22105d9717206b384a24374cd1bbae24d378b14e27800367097101126b3f224cd973862965b2e1aa3f982de14eb461e813427b008cbf1afa4c112cf7c
7
+ data.tar.gz: 34227d46a258030d4ca441b5e9bcddbfb52c0e640eaa88b4697b73657973a2f8c3c0c3b89daace3bfc15b5ae3427c14dded38c3fe7c2b01ec626ffbbfeb120d4
checksums.yaml.gz.sig CHANGED
Binary file
@@ -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
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: polyrex-objects
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.7
4
+ version: 0.9.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - James Robertson
metadata.gz.sig CHANGED
Binary file