Class: LLMExperiment::CLI::Command
- Inherits:
-
Object
- Object
- LLMExperiment::CLI::Command
- Defined in:
- lib/llm_experiment/cli.rb
Overview
Base class for commands. Subclasses set NAME and SUMMARY, implement #run(argv), and optionally #add_options(parser).
Direct Known Subclasses
BuildCommand, CleanCommand, DoctorCommand, LoginCommand, MetricsCommand, NewCommand, ParseCommand, RunCommand, SanitizeCommand, ShellCommand, StatusCommand, VersionCommand
Class Method Summary collapse
Instance Method Summary collapse
- #call(argv) ⇒ Object
-
#initialize(container: nil) ⇒ Command
constructor
A new instance of Command.
- #run(_argv) ⇒ Object
Constructor Details
#initialize(container: nil) ⇒ Command
Returns a new instance of Command.
62 63 64 65 66 |
# File 'lib/llm_experiment/cli.rb', line 62 def initialize(container: nil) @container = container @experiment_dir = nil @help_shown = false end |
Class Method Details
.summary ⇒ Object
60 |
# File 'lib/llm_experiment/cli.rb', line 60 def self.summary = self::SUMMARY |
Instance Method Details
#call(argv) ⇒ Object
68 69 70 71 72 73 |
# File 'lib/llm_experiment/cli.rb', line 68 def call(argv) parser.parse!(argv) return if @help_shown run(argv) end |
#run(_argv) ⇒ Object
75 76 77 |
# File 'lib/llm_experiment/cli.rb', line 75 def run(_argv) raise NotImplementedError end |