lazy_lazer 0.5.3 → 0.5.4

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
  SHA1:
3
- metadata.gz: 733ca16c8cce77a9ba449860622b6c0d85f71228
4
- data.tar.gz: 215967ea00e04c84130153a8c7f8bf526644c5af
3
+ metadata.gz: 22872353f1cee531497c41b3d54db9f03b9ab9ee
4
+ data.tar.gz: 4fc8d26919472b31c3257798af077d5d2b5fc02b
5
5
  SHA512:
6
- metadata.gz: a65d2e629e89fd55c9f009ae9548e436f6f90812f7f19fca63a232224c224dd59e1d9f16d0c389ab1863eed9088414947fd1a0f7bdcbf8344f97026ba7f040c3
7
- data.tar.gz: 6d8cfc343e579b807eff4e73723c77abdb88c554c1c8b4af93e525a908018d13bca75386e689a758f7e6f217e52b24a1300cb2f4b61d4da75db412adffcb2cc0
6
+ metadata.gz: 30fc0cb9bb106a2c6cc6f5dc959d920584bfbbf2dff95e5f5a5358fbe4542b91a5e4012b2b3446531f5662e2aa180b5722971e15030ff3e756d50914df2403f1
7
+ data.tar.gz: f39411ddcc2fb04c16149607586736b236f135e78521e8077f9b544d1b9a049fcc4c61cf1a69031e0431db4c9d3f69176e4ac2ed34d7adaf0953f7a8e4063fbd
@@ -11,13 +11,24 @@ module LazyLazer
11
11
  @required_properties = []
12
12
  end
13
13
 
14
+ # Used for {Object#dup}.
15
+ def initialize_copy(original)
16
+ super
17
+ @collection = original.instance_variable_get(:@collection).dup
18
+ @required_properties = original.instance_variable_get(:@required_properties).dup
19
+ end
20
+
14
21
  # Add a KeyMetadata to the store.
15
22
  # @param key [Symbol] the key
16
23
  # @param meta [KeyMetadata] the key metadata
17
24
  # @return [KeyMetadata] the provided meta
18
25
  def add(key, meta)
19
26
  @collection[key] = meta
20
- @required_properties << key if meta.required?
27
+ if meta.required?
28
+ @required_properties << key
29
+ else
30
+ @required_properties.delete(key)
31
+ end
21
32
  meta
22
33
  end
23
34
 
@@ -2,5 +2,5 @@
2
2
 
3
3
  module LazyLazer
4
4
  # The gem's semantic version number.
5
- VERSION = '0.5.3'
5
+ VERSION = '0.5.4'
6
6
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lazy_lazer
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.3
4
+ version: 0.5.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Avinash Dwarapu