evt-virtual 1.0.0.0 → 1.0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/virtual/activate.rb +12 -12
- metadata +3 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5fa88296ba5310b0b5e5c567d20255e68ae78ebdee26ad80a9f5352f4b49889c
|
4
|
+
data.tar.gz: bab6df13076756fcfd64221038baf873fc2eaea94e0bd534ea808c76bd91ab99
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f52bac9968b15c424be551afe047758351a03a623e1b4bd539c3c487b99a808738732412f0d3c3226325729b4a26e9aaaa934047f08663f7952ea1b18bb30390
|
7
|
+
data.tar.gz: 7b87a5da0877286812f2d76548d91eaf3227ac46402d1c0093b7d2ca65b9fd6ec148d0e6031c627b418b79d4d07e22c75d5655525c1fc789ea252366f98fd223
|
data/lib/virtual/activate.rb
CHANGED
@@ -7,21 +7,21 @@ module Virtual
|
|
7
7
|
target_class.extend(Virtual::Macro)
|
8
8
|
end
|
9
9
|
|
10
|
-
|
11
|
-
|
12
|
-
|
10
|
+
def self.activated?(target_class=nil)
|
11
|
+
target_class ||= Object
|
12
|
+
|
13
|
+
subject = subject_class(target_class)
|
13
14
|
|
14
|
-
|
15
|
-
|
16
|
-
end
|
15
|
+
['virtual', 'pure_virtual', 'abstract'].each do |mthd|
|
16
|
+
fail mthd unless subject.respond_to?(mthd)
|
17
17
|
end
|
18
|
+
end
|
18
19
|
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
end
|
20
|
+
def self.subject_class(subject)
|
21
|
+
if [Module, Class].include?(subject)
|
22
|
+
return subject
|
23
|
+
else
|
24
|
+
return subject.class
|
25
25
|
end
|
26
26
|
end
|
27
27
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: evt-virtual
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.1.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:
|
11
|
+
date: 2019-10-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: test_bench
|
@@ -62,8 +62,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
62
62
|
- !ruby/object:Gem::Version
|
63
63
|
version: '0'
|
64
64
|
requirements: []
|
65
|
-
|
66
|
-
rubygems_version: 2.7.3
|
65
|
+
rubygems_version: 3.0.1
|
67
66
|
signing_key:
|
68
67
|
specification_version: 4
|
69
68
|
summary: Virtual method declaration
|