<commit_before>module Schema
    # mattr_accessor :schema_name
    @@schema_name = Hash.new
    def table_name
        @@schema_name[self.name.split("::").first.downcase] +'.'+ super
        # Rails.logger.ap self.name.split("::").first.downcase
        # Rails.logger.ap @@schema_name[self.name.split("::").first.downcase]
    end

    def self.schema_name
        @@schema_name
    end

    def self.schema_name=(schema_name)
        @@schema_name["#{schema_name}"] = schema_name
    end

    # When this module is included, callback this function
    def self.included(mod)
        Rails.logger.info mod
        # Then add a callback function `self.extended` to the module that
        # includes schema module
        mod.instance_eval do
            # Create method `self.extended` on the child module
            def extended(mod)<commit_msg>Schema setup improved<commit_after>module Schema
    # mattr_accessor :schema_name
    @@schema_name = Hash.new
    def table_name
        # This is the old way of doing it. I think we will no longer use this
        # @@schema_name[self.name.split("::").first.downcase] +'.'+ super
        
        # New way
        self.name.split("::").first.downcase << '.' << super

    end

    def self.schema_name
        @@schema_name
    end

    def self.schema_name=(schema_name)
        # Rails.logger.ap schema_name
        # Rails.logger.ap @@schema_name

        @@schema_name["#{schema_name}"] = schema_name
    end

    # When this module is included, callback this function
    def self.included(mod)
        Rails.logger.info mod
        # Then add a callback function `self.extended` to the module that
        # includes schema module
        mod.instance_eval do
            # Create method `self.extended` on the child module
            def extended(mod)
{'fraction_non_alphanumeric': 0.10325786858089453, 'fraction_numerical': 0.0, 'mean_word_length': 2.418867924528302, 'pattern_counts': {'":': 5, '<': 7, '<?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': '7088822', 'n_tokens_mistral': 543, 'n_tokens_neox': 520, 'n_words': 141}