Class: SimpleCov::Formatter::JSONFormatter::ResultHashFormatter
- Inherits:
-
Object
- Object
- SimpleCov::Formatter::JSONFormatter::ResultHashFormatter
- Defined in:
- lib/simplecov/formatter/json_formatter/result_hash_formatter.rb
Overview
Builds the hash that JSONFormatter serializes to coverage.json: meta, per-file coverage data, group totals, and aggregate stats.
Class Method Summary collapse
Class Method Details
.format(result, include_source: true) ⇒ Object
26 27 28 29 30 31 32 33 34 35 |
# File 'lib/simplecov/formatter/json_formatter/result_hash_formatter.rb', line 26 def format(result, include_source: true) { :$schema => SCHEMA_URL, :meta => (result), :total => format_coverage_statistics(result.coverage_statistics), :coverage => format_files(result, include_source: include_source), :groups => format_groups(result), :errors => ErrorsFormatter.call(result) } end |