rexle-builder 0.3.5 → 0.3.6
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-builder.rb +9 -3
- 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: d1a051fe6177ff122fdf043cbecea29358307f0c
|
4
|
+
data.tar.gz: fc1c4627afb313ef404c6780029664261293715a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 18208661db796bac88472d4ff82ac424620290c17a57ac73c8162b6320e5ae9d9355077a9f6f2349a6cdd07a4ae227b1f51759e2e15d190d7d26b4ee3b908a87
|
7
|
+
data.tar.gz: c4ad20311322d6c96cb34cd86ba9c5e09267593a2f873f2ce491be1dc478ab5c247371e5f7ebaac75f96f9d360ff76ad29cac79715185504c8bfab8999ca58c3
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data.tar.gz.sig
CHANGED
Binary file
|
data/lib/rexle-builder.rb
CHANGED
@@ -14,13 +14,19 @@ end
|
|
14
14
|
|
15
15
|
class RexleBuilder
|
16
16
|
|
17
|
+
def self.build()
|
18
|
+
|
19
|
+
yield(self.new)
|
20
|
+
|
21
|
+
end
|
22
|
+
|
17
23
|
def initialize(obj=nil)
|
18
24
|
|
19
25
|
@a = []
|
20
26
|
@current_a = @a
|
21
27
|
@namespace = nil
|
22
28
|
|
23
|
-
self.root {
|
29
|
+
self.root { buildx obj} if obj.is_a? Hash
|
24
30
|
end
|
25
31
|
|
26
32
|
def [](s)
|
@@ -67,14 +73,14 @@ class RexleBuilder
|
|
67
73
|
|
68
74
|
# build from a Hash object
|
69
75
|
#
|
70
|
-
def
|
76
|
+
def buildx( h)
|
71
77
|
|
72
78
|
h.each_pair do |key, value|
|
73
79
|
|
74
80
|
if value.is_a? Hash then
|
75
81
|
|
76
82
|
self.send(key.to_sym) do
|
77
|
-
|
83
|
+
buildx value
|
78
84
|
end
|
79
85
|
|
80
86
|
elsif value.is_a? Array
|
metadata
CHANGED
metadata.gz.sig
CHANGED
Binary file
|