Module: RosettAi::SmartFeedback::ThorMiddleware
- Defined in:
- lib/rosett_ai/smart_feedback/thor_middleware.rb
Overview
Middleware that intercepts Thor::UndefinedCommandError and Thor::UnknownArgumentError to provide "Did you mean?" suggestions.
Integrates with Thor's error handling to enhance error messages without replacing the standard error flow.
Defined Under Namespace
Modules: CommandDispatch
Class Method Summary collapse
-
.install(cli_class) ⇒ Object
Enhance a Thor CLI class with smart feedback.
Class Method Details
.install(cli_class) ⇒ Object
Enhance a Thor CLI class with smart feedback.
20 21 22 |
# File 'lib/rosett_ai/smart_feedback/thor_middleware.rb', line 20 def self.install(cli_class) cli_class.singleton_class.prepend(CommandDispatch) end |