class Thor::UnknownArgumentError::SpellChecker

Attributes

Public Class Methods

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

Public Instance Methods

# File lib/thor/error.rb, line 73
def corrections
  @corrections ||=
    error.unknown.flat_map { |unknown| spell_checker.correct(unknown) }.uniq.map(&:inspect)
end
# File lib/thor/error.rb, line 78
def spell_checker
  @spell_checker ||= DidYouMean::SpellChecker.new(dictionary: error.switches)
end