Module: Moult::Formatters::CyclesJson

Defined in:
lib/moult/formatters/cycles_json.rb

Overview

Emits the typed cycles JSON contract (schema/cycles.schema.json). Renders straight from CyclesReport#to_h so the serialized shape cannot drift from the result model.

Class Method Summary collapse

Class Method Details

.render(report) ⇒ String

Returns pretty-printed JSON.

Parameters:

Returns:

  • (String)

    pretty-printed JSON



15
16
17
# File 'lib/moult/formatters/cycles_json.rb', line 15

def render(report)
  JSON.pretty_generate(report.to_h)
end