Class: Polyrun::Coverage::Formatter::MarkdownFormatter

Inherits:
Base
  • Object
show all
Defined in:
lib/polyrun/coverage/formatter.rb

Instance Method Summary collapse

Methods inherited from Base

#format, #initialize

Constructor Details

This class inherits a constructor from Polyrun::Coverage::Formatter::Base

Instance Method Details

#write_files(result, output_dir, basename) ⇒ Object



128
129
130
131
132
133
# File 'lib/polyrun/coverage/formatter.rb', line 128

def write_files(result, output_dir, basename)
  path = File.join(output_dir, "#{basename}.md")
  title = (result.meta && result.meta["title"]) || (result.meta && result.meta[:title]) || "Polyrun coverage report"
  File.write(path, FileStatsReport.emit_markdown(result.coverage_blob, title: title))
  {markdown: path}
end