Sha256: ade68c4e193352d36363bf20f119fe12b699a2bf6c698f46be1e4f611c696ef8

Contents?: true

Size: 621 Bytes

Versions: 35

Compression:

Stored size: 621 Bytes

Contents

# frozen_string_literal: true

#
# A ridiculously simple formatter for SimpleCov results.
#
module SimpleCov
  module Formatter
    class SimpleFormatter
      # Takes a SimpleCov::Result and generates a string out of it
      def format(result)
        output = "".dup
        result.groups.each do |name, files|
          output << "Group: #{name}\n"
          output << "=" * 40
          output << "\n"
          files.each do |file|
            output << "#{file.filename} (coverage: #{file.covered_percent.round(2)}%)\n"
          end
          output << "\n"
        end
        output
      end
    end
  end
end

Version data entries

35 entries across 23 versions & 3 rubygems

Version Path
tdiary-5.1.2 vendor/bundle/ruby/2.7.0/gems/simplecov-0.16.1/lib/simplecov/formatter/simple_formatter.rb
tdiary-5.1.2 vendor/bundle/ruby/2.6.0/gems/simplecov-0.17.1/lib/simplecov/formatter/simple_formatter.rb
tdiary-5.1.1 vendor/bundle/ruby/2.7.0/gems/simplecov-0.16.1/lib/simplecov/formatter/simple_formatter.rb
tdiary-5.1.1 vendor/bundle/ruby/2.6.0/gems/simplecov-0.17.1/lib/simplecov/formatter/simple_formatter.rb
grape-extra_validators-1.0.0 vendor/bundle/ruby/2.4.0/gems/simplecov-0.17.1/lib/simplecov/formatter/simple_formatter.rb
tdiary-5.1.0 vendor/bundle/gems/simplecov-0.16.1/lib/simplecov/formatter/simple_formatter.rb
simplecov-0.17.1 lib/simplecov/formatter/simple_formatter.rb
simplecov-0.17.0 lib/simplecov/formatter/simple_formatter.rb
tdiary-5.0.13 vendor/bundle/gems/simplecov-0.16.1/lib/simplecov/formatter/simple_formatter.rb
tdiary-5.0.12.1 vendor/bundle/gems/simplecov-0.16.1/lib/simplecov/formatter/simple_formatter.rb
tdiary-5.0.11 vendor/bundle/gems/simplecov-0.16.1/lib/simplecov/formatter/simple_formatter.rb
tdiary-5.0.8 vendor/bundle/gems/simplecov-0.16.1/lib/simplecov/formatter/simple_formatter.rb
tdiary-5.0.8 vendor/bundle/ruby/2.5.0/gems/simplecov-0.16.1/lib/simplecov/formatter/simple_formatter.rb
simplecov-0.16.1 lib/simplecov/formatter/simple_formatter.rb
simplecov-0.16.0 lib/simplecov/formatter/simple_formatter.rb