Class: Browsable::Formatters::Json
- Inherits:
-
Object
- Object
- Browsable::Formatters::Json
- Defined in:
- lib/browsable/formatters/json.rb
Overview
Machine-readable formatter. This is the universal interface: the LSP server and any future MCP server consume exactly this structure. The human and github formatters are just alternate presentations of it.
Instance Method Summary collapse
-
#initialize(report) ⇒ Json
constructor
A new instance of Json.
- #render ⇒ Object
Constructor Details
#initialize(report) ⇒ Json
Returns a new instance of Json.
11 12 13 |
# File 'lib/browsable/formatters/json.rb', line 11 def initialize(report) @report = report end |
Instance Method Details
#render ⇒ Object
15 16 17 |
# File 'lib/browsable/formatters/json.rb', line 15 def render JSON.pretty_generate(@report.as_json) end |