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, DoctorCommand, ExplainCommand, LspCommand, McpCommand, PluginCommand, PluginsCommand, ShowBleedingedgeCommand, SigGenCommand, SkillCommand, TraceCommand, TriageCommand, TypeOfCommand, TypeScanCommand, UpgradeCommand
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.
14 15 16 17 18 |
# File 'lib/rigor/cli/command.rb', line 14 def initialize(argv:, out: $stdout, err: $stderr) @argv = argv @out = out @err = err end |