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

Version Path
apl-library-0.0.90 vendor/bundle/ruby/2.1.0/gems/apl-library-0.0.90/vendor/bundle/ruby/1.9.1/gems/simplecov-0.8.2/lib/simplecov/formatter/multi_formatter.rb
apl-library-0.0.90 vendor/bundle/ruby/2.1.0/gems/simplecov-0.8.2/lib/simplecov/formatter/multi_formatter.rb
apl-library-0.0.90 vendor/bundle/ruby/2.1.0/gems/apl-library-0.0.90/vendor/bundle/ruby/2.1.0/gems/simplecov-0.8.2/lib/simplecov/formatter/multi_formatter.rb
apl-library-0.0.90 vendor/bundle/ruby/1.9.1/gems/simplecov-0.8.2/lib/simplecov/formatter/multi_formatter.rb
simplecov-0.8.2 lib/simplecov/formatter/multi_formatter.rb
simplecov-0.8.1 lib/simplecov/formatter/multi_formatter.rb
candlepin-api-0.4.0 bundle/ruby/1.9.1/gems/simplecov-0.7.1/lib/simplecov/formatter/multi_formatter.rb
candlepin-api-0.4.0 bundle/ruby/gems/simplecov-0.7.1/lib/simplecov/formatter/multi_formatter.rb
simplecov-0.8.0.pre2 lib/simplecov/formatter/multi_formatter.rb
challah-1.0.0 vendor/bundle/gems/simplecov-0.7.1/lib/simplecov/formatter/multi_formatter.rb
challah-1.0.0.beta3 vendor/bundle/gems/simplecov-0.7.1/lib/simplecov/formatter/multi_formatter.rb
sidekiq-statsd-0.1.1 vendor/ruby/1.9.1/gems/simplecov-0.7.1/lib/simplecov/formatter/multi_formatter.rb
sidekiq-statsd-0.1.0 vendor/ruby/1.9.1/gems/simplecov-0.7.1/lib/simplecov/formatter/multi_formatter.rb
challah-1.0.0.beta2 vendor/bundle/gems/simplecov-0.7.1/lib/simplecov/formatter/multi_formatter.rb
challah-1.0.0.beta vendor/bundle/gems/simplecov-0.7.1/lib/simplecov/formatter/multi_formatter.rb
simplecov-0.8.0.pre lib/simplecov/formatter/multi_formatter.rb
challah-0.9.1.beta.3 vendor/bundle/gems/simplecov-0.7.1/lib/simplecov/formatter/multi_formatter.rb
devise_sociable-0.1.0 vendor/bundle/gems/simplecov-0.7.1/lib/simplecov/formatter/multi_formatter.rb
challah-0.9.1.beta vendor/bundle/gems/simplecov-0.7.1/lib/simplecov/formatter/multi_formatter.rb
challah-0.9.0 vendor/bundle/gems/simplecov-0.7.1/lib/simplecov/formatter/multi_formatter.rb