seri 1.0.1 → 1.0.2

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: 313e5ba332dabfed3cfa91812dad1a31858e2d49c54d7ae78746ca6772503954
4
- data.tar.gz: 443d592e2055c07140d346e4ddc6578c44f41aabc65ca8e05881d781577a1319
3
+ metadata.gz: 5adc32c82dea64e690e2a39b2b2dd1cbfc5bcd8816a8d34d271cd14d71edfd95
4
+ data.tar.gz: 5415cb4b3ac84b365ad4dd34bb81dc3d3edc9d12697556b31078d74bc4a574c8
5
5
  SHA512:
6
- metadata.gz: 8e0c1fb217114e5b53d6cac78ace2e432665fbeb822176694184a0cb0402bb631aa474fa4980a363c81c72513f169efd6881be4d548546b44e21f01b025c74e2
7
- data.tar.gz: 5f4db42c99d1320eaac033fd582426277d79d102487752d29b1c1c1d4bbb22c0e4d5ef1529b0688e1196e26584e93150004959106cde7834285fdb2f4b9cb0e3
6
+ metadata.gz: 567a40baa057f07add6ad38aedaf6f04303e93a67d41e056a30f25adbd2ccb3580af5270f5ae15c6daf7db805f383aef191b1bd2754150f43965206073e688cc
7
+ data.tar.gz: aa5d0a9a533845d21dd9fc9a9e7538eed5bc88bbb06b361cb0ce6454f9ce32f14a990e2b9e8425061068a0970d049529d5dcddea3118a2759f66ac1d5afe17fd
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- seri (1.0.0)
4
+ seri (1.0.2)
5
5
  appsignal (~> 2.7)
6
6
  oj (~> 3.7)
7
7
 
@@ -1,3 +1,3 @@
1
1
  class Serializer
2
- VERSION = '1.0.1'.freeze
2
+ VERSION = '1.0.2'.freeze
3
3
  end
data/lib/serializer.rb CHANGED
@@ -48,14 +48,12 @@ class Serializer
48
48
  value = extract_value(attribute)
49
49
  serializer = attribute.serializer
50
50
 
51
- if serializer
52
- if ARRAYS.any? { |match| value.class.to_s.end_with?(match) }
53
- value.map { |v| serializer.new(v).to_h }
54
- else
55
- serializer.new(value).to_h
56
- end
51
+ return value unless serializer
52
+
53
+ if ARRAYS.any? { |match| value.class.to_s.end_with?(match) }
54
+ value.map { |v| serializer.new(v).to_h }
57
55
  else
58
- value
56
+ serializer.new(value).to_h
59
57
  end
60
58
  end
61
59
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: seri
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.1
4
+ version: 1.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - grdw