lib/hanami/cli_base.rb in hanami-1.0.0.beta2 vs lib/hanami/cli_base.rb in hanami-1.0.0.beta3
- old
+ new
@@ -1,6 +1,7 @@
module Hanami
+ # @api private
module CliBase
# Add new custom CLI command to special CLI class.
# Please be careful. This is a private method that
# can be deleted soon.
#
@@ -26,13 +27,15 @@
# end
def define_commands(&blk)
class_eval(&blk) if block_given?
end
+ # @api private
def banner(command, nspace = true, subcommand = false)
super(command, nspace, namespace != 'hanami:cli')
end
+ # @api private
def handle_argument_error(command, error, args, arity)
name = [(namespace == 'hanami:cli' ? nil : namespace), command.name].compact.join(" ")
msg = "ERROR: \"#{basename} #{name}\" was called with "
msg << "no arguments" if args.empty?