polyrex-builder 0.1.0 → 0.1.1
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/polyrex-builder.rb +5 -4
- 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: 47731237aee978abd6caa13226746196bddb00ca
|
4
|
+
data.tar.gz: 0f811f969359a75cd03b5f6b8feb535d38a0a24f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2ae1113ec4d3755d59c0196a318e779c404688f9fdc5a519e632a17a107b43b238772a4fdefb01f68aef20b6e3f7d2c4bcbee6d71560d6702b96e5bea5f22145
|
7
|
+
data.tar.gz: 37fed163a3542081d63ed026c14ab20e1e403ec43f8f1c202730cac1cf02a3c2d733e96d69990ecf5a89ed3e1aba4bd0002bf3def9461171b16515f8e2df6db1
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data.tar.gz.sig
CHANGED
Binary file
|
data/lib/polyrex-builder.rb
CHANGED
@@ -9,13 +9,14 @@ require 'rexle-builder'
|
|
9
9
|
|
10
10
|
class PolyrexBuilder
|
11
11
|
|
12
|
-
def initialize(rows=[], parents: [])
|
12
|
+
def initialize(rows=[], parents: [], summary: {}, rootname: 'items')
|
13
13
|
|
14
14
|
records = rows.map {|x| pxify(x, parents) }
|
15
15
|
|
16
|
-
|
16
|
+
summary.merge!({recordx_type: 'polyrex'})
|
17
|
+
h = {rootname.to_sym => {summary: summary, records: records }}
|
17
18
|
|
18
|
-
@a = RexleBuilder.new(h).to_a
|
19
|
+
@a = RexleBuilder.new(h).to_a[3]
|
19
20
|
|
20
21
|
end
|
21
22
|
|
@@ -52,4 +53,4 @@ class PolyrexBuilder
|
|
52
53
|
{name => record}
|
53
54
|
end
|
54
55
|
|
55
|
-
end
|
56
|
+
end
|
metadata
CHANGED
metadata.gz.sig
CHANGED
Binary file
|