evt-virtual 2.1.0.0 → 2.1.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/virtual/pure_method.rb +0 -4
- data/lib/virtual/virtual_method.rb +0 -4
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f6662863fd1f00fce7e29762bbb90374a665aed3bacee8d03adefbc00a979106
|
4
|
+
data.tar.gz: ad9c52104ea94a6544db859c2116c51a493adea5b9fb9ef6a69a8e67a0518c30
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d155de3f56f40917267bb11370b9b2256c1dd8a4c56ba9cc02f2507e2ac1a755d8ffa4fc9e12a877f911ad996a3722fcc9a178cce5260827725c68cd1e3f5b6a
|
7
|
+
data.tar.gz: 9130654ba416929932327dd25be927b7ab9ed4337a13038d8b5607232f8a3d36b81816a12a102213c7fa6b07b6ce60b4bdf848db3c2360c12fd32942bc395241
|
data/lib/virtual/pure_method.rb
CHANGED
@@ -3,10 +3,6 @@ module Virtual
|
|
3
3
|
Error = Class.new(RuntimeError)
|
4
4
|
|
5
5
|
def self.define(target_class, method_name)
|
6
|
-
if target_class.method_defined?(method_name)
|
7
|
-
raise Error, "#{target_class} already has an implementation of the #{method_name} method"
|
8
|
-
end
|
9
|
-
|
10
6
|
target_class.send(:define_method, method_name) do |*args|
|
11
7
|
raise Error, "Pure virtual (abstract) method #{method_name} of #{self.class.name} must be implemented"
|
12
8
|
end
|
@@ -3,10 +3,6 @@ module Virtual
|
|
3
3
|
Error = Class.new(RuntimeError)
|
4
4
|
|
5
5
|
def self.define(target_class, method_name, &blk)
|
6
|
-
if target_class.method_defined?(method_name)
|
7
|
-
raise Error, "#{target_class} already has an implementation of the #{method_name} method"
|
8
|
-
end
|
9
|
-
|
10
6
|
blk ||= proc do |*|
|
11
7
|
end
|
12
8
|
|