simply_serializable 1.4.0 → 1.4.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/lib/simply_serializable/mixin.rb +4 -1
- data/lib/simply_serializable/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: adb38d8e9d6729fa9e19de685b9f4f02589cd5bb62c7bd21308e76bba3fc3528
|
4
|
+
data.tar.gz: eed2b75138cc3c6737c05af4834c8f4467000e15d0c6783100613b6f7b5fb596
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: be5b0182bc04138f03c2ba693312386b481946308a886bdcdfac2878622abdb73de4bc60ef5b7ef9b02201f08af32c00a65abdc3764f0ef389d2dfccb2fd3376
|
7
|
+
data.tar.gz: e3f7066504a6ad0b080f38be16866eb3c5fb2e975ccc237cd2d111c87316fd87256f24c3cc98fb272045f8e97e6fe1f1294cc307a3634b6de1365ecb256bcfe0
|
data/Gemfile.lock
CHANGED
@@ -8,8 +8,9 @@ module SimplySerializable
|
|
8
8
|
super(subclass)
|
9
9
|
end
|
10
10
|
|
11
|
-
def serialize(attributes: [], except: nil, only: nil)
|
11
|
+
def serialize(attributes: [], except: nil, only: nil, **keywords)
|
12
12
|
serializable_config[:attributes] = serializable_config[:attributes] |= attributes
|
13
|
+
|
13
14
|
unless except.nil?
|
14
15
|
serializable_config[:except] ||= []
|
15
16
|
serializable_config[:except] = serializable_config[:except] |= except
|
@@ -19,6 +20,8 @@ module SimplySerializable
|
|
19
20
|
serializable_config[:only] ||= []
|
20
21
|
serializable_config[:only] = serializable_config[:only] |= only
|
21
22
|
end
|
23
|
+
|
24
|
+
serializable_config.merge!(keywords)
|
22
25
|
end
|
23
26
|
|
24
27
|
def serializable_config
|