class Rcov::BaseFormatter
def initialize(opts = {})
def initialize(opts = {}) options = DEFAULT_OPTS.clone.update(opts) @failure_threshold = options[:failure_threshold] @files = {} @ignore_files = options[:ignore] @dont_ignore_files = options[:dont_ignore] @sort_criterium = case options[:sort] when :loc then lambda{|fname, finfo| finfo.num_code_lines} when :coverage then lambda{|fname, finfo| finfo.code_coverage} else lambda { |fname, finfo| fname } end @sort_reverse = options[:sort_reverse] @output_threshold = options[:output_threshold] @callsite_analyzer = options[:callsite_analyzer] @comments_run_by_default = options[:comments_run_by_default] @callsite_index = nil @mangle_filename = Hash.new{|h,base| h[base] = Pathname.new(base).cleanpath.to_s.gsub(%r{^\w:[/\\]}, "").gsub(/\./, "_").gsub(/[\\\/]/, "-") + ".html" } end