deep_freezer 0.2.0 → 0.4.0

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: 97d277418afe18c14dcac6cbd93a3b33aadb9db9
4
- data.tar.gz: b4b04dd5d1abba2b0cc351e8926a3c67b8ed9084
3
+ metadata.gz: 8b7d1d66e0c1b9a3ee795365ea24541c4e59e08a
4
+ data.tar.gz: f677d6282cf2607163a30fecc666969c3753bb6d
5
5
  SHA512:
6
- metadata.gz: 4652462e1480c4b70084f7f00e6f79135102cacaf0ad508e297a45988a6a4168ed1dc310ae7398703ea8733e39ef960bb7bd6fca1cec95d6929c74b69e78b67c
7
- data.tar.gz: 160c351b98b9a5135f6d40e6c9df1fe9a444850dd113239ad898571d5274ca83ac5d426b8e47444a8ecc1d3cc02713974302239df99aeb7a34881a670b8037bf
6
+ metadata.gz: 375c3ef67708d8e4da18600ab063c8c3d6bcdb3eb02753a7511b81077a4e75c081950ea320d882a9106dc2fd26bb9186f1e70e7965379cd7733aeb6e5022d7e9
7
+ data.tar.gz: 267eef5f307304f5f6b728a8913d49c48146f794f854c76c8f309da276bcef8e4e9ca05932022bfa67397768de66618689278f03909401b8b0455b1d030f355e
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- deep_freezer (0.2.0)
4
+ deep_freezer (0.4.0)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
@@ -19,7 +19,11 @@ class DeepFreezer::Base
19
19
  def freeze
20
20
  freezable = @obj.class.new
21
21
  self.class.attrs.each do |attr|
22
- freezable.send("#{attr}=", @obj.send(attr))
22
+ if self.respond_to?(attr)
23
+ freezable.send("#{attr}=", self.send(attr))
24
+ else
25
+ freezable.send("#{attr}=", @obj.send(attr))
26
+ end
23
27
  end
24
28
 
25
29
  yaml = ({ "#{freezable.class.to_s.tableize}_#{freezable.id.to_s}" => freezable.attributes }.to_yaml).gsub("---", "")
@@ -1,3 +1,3 @@
1
1
  module DeepFreezer
2
- VERSION = "0.2.0"
2
+ VERSION = "0.4.0"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: deep_freezer
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mark Provan
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2018-01-24 00:00:00.000000000 Z
11
+ date: 2018-03-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler