Class
Attributes
Read
No documentation available
Class Methods
lib/rubygems/exceptions.rb
View on GitHub
# File tmp/rubies/ruby-3.3.0/lib/rubygems/exceptions.rb, line 23
def self.attach_correctable
return if defined?(@attached)
if defined?(DidYouMean::SPELL_CHECKERS) && defined?(DidYouMean::Correctable)
if DidYouMean.respond_to?(:correct_error)
DidYouMean.correct_error(Gem::UnknownCommandError, Gem::UnknownCommandSpellChecker)
else
DidYouMean::SPELL_CHECKERS["Gem::UnknownCommandError"] =
Gem::UnknownCommandSpellChecker
prepend DidYouMean::Correctable
end
end
@attached = true
end
No documentation available
lib/rubygems/exceptions.rb
View on GitHub
# File tmp/rubies/ruby-3.3.0/lib/rubygems/exceptions.rb, line 16
def initialize(unknown_command)
self.class.attach_correctable
@unknown_command = unknown_command
super("Unknown command #{unknown_command}")
end
No documentation available