Method: Slather::CoverageFile#line_coverage_data

Defined in:
lib/slather/coverage_file.rb

#line_coverage_dataObject



80
81
82
83
84
85
86
87
88
89
90
# File 'lib/slather/coverage_file.rb', line 80

def line_coverage_data
  unless cleaned_gcov_data.empty?
    first_line_start = cleaned_gcov_data =~ /^\s+(-|#+|[0-9+]):\s+1:/

    cleaned_gcov_data[first_line_start..-1].split("\n").map do |line|
      coverage_for_line(line)
    end
  else
    []
  end
end