Sha256: 1c4805f50a72122cfe540686fd4a2ee4d5f47e1d92657bddd82047d731454810

Contents?: true

Size: 957 Bytes

Versions: 24

Compression:

Stored size: 957 Bytes

Contents

# encoding: utf-8

module Mutant
  class Reporter
    class CLI
      class Printer

        # Printer for killer results
        class Killer < self

          handle(Mutant::Killer)

          SUCCESS = '.'.freeze
          FAILURE = 'F'.freeze

          # Run printer
          #
          # @return [undefined]
          #
          # @api private
          #
          def run
            if success?
              char(SUCCESS, Color::GREEN)
            else
              char(FAILURE, Color::RED)
            end
          end

        private

          # Write colorized char
          #
          # @param [String] char
          # @param [Color]
          #
          # @return [undefined]
          #
          # @api private
          #
          def char(char, color)
            output.write(colorize(color, char))
            output.flush
          end

        end # Killer
      end # Printer
    end # CLI
  end # Reporter
end # Mutant

Version data entries

24 entries across 24 versions & 1 rubygems

Version Path
mutant-0.5.12 lib/mutant/reporter/cli/printer/killer.rb
mutant-0.5.11 lib/mutant/reporter/cli/printer/killer.rb
mutant-0.5.10 lib/mutant/reporter/cli/printer/killer.rb
mutant-0.5.9 lib/mutant/reporter/cli/printer/killer.rb
mutant-0.5.8 lib/mutant/reporter/cli/printer/killer.rb
mutant-0.5.7 lib/mutant/reporter/cli/printer/killer.rb
mutant-0.5.6 lib/mutant/reporter/cli/printer/killer.rb
mutant-0.5.5 lib/mutant/reporter/cli/printer/killer.rb
mutant-0.5.4 lib/mutant/reporter/cli/printer/killer.rb
mutant-0.5.3 lib/mutant/reporter/cli/printer/killer.rb
mutant-0.5.2 lib/mutant/reporter/cli/printer/killer.rb
mutant-0.5.1 lib/mutant/reporter/cli/printer/killer.rb
mutant-0.5.0 lib/mutant/reporter/cli/printer/killer.rb
mutant-0.3.6 lib/mutant/reporter/cli/printer/killer.rb
mutant-0.3.5 lib/mutant/reporter/cli/printer/killer.rb
mutant-0.3.4 lib/mutant/reporter/cli/printer/killer.rb
mutant-0.3.3 lib/mutant/reporter/cli/printer/killer.rb
mutant-0.3.2 lib/mutant/reporter/cli/printer/killer.rb
mutant-0.3.1 lib/mutant/reporter/cli/printer/killer.rb
mutant-0.3.0 lib/mutant/reporter/cli/printer/killer.rb