Class: Reek::Report::JSONReport

Inherits:
BaseReport show all
Defined in:
lib/reek/report/json_report.rb

Overview

Displays a list of smells in JSON format JSON with empty array for 0 smells

Constant Summary

Constants inherited from BaseReport

BaseReport::NO_WARNINGS_COLOR, BaseReport::WARNINGS_COLOR

Instance Attribute Summary

Attributes inherited from BaseReport

#examiners, #heading_formatter, #progress_formatter, #sort_by_issue_count, #warning_formatter

Instance Method Summary collapse

Methods inherited from BaseReport

#add_examiner, #initialize, #smells, #smells?

Constructor Details

This class inherits a constructor from Reek::Report::BaseReport

Instance Method Details

#show(out = $stdout) ⇒ Object



14
15
16
# File 'lib/reek/report/json_report.rb', line 14

def show(out = $stdout)
  out.print ::JSON.generate smells.map(&:yaml_hash)
end