Class: Necropsy::Bench::ReportNormalizer
- Inherits:
-
Object
- Object
- Necropsy::Bench::ReportNormalizer
- Defined in:
- lib/necropsy/bench/report_normalizer.rb
Constant Summary collapse
- VERSION =
1
Instance Method Summary collapse
- #call ⇒ Object
- #dump ⇒ Object
-
#initialize(report:, corpus:) ⇒ ReportNormalizer
constructor
A new instance of ReportNormalizer.
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
#call ⇒ Object
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 |
#dump ⇒ Object
27 28 29 |
# File 'lib/necropsy/bench/report_normalizer.rb', line 27 def dump "#{JSON.pretty_generate(call)}\n" end |