Module: SimpleCov::Formatter
Overview
Namespace for ::SimpleCov result formatters. Built-in formatters live
below this module; custom formatters should respond to #format(result)
and can be wired up via SimpleCov.formatter=.
TODO: Documentation on how to build your own formatters
Class Method Summary
-
.instance_for(formatter)
Formatters can be configured either as classes (instantiated fresh for every report) or as ready-built instances — the only way to reach constructor options like
HTMLFormatter.new(silent: true).
Class Method Details
.instance_for(formatter)
Formatters can be configured either as classes (instantiated
fresh for every report) or as ready-built instances — the only
way to reach constructor options like
HTMLFormatter.new(silent: true). See #1240.
# File 'lib/simplecov/formatter.rb', line 13
def self.instance_for(formatter) formatter.is_a?(Class) ? formatter.new : formatter end