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 +4 -4
- data/lib/transform.rb +1 -0
- data/lib/transform/copy.rb +24 -0
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 189c3684a2419199b1d142b6eeb53ea0aa66a3bb
|
4
|
+
data.tar.gz: c745f1f2993c8774ba118cede313e3d96e27de5a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: efab3be2495b5370f86fa62091e5fc9c88aab46567b6e17cf7a32b4c19b7e90f3fdbb82856ab4ff94fd7dd12d8b7a2ec4ec6752d3ce2f2ded96aa7baed610583
|
7
|
+
data.tar.gz: c6ea87881964a40fc07fb3bcba29d81b6a55584147689c31458e8d3e1267d05abf55ec2394c032091081acf89a03b70e61f319cbf635d3da8ae6f8dc14db798c
|
data/lib/transform.rb
CHANGED
@@ -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.
|
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-
|
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
|