类 Gem::UnknownCommandSpellChecker

属性

error[R]

公共类方法

new(error) 单击切换源代码
# File rubygems/unknown_command_spell_checker.rb, line 6
def initialize(error)
  @error = error
end

公共实例方法

corrections() 单击切换源代码
# File rubygems/unknown_command_spell_checker.rb, line 10
def corrections
  @corrections ||=
    spell_checker.correct(error.unknown_command).map(&:inspect)
end

私有实例方法

spell_checker() 单击切换源代码
# File rubygems/unknown_command_spell_checker.rb, line 17
def spell_checker
  dictionary = Gem::CommandManager.instance.command_names
  DidYouMean::SpellChecker.new(dictionary: dictionary)
end