Module: RosettAi::SmartFeedback::ThorMiddleware::CommandDispatch

Defined in:
lib/rosett_ai/smart_feedback/thor_middleware.rb

Overview

Prepended module that wraps Thor command dispatch with smart feedback.

Instance Method Summary collapse

Instance Method Details

#dispatch(meth, given_args, given_opts, config) ⇒ Object



26
27
28
29
30
31
32
# File 'lib/rosett_ai/smart_feedback/thor_middleware.rb', line 26

def dispatch(meth, given_args, given_opts, config)
  super
rescue ::Thor::UndefinedCommandError => e
  handle_unknown_command(e, given_args)
rescue ::Thor::UnknownArgumentError => e
  handle_unknown_argument(e)
end