Class: Rigor::CLI::Command
- Inherits:
-
Object
- Object
- Rigor::CLI::Command
- Defined in:
- lib/rigor/cli/command.rb
Overview
Base class for the ‘rigor <subcommand>` command objects.
Every subcommand captured the same invariant wiring — the argument vector plus the output and error streams — in an identical ‘initialize(argv:, out:, err:)`, and defaulted the streams inconsistently (some to `$stdout` / `$stderr`, most not at all). Centralising it here gives one consistent shape and lets a test instantiate a command with just `argv:` (the streams default so a spec can pass a `StringIO` for one and ignore the other).
Subclasses read the ‘@argv` / `@out` / `@err` ivars directly, as they did before.
Direct Known Subclasses
AnnotateCommand, BaselineCommand, CheckCommand, CoverageCommand, DiffCommand, DocsCommand, ExplainCommand, LspCommand, McpCommand, PluginCommand, PluginsCommand, ShowBleedingedgeCommand, SigGenCommand, SkillCommand, TraceCommand, TriageCommand, TypeOfCommand, TypeScanCommand
Instance Method Summary collapse
-
#initialize(argv:, out: $stdout, err: $stderr) ⇒ Command
constructor
A new instance of Command.
Constructor Details
#initialize(argv:, out: $stdout, err: $stderr) ⇒ Command
Returns a new instance of Command.
18 19 20 21 22 |
# File 'lib/rigor/cli/command.rb', line 18 def initialize(argv:, out: $stdout, err: $stderr) @argv = argv @out = out @err = err end |