class Thor::UndefinedCommandError::SpellChecker

Attributes

Public Class Methods

# File lib/thor/error.rb, line 28
def initialize(error)
  @error = error
end

Public Instance Methods

# File lib/thor/error.rb, line 32
def corrections
  @corrections ||= spell_checker.correct(error.command).map(&:inspect)
end
# File lib/thor/error.rb, line 36
def spell_checker
  DidYouMean::SpellChecker.new(dictionary: error.all_commands)
end