Class: Rigor::CLI::TypeOfRenderer
- Inherits:
-
Object
- Object
- Rigor::CLI::TypeOfRenderer
- Includes:
- Renderable
- Defined in:
- lib/rigor/cli/type_of_renderer.rb
Overview
Renders a ‘TypeOfCommand::Result` as either human-readable text or a machine-readable JSON document.
The renderer is a separate concern from the command itself so that future output formats (sexp, lsp-style hover payloads, color decoration) can plug in without disturbing argument parsing or the inference call site.
Instance Method Summary collapse
-
#initialize(out:) ⇒ TypeOfRenderer
constructor
A new instance of TypeOfRenderer.
Methods included from Renderable
Constructor Details
#initialize(out:) ⇒ TypeOfRenderer
Returns a new instance of TypeOfRenderer.
19 20 21 |
# File 'lib/rigor/cli/type_of_renderer.rb', line 19 def initialize(out:) @out = out end |