<commit_before>module Hubert
  module DSL
    class << self
      def extended(klass)
        builders[klass] = Builder.new
      end

      def builders
        @builder ||= {}
      end

      def builder_for(klass)
        builders.fetch(klass)
      end
    end


    def path(path, options = {})
      unless options.key?(:as)
        fail PathAliasNotSet, 'Please specify ":as" options when calling path method'
      end

      method_name = "#{options[:as]}_path"

      define_method(method_name) do |ctx = {}|
        DSL.builder_for(self.class).path(path, ctx)
      end
    end
  end
end
<commit_msg>Do not use extended hook in DSL module<commit_after>module Hubert
  module DSL
    class << self
      def builders
        @builder ||= {}
      end

      def builder_for(klass)
        builders.fetch(klass) do
          builders[klass] = Builder.new
        end
      end
    end


    def path(path, options = {})
      unless options.key?(:as)
        fail PathAliasNotSet, 'Please specify ":as" options when calling path method'
      end

      method_name = "#{options[:as]}_path"

      define_method(method_name) do |ctx = {}|
        DSL.builder_for(self.class).path(path, ctx)
      end
    end


  end
end

{'fraction_non_alphanumeric': 0.10073111291632819, 'fraction_numerical': 0.0, 'mean_word_length': 2.1269035532994924, 'pattern_counts': {'":': 2, '<': 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': '4847047', 'n_tokens_mistral': 388, 'n_tokens_neox': 378, 'n_words': 100}