<commit_before>module Biggs
  module ActiveRecordAdapter
    
    def self.included(base)
      base.extend ClassMethods
    end
    
    module ClassMethods
      def biggs_value_methods
        read_inheritable_attribute(:biggs_value_methods) || write_inheritable_attribute(:biggs_value_methods, {})
      end
      
      def biggs_instance
        read_inheritable_attribute(:biggs_formatter) || write_inheritable_attribute(:biggs_formatter, Biggs::Formatter.new)
      end
      
      def biggs(method_name=nil, options={})
        self.send(:include, Biggs::ActiveRecordAdapter::InstanceMethods)
        alias_method(method_name || :postal_address, :biggs_postal_address)
        
        value_methods = {}
        Biggs::Formatter::FIELDS.each do |field|
          value_methods[field] = options.delete(field) if options[field]
        end
        write_inheritable_attribute(:biggs_value_methods, value_methods)
        write_inheritable_attribute(:biggs_formatter, Biggs::Formatter.new(options))
      end
    end
    
    module InstanceMethods
      
      def biggs_postal_address<commit_msg>Refactored activerecord to include only basic setup method in ActiveRecord:Base<commit_after>module Biggs
  module ActiveRecordAdapter
    
    def self.included(base)
      base.extend(InitialClassMethods)
    end
    
    module InitialClassMethods
      def biggs(method_name=nil, options={})
        self.extend(ClassMethods)
        self.send(:include, Biggs::ActiveRecordAdapter::InstanceMethods)
        alias_method(method_name || :postal_address, :biggs_postal_address)

        value_methods = {}
        Biggs::Formatter::FIELDS.each do |field|
          value_methods[field] = options.delete(field) if options[field]
        end
        write_inheritable_attribute(:biggs_value_methods, value_methods)
        write_inheritable_attribute(:biggs_formatter, Biggs::Formatter.new(options))
      end
    end
    
    module ClassMethods
      def biggs_value_methods
        read_inheritable_attribute(:biggs_value_methods) || write_inheritable_attribute(:biggs_value_methods, {})
      end
      
      def biggs_instance
        read_inheritable_attribute(:biggs_formatter) || write_inheritable_attribute(:biggs_formatter, Biggs::Formatter.new)
      end
    end
    
    module InstanceMethods
      
      def biggs_postal_address
{'fraction_non_alphanumeric': 0.07407407407407407, 'fraction_numerical': 0.0, 'mean_word_length': 3.3680297397769516, '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': '890924', 'n_tokens_mistral': 668, 'n_tokens_neox': 660, 'n_words': 109}