evt-virtual 1.0.1.0 → 2.0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/virtual/macro.rb +5 -0
- data/lib/virtual/protocol_method.rb +19 -0
- data/lib/virtual/pure_method.rb +1 -1
- data/lib/virtual.rb +1 -0
- metadata +7 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 77009d87640947d151dfd5c65e459ed3667500e559a83778fc920f4bdafe8839
|
4
|
+
data.tar.gz: 305cc7ef41d8a11cb8c6514a758f9f7ec0709bc17ed18684fe41c9cbe8e35bf4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7897f71409ddb3d7f060b7724fec7b9fdc385dec5a46df1b5967828996d509e192a64f98666825bbd8ee48fe519cde37e95a221911253f34c736540b28a22e17
|
7
|
+
data.tar.gz: d3a750b8af5472a55accc1f0095a46c1ee596f65aa5554ee9f55dcf2dec16d3f5142b299eeecec4e747db8c9e88fb0fc2eebe34d3b5256168087700ee9928ac2
|
data/lib/virtual/macro.rb
CHANGED
@@ -0,0 +1,19 @@
|
|
1
|
+
module Virtual
|
2
|
+
module ProtocolMethod
|
3
|
+
class Error < RuntimeError
|
4
|
+
def initialize(message)
|
5
|
+
super("Pure virtual (abstract) protocol method #{message} must be implemented")
|
6
|
+
end
|
7
|
+
end
|
8
|
+
|
9
|
+
def self.define(target_class, method_name)
|
10
|
+
already_defined = target_class.instance_methods(true).include?(method_name)
|
11
|
+
|
12
|
+
if not already_defined
|
13
|
+
target_class.send :define_method, method_name do |*args|
|
14
|
+
raise Error, "\"#{method_name}\" of #{self.class.name}"
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
data/lib/virtual/pure_method.rb
CHANGED
data/lib/virtual.rb
CHANGED
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:
|
4
|
+
version: 2.0.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- The Eventide Project
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2023-01-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: test_bench
|
@@ -41,13 +41,14 @@ files:
|
|
41
41
|
- lib/virtual/controls/virtual_method.rb
|
42
42
|
- lib/virtual/macro.rb
|
43
43
|
- lib/virtual/method.rb
|
44
|
+
- lib/virtual/protocol_method.rb
|
44
45
|
- lib/virtual/pure_method.rb
|
45
46
|
- lib/virtual/virtual.rb
|
46
47
|
homepage: https://github.com/eventide-project/virtual
|
47
48
|
licenses:
|
48
49
|
- MIT
|
49
50
|
metadata: {}
|
50
|
-
post_install_message:
|
51
|
+
post_install_message:
|
51
52
|
rdoc_options: []
|
52
53
|
require_paths:
|
53
54
|
- lib
|
@@ -62,8 +63,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
62
63
|
- !ruby/object:Gem::Version
|
63
64
|
version: '0'
|
64
65
|
requirements: []
|
65
|
-
rubygems_version: 3.
|
66
|
-
signing_key:
|
66
|
+
rubygems_version: 3.3.3
|
67
|
+
signing_key:
|
67
68
|
specification_version: 4
|
68
69
|
summary: Virtual method declaration
|
69
70
|
test_files: []
|