simple-serializer 0.1.0 → 0.1.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: 1e30b7fbaaea00bdf1e3f5bbf2d92badbd7cd3ce52fa42e726de1a07808f0111
4
- data.tar.gz: 634f28c41963af5a4185f2795ac659a8e5ac1efa1d61ef881ee11386b4b7de0d
3
+ metadata.gz: 670d3babbf2cd6977808f532931b51db54c8cb286042c62c3a3e84a982c7dd76
4
+ data.tar.gz: 41b3d1d2a63cd2a58eab3d25a72df0dcbc4f1f3c6d8a84f51e542adb17f77b30
5
5
  SHA512:
6
- metadata.gz: 5cc991cf2ad27a95c6cda224480b35d64760737eff917b54389f92ae0ce4f40a64de6dfe7bb1871ec4f4984a93e5901ece1e04b15d86ba56dfc2ce06046c6b67
7
- data.tar.gz: 0a4cc2c36a615f33e7b3bab707f210b1a6b086faee991b9e01847958b1a6c0d62e268cdee772e22262ac9b6049950fd23631d38117e4b34d9bfd4b76a8187d60
6
+ metadata.gz: ff837e94c46c51afa396c831eb209c5f7ce5ce4920544bb3ed884a85669dd9614375c0def0b9caac37c618645454f3cb751c5869beba9a28d70b2a7ddd8c6621
7
+ data.tar.gz: ba4bab5946f3a492b4fddd5318df11364dd4f4cdf853411130b145bcbc637a57c5b6afb0452bb68019169aa0c43cf10b8ee8bee602a15c374449d56cb4af636e
@@ -0,0 +1,3 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'simple_serializer'
@@ -1,5 +1,7 @@
1
+ # frozen_string_literal: true
2
+
1
3
  class SimpleSerializer
2
- VERSION = '0.1.0'
4
+ VERSION = '0.1.1'
3
5
 
4
6
  def initialize(object)
5
7
  @object = object
@@ -78,7 +80,7 @@ class SimpleSerializer
78
80
  def nest(result)
79
81
  serializable = result.respond_to?(:serializer_class)
80
82
  serializable_array = result.is_a?(Enumerable) &&
81
- result.first.respond_to?(:serializer_class)
83
+ result.first.respond_to?(:serializer_class)
82
84
 
83
85
  return result.serializer_class.to_h(result) if serializable
84
86
  return result.first.serializer_class.to_h(result) if serializable_array
@@ -86,4 +88,3 @@ class SimpleSerializer
86
88
  result
87
89
  end
88
90
  end
89
-
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: simple-serializer
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mikhail Slyusarev
@@ -45,7 +45,8 @@ executables: []
45
45
  extensions: []
46
46
  extra_rdoc_files: []
47
47
  files:
48
- - lib/serializer.rb
48
+ - lib/simple-serializer.rb
49
+ - lib/simple_serializer.rb
49
50
  homepage: https://github.com/mikhailvs/simple-serializer
50
51
  licenses:
51
52
  - MIT