abstractify 1.0.0 → 1.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/abstractify.gemspec +0 -2
- data/lib/abstractify/abstract.rb +7 -1
- data/lib/abstractify/app_info.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e537b4494a1a2d2b30d9b185758130b62d7a3aca26f9a90d76549ac7ff6a892f
|
4
|
+
data.tar.gz: 48a53846ea7f6199882b53237222635aba20ec0ed8870c8dbff4a4d4fc5839bf
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4912f9d1df41541aefae01fb99f5575e3e86b847253e0cdba76d6493c621d28380498e8516e00bc86e98142c09dd4bbe80cf5d19910cb39dc199da2348a5fe2e
|
7
|
+
data.tar.gz: 9cc99740305e3a26448ef17084507e9e05a48cf7068d0e4fb7e4a3219e0a5f9ca779d5853d53f8f2dec420cb15a76f24cbd059e2fed53cf1ac157df3f4f65ae6
|
data/CHANGELOG.md
CHANGED
data/abstractify.gemspec
CHANGED
@@ -29,8 +29,6 @@ Gem::Specification.new do |spec|
|
|
29
29
|
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
30
30
|
spec.require_paths = ['lib']
|
31
31
|
|
32
|
-
#spec.add_dependency 'abstraction', '~> 0.0.4'
|
33
|
-
#spec.add_dependency 'serialport', '~> 1.3'
|
34
32
|
spec.add_development_dependency 'bundler', '~> 2.3'
|
35
33
|
spec.add_development_dependency 'rake', '~> 13.0'
|
36
34
|
spec.add_development_dependency 'rspec', '~> 3.12'
|
data/lib/abstractify/abstract.rb
CHANGED
@@ -5,6 +5,12 @@ module Abstractify
|
|
5
5
|
end
|
6
6
|
end
|
7
7
|
|
8
|
+
class AbstractClassError < AbstractError
|
9
|
+
def initialize(msg="Can't instantiate abstract class directly")
|
10
|
+
super
|
11
|
+
end
|
12
|
+
end
|
13
|
+
|
8
14
|
class AbstractMethodError < AbstractError
|
9
15
|
def initialize(msg="Can't instantiate abstract class because some of its abstract methods have not been defined")
|
10
16
|
super
|
@@ -35,7 +41,7 @@ module Abstractify
|
|
35
41
|
end
|
36
42
|
|
37
43
|
class_methods.define_method :new do |*args, **kwargs|
|
38
|
-
raise
|
44
|
+
raise AbstractClassError.new("Class #{self} is abstract") unless self < mod
|
39
45
|
|
40
46
|
abstract_methods.each do |name|
|
41
47
|
raise AbstractMethodMustExistError.new("Method #{name} must be defined") unless method_defined? name
|
data/lib/abstractify/app_info.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: abstractify
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jeffrey Phillips Freeman
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-08-
|
11
|
+
date: 2023-08-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -121,7 +121,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
121
121
|
- !ruby/object:Gem::Version
|
122
122
|
version: '0'
|
123
123
|
requirements: []
|
124
|
-
rubygems_version: 3.4.
|
124
|
+
rubygems_version: 3.4.17
|
125
125
|
signing_key:
|
126
126
|
specification_version: 4
|
127
127
|
summary: Library for implementing true Abstract classes, throwing errors when class
|