Method: Thor::Group.handle_argument_error

Defined in:
lib/thor/group.rb

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

:nodoc:



207
208
209
210
211
212
# File 'lib/thor/group.rb', line 207

def handle_argument_error(command, error, args, arity) #:nodoc:
  msg = "#{basename} #{command.name} takes #{arity} argument"
  msg << "s" if arity > 1
  msg << ", but it should not."
  fail error, msg
end