module Acclimate::CliHelper::ClassMethods
Public Instance Methods
handle_argument_error( command, error, _, __ )
click to toggle source
# File lib/acclimate/cli_helper.rb, line 29 def handle_argument_error( command, error, _, __ ) method = "handle_argument_error_for_#{command.name}" if respond_to?( method ) send( method, command, error ) else handle_argument_error_default( command, error ) end end
handle_argument_error_default( command, error )
click to toggle source
# File lib/acclimate/cli_helper.rb, line 39 def handle_argument_error_default( command, error ) $stdout.puts "Incorrect usage of command: #{command.name}" $stdout.puts " #{error.message}", '' $stdout.puts "For correct usage:" $stdout.puts " acclimate help #{command.name}" end
handle_no_command_error( name )
click to toggle source
# File lib/acclimate/cli_helper.rb, line 46 def handle_no_command_error( name ) $stdout.puts "Unrecognized command: #{name}" end