Module: Moult::Formatters::FlagsJson

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

Overview

JSON rendering of a Moult::FlagsReport. A thin pass-through of the report's own to_h so the serialized shape cannot drift from the table formatter or the contract.

Class Method Summary collapse

Class Method Details

.render(report) ⇒ String

Parameters:

Returns:

  • (String)


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

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