<commit_before>module Mutant
  class Reporter
    # Reporter that reports in human readable format
    class CLI < self
      include Concord.new(:output, :format)

      # Build reporter
      #
      # @param [IO] output
      #
      # @return [Reporter::CLI]
      #
      # @api private
      #
      def self.build(output)
        tty = output.respond_to?(:tty?) && output.tty?
        format =
          if !Mutant.ci? && tty && Tput::INSTANCE.available
            Format::Framed.new(tty:  tty, tput: Tput::INSTANCE)
          else
            Format::Progressive.new(tty: tty)
          end

        new(output, format)
      end

      # Report start
      #
      # @param [Env] env
      #
      # @return [self]
      #
      # @api private
      #
      def start(env)
        write(format.start(env))
        self
      end

      # Report progress object
      #
      # @param [Runner::Collector] collector
      #
      # @return [self]
      #
      # @api private
      #
      def progress(collector)
        write(format.progress(collector))

        self
      end

      # Return report delay in seconds
      #
      # TODO: Move this to a callback registration
      #
      #   Reporters other than CLI that might exist in futures
      #   may only the final report. So providing a noop callback
      #   registration makes more sense than. As only CLI reporters
      #   exist currently I do not really care right now.
      #
      # @return [Float]
      #
      # @api private
      #
      def delay
        format.delay
      end

      # Report warning
      #
      # @param [String] message
      #
      # @return [self]
      #
      # @api private
      #
      def warn(message)
        output.puts(message)
        self
      end

      # Report env
      #
      # @param [Result::Env] env
      #
      # @return [self]
      #
      # @api private
      #
      def report(env)
        Printer::EnvResult.run(output, env)
        self
      end

    private

      # Write output frame
      #
      # @param [String] frame
      #
      # @return [undefined]
      #
      # @api private
      #
      def write(frame)
        output.write(frame)
      end

    end # CLI
  end # Reporter
end # Mutant
<commit_msg>Fix wording in comment<commit_after>module Mutant
  class Reporter
    # Reporter that reports in human readable format
    class CLI < self
      include Concord.new(:output, :format)

      # Build reporter
      #
      # @param [IO] output
      #
      # @return [Reporter::CLI]
      #
      # @api private
      #
      def self.build(output)
        tty = output.respond_to?(:tty?) && output.tty?
        format =
          if !Mutant.ci? && tty && Tput::INSTANCE.available
            Format::Framed.new(tty:  tty, tput: Tput::INSTANCE)
          else
            Format::Progressive.new(tty: tty)
          end

        new(output, format)
      end

      # Report start
      #
      # @param [Env] env
      #
      # @return [self]
      #
      # @api private
      #
      def start(env)
        write(format.start(env))
        self
      end

      # Report progress object
      #
      # @param [Runner::Collector] collector
      #
      # @return [self]
      #
      # @api private
      #
      def progress(collector)
        write(format.progress(collector))

        self
      end

      # Return report delay in seconds
      #
      # TODO: Move this to a callback registration
      #
      #   Reporters other than CLI that might exist in future
      #   may only need the final report. So providing a noop callback
      #   registration makes more sense for these.
      #   As only CLI reporters exist currently I do not really care right now.
      #
      # @return [Float]
      #
      # @api private
      #
      def delay
        format.delay
      end

      # Report warning
      #
      # @param [String] message
      #
      # @return [self]
      #
      # @api private
      #
      def warn(message)
        output.puts(message)
        self
      end

      # Report env
      #
      # @param [Result::Env] env
      #
      # @return [self]
      #
      # @api private
      #
      def report(env)
        Printer::EnvResult.run(output, env)
        self
      end

    private

      # Write output frame
      #
      # @param [String] frame
      #
      # @return [undefined]
      #
      # @api private
      #
      def write(frame)
        output.write(frame)
      end

    end # CLI
  end # Reporter
end # Mutant

{'fraction_non_alphanumeric': 0.09158960810215765, 'fraction_numerical': 0.0, 'mean_word_length': 1.4477370689655173, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1750680', 'n_tokens_mistral': 1352, 'n_tokens_neox': 1307, 'n_words': 371}