class Vernier::Output::FileListing

def output(template: nil)

def output(template: nil)
  output = +""
  relevant_files = samples_by_file.select do |k, v|
    next if k.start_with?("gem:")
    next if k.start_with?("rubylib:")
    next if k.start_with?("<")
    v.values.map(&:total).sum > total * 0.01
  end
  if template == "html"
    html_output(output, relevant_files)
  else
    relevant_files.keys.sort.each do |filename|
      output << "="*80 << "\n"
      output << filename << "\n"
      output << "-"*80 << "\n"
      format_file(output, filename, samples_by_file, total: total)
    end
    output << "="*80 << "\n"
  end
end