Class: Evilution::Result::CoverageGapGrouper Private
- Inherits:
-
Object
- Object
- Evilution::Result::CoverageGapGrouper
- Defined in:
- lib/evilution/result/coverage_gap_grouper.rb
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
Instance Method Summary collapse
- #call(survived_results) ⇒ Object private
Instance Method Details
#call(survived_results) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 |
# File 'lib/evilution/result/coverage_gap_grouper.rb', line 6 def call(survived_results) grouped = survived_results.group_by do |r| [r.mutation.file_path, r.mutation.subject.name, r.mutation.line] end gaps = grouped.map do |(file_path, subject_name, line), results| Evilution::Result::CoverageGap.new( file_path: file_path, subject_name: subject_name, line: line, mutation_results: results ) end gaps.sort_by { |gap| [gap.file_path, gap.line, gap.subject_name] } end |