Class: Rigor::CLI::MutationProtectionRenderer
- Inherits:
-
Object
- Object
- Rigor::CLI::MutationProtectionRenderer
- Defined in:
- lib/rigor/cli/mutation_protection_renderer.rb
Overview
Renders a MutationProtectionReport (ADR-63 Tier 2) as text or JSON. The text form leads with the effectiveness ratio (caught breakages), then the breakages Rigor missed (“add a type here”), then the least-effective files. The framing is always *where to add a type*, never “your code is broken”.
Constant Summary collapse
- TOP_CALLS =
15- TOP_FILES =
10
Instance Method Summary collapse
-
#initialize(out:) ⇒ MutationProtectionRenderer
constructor
A new instance of MutationProtectionRenderer.
- #render(report, format:) ⇒ Object
Constructor Details
#initialize(out:) ⇒ MutationProtectionRenderer
Returns a new instance of MutationProtectionRenderer.
15 16 17 |
# File 'lib/rigor/cli/mutation_protection_renderer.rb', line 15 def initialize(out:) @out = out end |
Instance Method Details
#render(report, format:) ⇒ Object
19 20 21 |
# File 'lib/rigor/cli/mutation_protection_renderer.rb', line 19 def render(report, format:) format == "json" ? render_json(report) : render_text(report) end |