Exception: Bundler::Thor::UndefinedCommandError

Inherits:
Error
  • Object
show all
Includes:
if defined?(DidYouMeanif defined?(DidYouMean::SpellChecker) && defined?(DidYouMeanif defined?(DidYouMean::SpellChecker) && defined?(DidYouMean::Correctable) # In order to support versions of Ruby that don't have keyword # arguments, we need our own spell checker class that doesn't take key # words. Even though this code wouldn't be hit because of the check # above, it's still necessary because the interpreter would otherwise be # unable to parse the file. class NoKwargSpellChecker < DidYouMean::SpellChecker # :nodoc: def initialize(dictionary) @dictionary = dictionary end end DidYouMean::Correctable 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

Instance Method Summary collapse

Constructor Details

#initialize(command, all_commands, namespace) ⇒ UndefinedCommandError

Returns a new instance of UndefinedCommandError.


46
47
48
49
50
51
52
53
54
# File 'lib/bundler/vendor/thor/lib/thor/error.rb', line 46

def initialize(command, all_commands, namespace)
  @command = command
  @all_commands = all_commands

  message = "Could not find command #{command.inspect}"
  message = namespace ? "#{message} in #{namespace.inspect} namespace." : "#{message}."

  super(message)
end

Instance Attribute Details

#all_commandsObject (readonly)

Returns the value of attribute all_commands.


44
45
46
# File 'lib/bundler/vendor/thor/lib/thor/error.rb', line 44

def all_commands
  @all_commands
end

#commandObject (readonly)

Returns the value of attribute command.


44
45
46
# File 'lib/bundler/vendor/thor/lib/thor/error.rb', line 44

def command
  @command
end