Class: Necropsy::Bench::ReportNormalizer

Inherits:
Object
  • Object
show all
Defined in:
lib/necropsy/bench/report_normalizer.rb

Constant Summary collapse

VERSION =
1

Instance Method Summary collapse

Constructor Details

#initialize(report:, corpus:) ⇒ ReportNormalizer

Returns a new instance of ReportNormalizer.



11
12
13
14
# File 'lib/necropsy/bench/report_normalizer.rb', line 11

def initialize(report:, corpus:)
  @report = report
  @corpus = corpus
end

Instance Method Details

#callObject



16
17
18
19
20
21
22
23
24
25
# File 'lib/necropsy/bench/report_normalizer.rb', line 16

def call
  {
    'schema_version' => VERSION,
    'corpus' => corpus,
    'metrics' => metrics,
    'states' => state_counts,
    'quality' => quality,
    'findings' => normalized_findings
  }
end

#dumpObject



27
28
29
# File 'lib/necropsy/bench/report_normalizer.rb', line 27

def dump
  "#{JSON.pretty_generate(call)}\n"
end