oakdex-pokemon 0.0.10 → 0.0.11

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: c9d1dac86aa32b36b8cfd64998c23406eb8a8a39
4
- data.tar.gz: 33d900580d165d1cf54974a06c0ef72b47539c14
3
+ metadata.gz: 82c5209a5ec9f13269d3cfc1c8cfcf677434ef10
4
+ data.tar.gz: bea6eed9a714601ffa3dab265c960d23fe64cb0c
5
5
  SHA512:
6
- metadata.gz: 10ba4a15a9693c9b64ac3fb3a07419d8df4a7e7cf7bbd73d6f7c7fb7a025d51993f19e6362093b01a6204ae82f73d1ddeb4a8a3d477fa92063642253ad8ed7f8
7
- data.tar.gz: e17abfd9f0f8c5c18334ef314a24898810a108a8296c8686468f9df781792dab562f531844eb5c061c0bed01c946e0f80eccf7d8a8ea2ad8e0d2347a6c7acae0
6
+ metadata.gz: 92021e9d3db8a863e3808f24534e178e85f06d7b3beddc2429c60191292f5032e9c3da3b1e83d625c0fbce7932dcd9b1447a78dbf9c3633d405215a42f14473d
7
+ data.tar.gz: 772ca3a170dfd55f7293cfbd7a776a91cddbb3573fe2c62afc4589497ef8ea7a9bab70e63c397c3d219d3916aa771375f577a2d57a1ce53d8fba9d489f9fd389
@@ -240,6 +240,16 @@ module Oakdex
240
240
  species
241
241
  end
242
242
 
243
+ def dup
244
+ duplicated = super
245
+ new_attributes = @attributes.dup
246
+ new_attributes[:moves] = new_attributes[:moves].map(&:dup)
247
+ new_attributes[:growth_events] = new_attributes[:growth_events].map(&:dup)
248
+ duplicated.instance_variable_set(:@attributes, new_attributes)
249
+
250
+ duplicated
251
+ end
252
+
243
253
  def to_json
244
254
  JSON.dump(to_h)
245
255
  end
@@ -1,5 +1,5 @@
1
1
  module Oakdex
2
2
  class Pokemon
3
- VERSION = '0.0.10'
3
+ VERSION = '0.0.11'
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: oakdex-pokemon
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.10
4
+ version: 0.0.11
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jalyna Schroeder