File: suppress_simple_cov_output.rb

package info (click to toggle)
ruby-aruba 0.14.8-1
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 2,216 kB
  • sloc: ruby: 7,951; sh: 21; makefile: 12
file content (15 lines) | stat: -rw-r--r-- 392 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
module SimpleCov
  module Formatter
    class HTMLFormatter
      def format(result)
        Dir[File.join(File.dirname(__FILE__), "../public/*")].each do |path|
          FileUtils.cp_r(path, asset_output_path)
        end

        File.open(File.join(output_path, "index.html"), "wb") do |file|
          file.puts template("layout").result(binding)
        end
      end
    end
  end
end