<commit_before>require 'ostruct'

module Reporta
  module Column
    extend ActiveSupport::Concern

    included do
      cattr_accessor :all_columns
      self.all_columns = {}
    end

    module ClassMethods
      def column(name, args = {})
        args[:title] ||= name.to_s.humanize
        args[:class_names] ||= ''
        all_columns[name] = OpenStruct.new(args)
      end
    end

    def value_for(record, column_name)
      if respond_to? column_name
        self.send column_name, record
      else
        record.send column_name
      end
    end

    def columns
      all_columns
    end

  end
end<commit_msg>Renamed Column all_columns to colums<commit_after>require 'ostruct'

module Reporta
  module Column
    extend ActiveSupport::Concern

    included do
      cattr_accessor :columns
      self.columns = {}
    end

    module ClassMethods
      def column(name, args = {})
        args[:title] ||= name.to_s.humanize
        args[:class_names] ||= ''
        columns[name] = OpenStruct.new(args)
      end
    end

    def value_for(record, column_name)
      if respond_to? column_name
        self.send column_name, record
      else
        record.send column_name
      end
    end

  end
end
{'fraction_non_alphanumeric': 0.07692307692307693, 'fraction_numerical': 0.0, 'mean_word_length': 2.2876344086021505, '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': '214546', 'n_tokens_mistral': 379, 'n_tokens_neox': 368, 'n_words': 91}