HTML
end
private
def body
html = [""]
@coverage[:source_files].each do |source_file|
html << "
"
html << "
#{source_file[:covered_percent].round(2)}%
"
html << "
#{source_file[:name]}
"
html << "
#{not_covered_lines(source_file)}
"
html << "
"
end
html << ""
html.join("\n ")
end
def not_covered_lines(source_file)
total_lines = JSON.parse(source_file[:coverage])
not_covered = total_lines.each_with_index.map do |line, index|
next if line != 0
index + 1
end
not_covered.compact.join(", ")
end
end