Class: Rigor::CLI::TypeOfRenderer

Inherits:
Object
  • Object
show all
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

Methods included from Renderable

#render

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