Sha256: 78fbf2485b27b58fe8dc16d739591becf9b3c025ac30c82f9e358086c6ea10d2

Contents?: true

Size: 638 Bytes

Versions: 1

Compression:

Stored size: 638 Bytes

Contents

module I18n
  module Coverage
    module Printers
      class BasicPrinter
        def self.print(report)
          new(report).print
        end

        def initialize(report)
          @report = report
        end

        def print
          puts ''
          puts "I18n Coverage: #{@report[:percentage_used].round(2)}% of the keys used"
          puts "#{@report[:key_count]} keys found in yml files, #{@report[:used_key_count]} keys used during the tests"

          return unless @report[:unused_keys]

          puts 'Unused keys:'
          @report[:unused_keys].map { |k| puts "  #{k}" }
        end
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
i18n-coverage-0.2.0 lib/i18n/coverage/printers/basic_printer.rb