Parent

SimpleCov::Formatter::MultiFormatter

Public Class Methods

[](*args) click to toggle source
# File lib/simplecov/formatter/multi_formatter.rb, line 2
def self.[](*args)
  Class.new(self) do
    define_method :formatters do
      @formatters ||= args
    end
  end
end

Public Instance Methods

format(result) click to toggle source
# File lib/simplecov/formatter/multi_formatter.rb, line 10
def format(result)
  formatters.map do |formatter|
    begin
      formatter.new.format(result)
    rescue => e
      STDERR.puts("Formatter #{formatter} failed with #{e.class}: #{e.message} (#{e.backtrace.first})")
      nil
    end
  end
end
formatters() click to toggle source
# File lib/simplecov/formatter/multi_formatter.rb, line 21
def formatters
  @formatters ||= []
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.