AlkantarClanX12

Your IP : 13.58.201.240


Current Path : /proc/self/root/opt/alt/ruby33/share/rubygems/rubygems/
Upload File :
Current File : //proc/self/root/opt/alt/ruby33/share/rubygems/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