chronicle-core 0.2.0 → 0.2.1
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
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0f8a25629577c83f71a66b2451f2858cad759e9ace5547e8f9add4eb11be8771
|
4
|
+
data.tar.gz: 978d36a75ebdb775b86698afd5f8f7659dc64b9d993b2046f45aaf979ca52549
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6aff817c68c5d0795389456eafe32aa791f0dd45a3998bb8101a443dc7681b5aaaa719a0de4694c4af001eec98b66b81fffc24f4ed874d089e1951a1ae3d42b6
|
7
|
+
data.tar.gz: 362d898e479fe85e629abf911e034d4c56236ef95e21b1000f2c839a12fc8d87b028f765bba661856c65bd77020e8f557ee29780df071a644829e26ea2e3d080
|
@@ -1,7 +1,15 @@
|
|
1
1
|
module Chronicle::Serialization
|
2
2
|
class HashSerializer < Chronicle::Serialization::Serializer
|
3
3
|
def serializable_hash
|
4
|
-
@record.
|
4
|
+
@record.properties.transform_values do |v|
|
5
|
+
if v.is_a?(Array)
|
6
|
+
v.map{|record| HashSerializer.new(record).serializable_hash}
|
7
|
+
elsif v.is_a?(Chronicle::Schema::Base)
|
8
|
+
HashSerializer.new(v).serializable_hash
|
9
|
+
else
|
10
|
+
v
|
11
|
+
end
|
12
|
+
end
|
5
13
|
end
|
6
14
|
end
|
7
15
|
end
|