simply_serializable 1.0.0 → 1.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: f0e5cf747f846f0e973a742bad9f9d7a84cf2d38a34934cb0afb699788b5eba0
4
- data.tar.gz: d7a352c4f0b1bdc93aa12f95e08c55393c888b686617d6bfa00ac4f5ac17a46f
3
+ metadata.gz: bd5e5fe82b38894f4b90439928e4de8383e8f4fac49bb152d966dd6f0f309cd2
4
+ data.tar.gz: 258bebc2ed9a8a676ca6bf2c847360f9655a61de660cea0b08011cddfc82d3d3
5
5
  SHA512:
6
- metadata.gz: 1f4bcc121ae695663a649b7ea4e4494ce558289c3ac247b1c88faa6f8842989454e86056b1c03b1d21a29448ae8a66f65788c0d067e54eac2677438c662f0184
7
- data.tar.gz: 594ef6dfa2623ac994286e2888498013d397c2410509c2c523894982a1c0525a07baf8696bdea4b3cdc809b05bfb7e2caf1ef65011e00b2a8d483e4eacd018e1
6
+ metadata.gz: 40aade8c05d4e355e7fdf59ccdae2848d6a4cbddf9bcabc895669ca72e288a6f69d4006014b924c9d4b92912eb53989815c72e092ec83978f49338d39e7373d3
7
+ data.tar.gz: 9b280e7b8cf8694035eff62d5994c2535523963110bce882c08feb6447c0b542f1aa2e32c5d3f1571bea3382d90b3fb9fb45e77e3017dcaa23298f500e31ed74
data/.byebug_history CHANGED
@@ -1,3 +1,9 @@
1
+ exit
2
+ c
3
+ serializable_config
4
+ n
5
+ serializable_config
6
+ attributes
1
7
  c
2
8
  attributes
3
9
  pdb
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- simply_serializable (1.0.0)
4
+ simply_serializable (1.1.0)
5
5
  fingerprintable (>= 1.2.1)
6
6
 
7
7
  GEM
@@ -8,12 +8,18 @@ module SimplySerializable
8
8
  super(subclass)
9
9
  end
10
10
 
11
- def serialize(**config)
12
- @serializable_config = config
11
+ def serialize(attributes: [], except: [], only: [])
12
+ serializable_config[:attributes] = serializable_config[:attributes] |= attributes
13
+ serializable_config[:except] = serializable_config[:except] |= except
14
+ serializable_config[:only] = serializable_config[:only] |= only
13
15
  end
14
16
 
15
17
  def serializable_config
16
- @serializable_config ||= {}
18
+ @serializable_config ||= {
19
+ attributes: [],
20
+ except: [],
21
+ only: []
22
+ }
17
23
  end
18
24
  end
19
25
 
@@ -28,7 +34,7 @@ module SimplySerializable
28
34
 
29
35
  def serializer(cache: {})
30
36
  Serializer.new(
31
- self.class.serializable_config.merge(
37
+ **self.class.serializable_config.merge(
32
38
  cache: cache,
33
39
  object: self
34
40
  )
@@ -1,3 +1,3 @@
1
1
  module SimplySerializable
2
- VERSION = "1.0.0"
2
+ VERSION = "1.1.0"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: simply_serializable
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ryan Jackson