Sha256: 62e47211665639f9673de1f3d45547a1f0dae2f6ccf02bafbb0b052bc9ab34ef

Contents?: true

Size: 885 Bytes

Versions: 8

Compression:

Stored size: 885 Bytes

Contents

module Mutant
  class Reporter
    class CLI
      class Progress

        # Mutation progress reporter
        class Mutation < self

          handle(Runner::Mutation)

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

          # Run printer
          #
          # @return [self]
          #
          # @api private
          #
          def run
            unless running?
              char(success? ? SUCCESS : FAILURE)
            end
            self
          end

        private

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

        end # Mutation
      end # Progress
    end # CLI
  end # Reporter
end # Mutant

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
mutant-0.5.24 lib/mutant/reporter/cli/progress/mutation.rb
mutant-0.5.23 lib/mutant/reporter/cli/progress/mutation.rb
mutant-0.5.22 lib/mutant/reporter/cli/progress/mutation.rb
mutant-0.5.21 lib/mutant/reporter/cli/progress/mutation.rb
mutant-0.5.20 lib/mutant/reporter/cli/progress/mutation.rb
mutant-0.5.19 lib/mutant/reporter/cli/progress/mutation.rb
mutant-0.5.18 lib/mutant/reporter/cli/progress/mutation.rb
mutant-0.5.17 lib/mutant/reporter/cli/progress/mutation.rb