Sha256: cea0bd84e732ba37c475a37acc47df5b446b76e0c7e84cab106fd5a16468e857
Contents?: true
Size: 603 Bytes
Versions: 26
Compression:
Stored size: 603 Bytes
Contents
module SimpleCov module Formatter class MultiFormatter def self.[](*args) Class.new(self) do define_method :formatters do @formatters ||= args end end end 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 def formatters @formatters ||= [] end end end end
Version data entries
26 entries across 23 versions & 7 rubygems