<commit_before>module KPI
  module Report
    class Base
      extend KPI::Report::SuppressMemoization
      extend ActiveSupport::Memoizable

      include KPI::Report::DynamicDefinitions
      
      blacklist :initialize, :collect!, :entries, :time, :title

      def initialize(time=Time.now)
        @time = time
      end
      attr_reader :time

      def collect!
        self.class.defined_kpis.each {|kpi_method| send(kpi_method) }
        self
      end

      def entries
        Enumerator.new do |yielder|
          self.class.defined_kpis.each do |kpi_method|
            result = send(kpi_method)
            yielder.yield(Entry.new(result.shift, result.shift, result.shift))
          end
        end
      end

      def title
        self.class.name
      end
    end
  end
end<commit_msg>Fixing frozen array error in rails 2.3.8<commit_after>module KPI
  module Report
    class Base
      extend KPI::Report::SuppressMemoization
      extend ActiveSupport::Memoizable

      include KPI::Report::DynamicDefinitions
      
      blacklist :initialize, :collect!, :entries, :time, :title

      def initialize(time=Time.now)
        @time = time
      end
      attr_reader :time

      def collect!
        self.class.defined_kpis.each {|kpi_method| send(kpi_method) }
        self
      end

      def entries
        Enumerator.new do |yielder|
          self.class.defined_kpis.each do |kpi_method|
            result = send(kpi_method)
            yielder.yield(Entry.new(result.first, result.second, result.third))
          end
        end
      end

      def title
        self.class.name
      end
    end
  end
end
{'fraction_non_alphanumeric': 0.07907542579075426, 'fraction_numerical': 0.0018248175182481751, 'mean_word_length': 2.0406654343807764, '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': '1335899', 'n_tokens_mistral': 504, 'n_tokens_neox': 483, 'n_words': 115}