<commit_before>dir = File.dirname(__FILE__)
require File.expand_path("#{dir}/requires.rb")

module GemInstaller
  class OutputListener
    attr_writer :echo, :output_proxy
    
    def initialize
      @messages = []
      @echo = true
    end
    
    def notify(msg)
      @messages.push(msg)
      @output_proxy.output(msg) if !@output_proxy.nil? and @echo
    end
    
    def read
      @messages.dup
    end

    def read!
      messages = @messages.dup
      @messages.clear
      messages
    end<commit_msg> r531@chadmac:  woolley | 2007-03-13 09:18:31 -0700  fix zentest warning about uninitialized instance variable<commit_after>dir = File.dirname(__FILE__)
require File.expand_path("#{dir}/requires.rb")

module GemInstaller
  class OutputListener
    attr_writer :echo, :output_proxy
    
    def initialize
      @messages = []
      @echo = true
      @output_proxy = nil
    end
    
    def notify(msg)
      @messages.push(msg)
      @output_proxy.output(msg) if !@output_proxy.nil? and @echo
    end
    
    def read
      @messages.dup
    end

    def read!
      messages = @messages.dup
      @messages.clear
      messages
    end
{'fraction_non_alphanumeric': 0.09350649350649351, 'fraction_numerical': 0.01818181818181818, 'mean_word_length': 2.4404761904761907, 'pattern_counts': {'":': 0, '<': 3, '<?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': '4607766', 'n_tokens_mistral': 379, 'n_tokens_neox': 363, 'n_words': 87}