@@ -3,16 +3,14 @@ class Thor
3
3
begin
4
4
require 'did_you_mean'
5
5
6
- module DidYouMean
7
- # In order to support versions of Ruby that don't have keyword
8
- # arguments, we need our own spell checker class that doesn't take key
9
- # words. Even though this code wouldn't be hit because of the check
10
- # above, it's still necessary because the interpreter would otherwise be
11
- # unable to parse the file.
12
- class NoKwargSpellChecker < SpellChecker
13
- def initialize ( dictionary )
14
- @dictionary = dictionary
15
- end
6
+ # In order to support versions of Ruby that don't have keyword
7
+ # arguments, we need our own spell checker class that doesn't take key
8
+ # words. Even though this code wouldn't be hit because of the check
9
+ # above, it's still necessary because the interpreter would otherwise be
10
+ # unable to parse the file.
11
+ class NoKwargSpellChecker < DidYouMean ::SpellChecker # :nodoc:
12
+ def initialize ( dictionary )
13
+ @dictionary = dictionary
16
14
end
17
15
end
18
16
@@ -43,7 +41,7 @@ def corrections
43
41
end
44
42
45
43
def spell_checker
46
- DidYouMean :: NoKwargSpellChecker . new ( error . all_commands )
44
+ NoKwargSpellChecker . new ( error . all_commands )
47
45
end
48
46
end
49
47
@@ -85,8 +83,7 @@ def corrections
85
83
end
86
84
87
85
def spell_checker
88
- @spell_checker ||=
89
- DidYouMean ::NoKwargSpellChecker . new ( error . switches )
86
+ @spell_checker ||= NoKwargSpellChecker . new ( error . switches )
90
87
end
91
88
end
92
89
0 commit comments