evt-transform 0.1.1.5 → 0.1.2.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: 5f60dd6263d531ee5d15ec14832149a844785281
4
- data.tar.gz: bb4f720b3aeecb4d0a2eb2ff9f83300a144c36f8
3
+ metadata.gz: 189c3684a2419199b1d142b6eeb53ea0aa66a3bb
4
+ data.tar.gz: c745f1f2993c8774ba118cede313e3d96e27de5a
5
5
  SHA512:
6
- metadata.gz: 01e79b6954c12611a15f7a53c73407386f66064d23d641441ebe88bc1486d10bfad8354d792086bbffd80b786752664c6acc88fb00c65f4c2893bd7dbcb8d381
7
- data.tar.gz: 655af66c36abe574eb18472c2e2c6d0644dabed0b5479c169cf0ebccf8dce8ef60525e5c4e12e4ce9db05c34ef2c5384c728b48f4d703d0a6652ab1ed5ad0893
6
+ metadata.gz: efab3be2495b5370f86fa62091e5fc9c88aab46567b6e17cf7a32b4c19b7e90f3fdbb82856ab4ff94fd7dd12d8b7a2ec4ec6752d3ce2f2ded96aa7baed610583
7
+ data.tar.gz: c6ea87881964a40fc07fb3bcba29d81b6a55584147689c31458e8d3e1267d05abf55ec2394c032091081acf89a03b70e61f319cbf635d3da8ae6f8dc14db798c
@@ -4,3 +4,4 @@ require 'transform/log'
4
4
  require 'transform/transform'
5
5
  require 'transform/write'
6
6
  require 'transform/read'
7
+ require 'transform/copy'
@@ -0,0 +1,24 @@
1
+ module Transform
2
+ module Copy
3
+ def self.call(instance)
4
+ raw_data = Write.raw_data(instance)
5
+
6
+ new_instance = Read.instance(raw_data, instance.class)
7
+
8
+ new_instance
9
+ end
10
+
11
+ def self.copied?(a, b)
12
+ return false if a.equal?(b)
13
+
14
+ unless Transform.transformer?(a) && Transform.transformer?(b)
15
+ return false
16
+ end
17
+
18
+ raw_a = Write.raw_data(a)
19
+ raw_b = Write.raw_data(b)
20
+
21
+ raw_a == raw_b
22
+ end
23
+ end
24
+ end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: evt-transform
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1.5
4
+ version: 0.1.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - The Eventide Project
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-06-01 00:00:00.000000000 Z
11
+ date: 2017-06-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: evt-log
@@ -54,6 +54,7 @@ files:
54
54
  - lib/transform/controls/subject.rb
55
55
  - lib/transform/controls/subject_instance_receives_class.rb
56
56
  - lib/transform/controls/text.rb
57
+ - lib/transform/copy.rb
57
58
  - lib/transform/log.rb
58
59
  - lib/transform/read.rb
59
60
  - lib/transform/transform.rb