<commit_before>require 'wright/util'

module Wright
  module Resource
    def self.register(resource_class)
      method_name = Util.class_to_resource_name(resource_class)
      define_method(method_name) do |name, &block|
        Resource.yield_resource(resource_class, name, &block)
      end
    end

    private
    def self.yield_resource(resource_class, name, &block)<commit_msg>Remove hardcoded module name in Resource::register<commit_after>require 'wright/util'

module Wright
  module Resource
    def self.register(resource_class)
      method_name = Util.class_to_resource_name(resource_class)
      this_module = self
      define_method(method_name) do |name, &block|
        this_module.yield_resource(resource_class, name, &block)
      end
    end

    private
    def self.yield_resource(resource_class, name, &block)
{'fraction_non_alphanumeric': 0.07784431137724551, 'fraction_numerical': 0.0, 'mean_word_length': 4.066666666666666, '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': '2837408', 'n_tokens_mistral': 253, 'n_tokens_neox': 244, 'n_words': 54}