class Gem::UnknownCommandError

Attributes

unknown_command[R]

Public Class Methods

attach_correctable() click to toggle source
# File lib/rubygems/exceptions.rb, line 23
def self.attach_correctable
  return if defined?(@attached)

  if defined?(DidYouMean::SPELL_CHECKERS) && defined?(DidYouMean::Correctable)
    DidYouMean::SPELL_CHECKERS['Gem::UnknownCommandError'] =
      Gem::UnknownCommandSpellChecker

    prepend DidYouMean::Correctable
  end

  @attached = true
end
new(unknown_command) click to toggle source
Calls superclass method Exception::new
# File lib/rubygems/exceptions.rb, line 16
def initialize(unknown_command)
  self.class.attach_correctable

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