Class: Bundler::Thor::UndefinedCommandError::SpellChecker
Relationships & Source Files | |
Inherits: | Object |
Defined in: | lib/bundler/vendor/thor/lib/thor/error.rb |
Class Method Summary
- .new(error) ⇒ SpellChecker constructor
Instance Attribute Summary
- #error readonly
Instance Method Summary
Constructor Details
.new(error) ⇒ SpellChecker
Instance Attribute Details
#error (readonly)
[ GitHub ]# File 'lib/bundler/vendor/thor/lib/thor/error.rb', line 26
attr_reader :error
Instance Method Details
#corrections
[ GitHub ]# File 'lib/bundler/vendor/thor/lib/thor/error.rb', line 32
def corrections @corrections ||= spell_checker.correct(error.command).map(&:inspect) end
#spell_checker
[ GitHub ]# File 'lib/bundler/vendor/thor/lib/thor/error.rb', line 36
def spell_checker DidYouMean::SpellChecker.new(dictionary: error.all_commands) end