k_builder 0.0.26 → 0.0.27
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/k_builder/data_helper.rb +4 -2
- data/lib/k_builder/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ad123a63da5538fbf3c598f39f6af371760f01dcd90320f7d4c43cfa081c2a04
|
4
|
+
data.tar.gz: b851793f9e4716209fc5a49183d4bb49257e71648515a0dfb4c185581adbd604
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1f528ed1fecbc4776e7a5315d844207bb819e9cda4a4b43ff508ccbaf56e4b1e844f53824f50857a57051b8d5b5c8f7b3aeea0528767cb2dd809e1b55c2077cf
|
7
|
+
data.tar.gz: 38f600a8f7016f6f8aed25b5745122efd8b1e7e3f10a77d47a56cee3b54b2885ac7f563f8e1bba1d3ee17ef00fda870b98764ff858e256b47835dfc55e034dbb
|
@@ -40,11 +40,13 @@ module KBuilder
|
|
40
40
|
|
41
41
|
data.each_pair.with_object({}) do |(key, value), hash|
|
42
42
|
case value
|
43
|
-
when OpenStruct
|
43
|
+
when OpenStruct, Struct, Hash
|
44
44
|
hash[key] = struct_to_hash(value)
|
45
45
|
when Array
|
46
46
|
# No test yet
|
47
|
-
values = value.map
|
47
|
+
values = value.map do |v|
|
48
|
+
v.is_a?(OpenStruct) || v.is_a?(Struct) || v.is_a?(Hash) ? struct_to_hash(v) : v
|
49
|
+
end
|
48
50
|
hash[key] = values
|
49
51
|
else
|
50
52
|
hash[key] = value
|
data/lib/k_builder/version.rb
CHANGED