File tree 2 files changed +6
-5
lines changed
2 files changed +6
-5
lines changed Original file line number Diff line number Diff line change 2
2
3
3
module ErrbitPlugin
4
4
class IncompatibilityError < StandardError ; end
5
+
5
6
class AlreadyRegisteredError < StandardError ; end
6
7
7
8
module Registry
@@ -20,7 +21,7 @@ def self.add_issue_tracker(klass)
20
21
if validate . valid?
21
22
@issue_trackers [ key ] = klass
22
23
else
23
- raise IncompatibilityError . new ( validate . errors . join ( '; ' ) )
24
+ raise IncompatibilityError . new ( validate . errors . join ( "; " ) )
24
25
end
25
26
end
26
27
Original file line number Diff line number Diff line change @@ -19,11 +19,11 @@ def valid?
19
19
private
20
20
21
21
def good_inherit?
22
- unless @klass . ancestors . include? ( ErrbitPlugin ::IssueTracker )
22
+ if @klass . ancestors . include? ( ErrbitPlugin ::IssueTracker )
23
+ true
24
+ else
23
25
add_errors ( :not_inherited )
24
26
false
25
- else
26
- true
27
27
end
28
28
end
29
29
@@ -57,7 +57,7 @@ def instance
57
57
@instance ||= @klass . new ( { } )
58
58
end
59
59
60
- def add_errors ( key , value = nil )
60
+ def add_errors ( key , value = nil )
61
61
@errors << [ key , value ] . compact
62
62
end
63
63
end
You can’t perform that action at this time.
0 commit comments