Sha256: ffb55c5d9b04be4657a07533ebd2034c9f53f23e3d93fd9373a272f574ee2dba
Contents?: true
Size: 492 Bytes
Versions: 25
Compression:
Stored size: 492 Bytes
Contents
class SimpleCov::Formatter::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
Version data entries
25 entries across 20 versions & 7 rubygems