%PDF- %PDF-
| Direktori : /var/lib/rbenv/versions/3.2.1/lib64/ruby/3.2.0/rubygems/ |
| Current File : //var/lib/rbenv/versions/3.2.1/lib64/ruby/3.2.0/rubygems/unknown_command_spell_checker.rb |
# frozen_string_literal: true
class Gem::UnknownCommandSpellChecker
attr_reader :error
def initialize(error)
@error = error
end
def corrections
@corrections ||=
spell_checker.correct(error.unknown_command).map(&:inspect)
end
private
def spell_checker
dictionary = Gem::CommandManager.instance.command_names
DidYouMean::SpellChecker.new(dictionary: dictionary)
end
end