class Gem::UnknownCommandSpellChecker
属性
公共类方法
源代码
# File lib/rubygems/unknown_command_spell_checker.rb, line 6 def initialize(error) @error = error end
公共实例方法
源代码
# File lib/rubygems/unknown_command_spell_checker.rb, line 10 def corrections @corrections ||= spell_checker.correct(error.unknown_command).map(&:inspect) end
私有实例方法
源代码
# File lib/rubygems/unknown_command_spell_checker.rb, line 17 def spell_checker dictionary = Gem::CommandManager.instance.command_names DidYouMean::SpellChecker.new(dictionary: dictionary) end