Method: Bundler::Thor::Base::ClassMethods#handle_argument_error

Defined in:
lib/bundler/vendor/thor/lib/thor/base.rb

#handle_argument_error(command, error, args, arity) ⇒ Object

:nodoc:



478
479
480
481
482
483
484
# File 'lib/bundler/vendor/thor/lib/thor/base.rb', line 478

def handle_argument_error(command, error, args, arity) #:nodoc:
  msg = "ERROR: \"#{basename} #{command.name}\" was called with "
  msg << "no arguments"               if     args.empty?
  msg << "arguments " << args.inspect unless args.empty?
  msg << "\nUsage: #{banner(command).inspect}"
  fail InvocationError, msg
end