<commit_before>require 'perpetuity/attribute_set'
require 'perpetuity/attribute'
require 'perpetuity/validations'
require 'perpetuity/data_injectable'
require 'perpetuity/mongodb/query'

module Perpetuity
  class Mapper
    include DataInjectable
    attr_accessor :object, :original_object

    def initialize(klass=Object, &block)
      @mapped_class = klass
      instance_exec &block if block_given?
    end

    def self.generate_for(klass=Object, &block)
      mapper = new(klass, &block)
      mappers[klass] = mapper
    end

    def self.mappers
      @mappers ||= {}
    end

    def attribute_set
      @attribute_set ||= AttributeSet.new
    end

    def attribute name, type, options = {}
      attribute_set << Attribute.new(name, type, options)
    end

    def attributes
      attribute_set.map(&:name)
    end
<commit_msg>Remove old/unused attr_accessors<commit_after>require 'perpetuity/attribute_set'
require 'perpetuity/attribute'
require 'perpetuity/validations'
require 'perpetuity/data_injectable'
require 'perpetuity/mongodb/query'

module Perpetuity
  class Mapper
    include DataInjectable

    def initialize(klass=Object, &block)
      @mapped_class = klass
      instance_exec &block if block_given?
    end

    def self.generate_for(klass=Object, &block)
      mapper = new(klass, &block)
      mappers[klass] = mapper
    end

    def self.mappers
      @mappers ||= {}
    end

    def attribute_set
      @attribute_set ||= AttributeSet.new
    end

    def attribute name, type, options = {}
      attribute_set << Attribute.new(name, type, options)
    end

    def attributes
      attribute_set.map(&:name)
    end

{'fraction_non_alphanumeric': 0.08821752265861027, 'fraction_numerical': 0.0, 'mean_word_length': 3.3012987012987014, 'pattern_counts': {'":': 0, '<': 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': '205202', 'n_tokens_mistral': 523, 'n_tokens_neox': 519, 'n_words': 121}