Exception: Bundler::Thor::UndefinedCommandError
- Includes:
- if defined?(DidYouMean::SpellChecker) && defined?(DidYouMean::Correctable) # rubocop:disable Naming/ConstantName Moduleif defined?(DidYouMean::SpellChecker) && defined?(DidYouMean::Correctable) # rubocop:disable Naming/ConstantName Module.new do def to_s super + DidYouMean.formatter.message_for(corrections) end def corrections @corrections ||= self.class.const_get(:SpellChecker).new(self).corrections end end end
- Defined in:
- lib/bundler/vendor/thor/lib/thor/error.rb
Overview
Raised when a command was not found.
Defined Under Namespace
Classes: SpellChecker
Instance Attribute Summary collapse
-
#all_commands ⇒ Object
readonly
Returns the value of attribute all_commands.
-
#command ⇒ Object
readonly
Returns the value of attribute command.
Instance Method Summary collapse
-
#initialize(command, all_commands, namespace) ⇒ UndefinedCommandError
constructor
A new instance of UndefinedCommandError.
Constructor Details
#initialize(command, all_commands, namespace) ⇒ UndefinedCommandError
Returns a new instance of UndefinedCommandError.
43 44 45 46 47 48 49 50 51 |
# File 'lib/bundler/vendor/thor/lib/thor/error.rb', line 43 def initialize(command, all_commands, namespace) @command = command @all_commands = all_commands = "Could not find command #{command.inspect}" = namespace ? "#{} in #{namespace.inspect} namespace." : "#{}." super() end |
Instance Attribute Details
#all_commands ⇒ Object (readonly)
Returns the value of attribute all_commands.
41 42 43 |
# File 'lib/bundler/vendor/thor/lib/thor/error.rb', line 41 def all_commands @all_commands end |
#command ⇒ Object (readonly)
Returns the value of attribute command.
41 42 43 |
# File 'lib/bundler/vendor/thor/lib/thor/error.rb', line 41 def command @command end |