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 +4 -4
- data/Gemfile.lock +1 -1
- data/lib/deep_freezer/base.rb +5 -1
- data/lib/deep_freezer/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8b7d1d66e0c1b9a3ee795365ea24541c4e59e08a
|
4
|
+
data.tar.gz: f677d6282cf2607163a30fecc666969c3753bb6d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 375c3ef67708d8e4da18600ab063c8c3d6bcdb3eb02753a7511b81077a4e75c081950ea320d882a9106dc2fd26bb9186f1e70e7965379cd7733aeb6e5022d7e9
|
7
|
+
data.tar.gz: 267eef5f307304f5f6b728a8913d49c48146f794f854c76c8f309da276bcef8e4e9ca05932022bfa67397768de66618689278f03909401b8b0455b1d030f355e
|
data/Gemfile.lock
CHANGED
data/lib/deep_freezer/base.rb
CHANGED
@@ -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
|
-
|
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("---", "")
|
data/lib/deep_freezer/version.rb
CHANGED
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.
|
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-
|
11
|
+
date: 2018-03-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|