123456789_123456789_123456789_123456789_123456789_

Module: SimpleCov::Combine::FilesCombiner

Relationships & Source Files
Defined in: lib/simplecov/combine/files_combiner.rb

Overview

Handle combining two coverage results for same file

Should be called through SimpleCov.combine.

Class Method Summary

Class Method Details

.combine(coverage_a, coverage_b) ⇒ Hash (mod_func)

Combines the results for 2 coverages of a file.

[ GitHub ]

  
# File 'lib/simplecov/combine/files_combiner.rb', line 17

def combine(coverage_a, coverage_b)
  combination = {"lines" => Combine.combine(LinesCombiner, coverage_a["lines"], coverage_b["lines"])}
  combination["branches"] = Combine.combine(BranchesCombiner, coverage_a["branches"], coverage_b["branches"]) if SimpleCov.branch_coverage?
  combination
end