polyrex-schema 0.5.0 → 0.5.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-schema.rb +8 -1
- 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: 368993cccc3c77ad136457f27c735c653bfb526c
|
4
|
+
data.tar.gz: bb50eec2268c13501fd8099983e8a2576a9c5490
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3adba93c4174c0e1a793bf4cfb53e3afe04d077d19e5c5495b9faa8502b92570c145d89e83cd713bb102de2d40d8d1011b5431e2ce5e884100b9c274c3253a1b
|
7
|
+
data.tar.gz: 51175f0b64bf57ce5c0b5ecb26bb60a49eae8fd60b8e7a38f62da51b38f3123f349d7bcda8463fbf5812b82ce8cb8d13bb01bb431cf493901774150e5e395153
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data.tar.gz.sig
CHANGED
Binary file
|
data/lib/polyrex-schema.rb
CHANGED
@@ -31,7 +31,14 @@ class PolyrexSchema
|
|
31
31
|
a = [s[/^[^\[]+/], *s[/(?<=\[)[^\]]+/].split(/ *, */)].map(&:to_sym)
|
32
32
|
@to_a = [a]
|
33
33
|
|
34
|
-
|
34
|
+
h2 = {
|
35
|
+
format_mask: a[1..-1].map {|x| "[!%s]" % x }.join(' '),
|
36
|
+
schema: "%s[%s]" % [a[0], a[1..-1].join(', ')],
|
37
|
+
recordx_type: 'polyrex'
|
38
|
+
}
|
39
|
+
|
40
|
+
h = {a[0] => {summary: a[1..-1]\
|
41
|
+
.zip(Array.new(a.length-1)).to_h.merge(h2),
|
35
42
|
records: nil }}
|
36
43
|
@to_doc = Rexle.new(RexleBuilder.new(h).to_a)
|
37
44
|
end
|
metadata
CHANGED
metadata.gz.sig
CHANGED
Binary file
|