<commit_before>require 'uuidtools'

module ThumbleMonks
  module ActiveRecordUUID
    module Base
      def self.included(klass)
        klass.instance_eval do
          include InstanceMethods
          extend ClassMethods
          before_create :generate_active_record_uuid
          class_inheritable_accessor :uuid_generation_enabled
          attr_readonly :uuid
          attr_protected :uuid
          self.uuid_generation_enabled = true
        end
      end
    
      module ClassMethods
        def disable_uuid_generation
          self.uuid_generation_enabled = false
        end
      
        def enable_uuid_generation
          self.uuid_generation_enabled = true
        end
      end # ClassMethods
    
      module InstanceMethods

        def generate_active_record_uuid
          return true unless record_active_record_uuid?
          self.uuid = make_uuid
        end
      
        def make_uuid<commit_msg>Removing the attr_protected to allow users to use attr_accessible<commit_after>require 'uuidtools'

module ThumbleMonks
  module ActiveRecordUUID
    module Base
      def self.included(klass)
        klass.instance_eval do
          include InstanceMethods
          extend ClassMethods
          before_create :generate_active_record_uuid
          class_inheritable_accessor :uuid_generation_enabled
          attr_readonly :uuid
          self.uuid_generation_enabled = true
        end
      end
    
      module ClassMethods
        def disable_uuid_generation
          self.uuid_generation_enabled = false
        end
      
        def enable_uuid_generation
          self.uuid_generation_enabled = true
        end
      end # ClassMethods
    
      module InstanceMethods

        def generate_active_record_uuid
          return true unless record_active_record_uuid?
          self.uuid = make_uuid
        end
      
        def make_uuid
{'fraction_non_alphanumeric': 0.02382212811011117, 'fraction_numerical': 0.0, 'mean_word_length': 2.073170731707317, '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': '5700747', 'n_tokens_mistral': 476, 'n_tokens_neox': 466, 'n_words': 115}