simple-serializer 0.1.2 → 0.1.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/simple_serializer.rb +5 -1
- metadata +3 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1ba5dcaebcf6bf2c8800282c3e1ae64ea01d78ecdd32d94312a8316bccd2b48d
|
4
|
+
data.tar.gz: 4fba6505710f93bc55e45a1c7b722744033a6121bdfd51b56bc66499e1779bcc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6393e7a5c842bd51a6503c7545fc8c0080097d5dcd4c78ed0caeb537b90bcdd9091bb041d86a5bf2a83490bd4f5baf808439903f5b31e7f0357471e759d250de
|
7
|
+
data.tar.gz: '08d4604e98b21e84a9d1243577c2e31b145cefa40519e26bd76841a2ac088008d84c95131209a3fe6e64864b915c8dad3fd99b616a9f2dc6a211d09444150380'
|
data/lib/simple_serializer.rb
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
class SimpleSerializer
|
4
|
-
VERSION = '0.1.
|
4
|
+
VERSION = '0.1.3'
|
5
5
|
|
6
6
|
def initialize(object)
|
7
7
|
@object = object
|
@@ -16,6 +16,10 @@ class SimpleSerializer
|
|
16
16
|
class << self
|
17
17
|
attr_reader :fields
|
18
18
|
|
19
|
+
def inherited(sub)
|
20
|
+
sub.instance_variable_set(:@fields, fields.to_h)
|
21
|
+
end
|
22
|
+
|
19
23
|
def helpers
|
20
24
|
serializer = self
|
21
25
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: simple-serializer
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Mikhail Slyusarev
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2020-02-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rspec
|
@@ -66,8 +66,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
66
66
|
- !ruby/object:Gem::Version
|
67
67
|
version: '0'
|
68
68
|
requirements: []
|
69
|
-
|
70
|
-
rubygems_version: 2.7.7
|
69
|
+
rubygems_version: 3.1.2
|
71
70
|
signing_key:
|
72
71
|
specification_version: 4
|
73
72
|
summary: Simple serializer. Easily serialize objects.
|