<commit_before>module ROM
  class ClassBuilder
    attr_reader :options, :name, :parent

    def initialize(options)
      @options = options
      @name = options.fetch(:name)
      @parent = options.fetch(:parent)
    end

    def call
      klass = Class.new(parent)

      klass.class_eval <<-RUBY, __FILE__, __LINE__ + 1
        def self.name
          #{name.inspect}
        end

        def self.inspect
          name
        end

        def self.to_s
          name
        end
      RUBY

      yield(klass) if block_given?

      klass
    end
  end
end<commit_msg>Use Options in ClassBuilder<commit_after>module ROM
  class ClassBuilder
    include Options

    option :name, type: String, reader: true
    option :parent, type: Class, reader: true

    def call
      klass = Class.new(parent)

      klass.class_eval <<-RUBY, __FILE__, __LINE__ + 1
        def self.name
          #{name.inspect}
        end

        def self.inspect
          name
        end

        def self.to_s
          name
        end
      RUBY

      yield(klass) if block_given?

      klass
    end
  end
end
{'fraction_non_alphanumeric': 0.07149321266968325, 'fraction_numerical': 0.0018099547511312218, 'mean_word_length': 1.671497584541063, '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': '5194632', 'n_tokens_mistral': 348, 'n_tokens_neox': 333, 'n_words': 95}