seri 1.1.2 → 1.1.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +2 -2
- data/lib/serializer/value_fetcher.rb +2 -2
- data/lib/serializer/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: 077b7ad3ed23af3dda7cda07b5b1a5f381d66d47cbb985b12d2cf295a5b7f3f9
|
4
|
+
data.tar.gz: '009bd546b3a24071c038a2c3fbdfa68c3357481d7716bf7d136cf5d142cbd64f'
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4d8c71c9cb6bdb7b9be38e52207a06ac4cf9503ea54e5a0c361081818b392810dad30fb7a2c68caf3cf4f45e896e54fbe9ad7a8e619d6334909f4fdfb56c66ca
|
7
|
+
data.tar.gz: d3cc4bbdef0bb36404dda99e0985a76840cc6cfbe5c59bfd98d00656b120f10db8c21e077b84ba31e65b6226289b1aa96b8200bc77ac69abe67af7e613d5ed48
|
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
seri (1.
|
4
|
+
seri (1.1.2)
|
5
5
|
appsignal (~> 2.7)
|
6
6
|
oj (~> 3.7)
|
7
7
|
|
@@ -13,7 +13,7 @@ GEM
|
|
13
13
|
ast (2.4.0)
|
14
14
|
diff-lcs (1.3)
|
15
15
|
jaro_winkler (1.5.2)
|
16
|
-
oj (3.7.
|
16
|
+
oj (3.7.12)
|
17
17
|
parallel (1.17.0)
|
18
18
|
parser (2.6.2.1)
|
19
19
|
ast (~> 2.4.0)
|
@@ -28,7 +28,7 @@ class ValueFetcher
|
|
28
28
|
|
29
29
|
return value unless serializer
|
30
30
|
|
31
|
-
if
|
31
|
+
if array?
|
32
32
|
value.map { |item| serializer.new(item).to_h }
|
33
33
|
else
|
34
34
|
serializer.new(value).to_h
|
@@ -53,7 +53,7 @@ class ValueFetcher
|
|
53
53
|
end
|
54
54
|
end
|
55
55
|
|
56
|
-
def
|
56
|
+
def array?
|
57
57
|
ARRAYS.any? { |match| value.class.to_s.end_with?(match) }
|
58
58
|
end
|
59
59
|
end
|
data/lib/serializer/version.rb
CHANGED