Exception: Gem::UnknownCommandError
- Defined in:
- lib/rubygems/exceptions.rb
Instance Attribute Summary collapse
-
#unknown_command ⇒ Object
readonly
Returns the value of attribute unknown_command.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(unknown_command) ⇒ UnknownCommandError
constructor
A new instance of UnknownCommandError.
Constructor Details
#initialize(unknown_command) ⇒ UnknownCommandError
15 16 17 18 19 20 |
# 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 |
Instance Attribute Details
#unknown_command ⇒ Object (readonly)
Returns the value of attribute unknown_command.
13 14 15 |
# File 'lib/rubygems/exceptions.rb', line 13 def unknown_command @unknown_command end |
Class Method Details
.attach_correctable ⇒ Object
22 23 24 25 26 27 28 |
# 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 |