<commit_before>module Insult
  class Spy
    attr_reader :base_object, :method_name
    def initialize(object, method_name)
      @base_object, @method_name = object, method_name
      reset!
    end

    def hook
      raise "#{method_name} has already been hooked" if base_object.singleton_methods.include?(method_name)
      @original_method = base_object.method(method_name)

      arity_range = get_arity_range(@original_method.parameters)
      spy = self

      @base_object.define_singleton_method(method_name, lambda do |*args, &block|
        spy.check_arity!(arity_range, args.size)
        spy.called_with(self,args, &block)
      end)
    end<commit_msg>rename variables as to not class with possible method names<commit_after>module Insult
  class Spy
    attr_reader :base_object, :method_name
    def initialize(object, method_name)
      @base_object, @method_name = object, method_name
      reset!
    end

    def hook
      raise "#{method_name} has already been hooked" if base_object.singleton_methods.include?(method_name)
      @original_method = base_object.method(method_name)

      __insult_arity_range = get_arity_range(@original_method.parameters)
      __insult_spy = self

      @base_object.define_singleton_method(method_name) do |*args, &block|
        __insult_spy.check_arity!(__insult_arity_range, args.size)
        __insult_spy.called_with(self,args, &block)
      end
    end
{'fraction_non_alphanumeric': 0.08115737473535639, 'fraction_numerical': 0.0, 'mean_word_length': 3.8067796610169493, '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': '6025393', 'n_tokens_mistral': 448, 'n_tokens_neox': 442, 'n_words': 93}