class Gem::UnknownCommandError

Attributes

Public Class Methods

# File lib/rubygems/exceptions.rb, line 22
def self.attach_correctable
  return if method_defined?(:corrections)

  if defined?(DidYouMean) && DidYouMean.respond_to?(:correct_error)
    DidYouMean.correct_error(Gem::UnknownCommandError, Gem::UnknownCommandSpellChecker)
  end
end
Calls superclass method Exception::new
# File lib/rubygems/exceptions.rb, line 15
def initialize(unknown_command)
  self.class.attach_correctable

  @unknown_command = unknown_command
  super("Unknown command #{unknown_command}")
end