<commit_before>class Object
  def param_constructor(&block_for_each)
    self.class_eval('
    def initialize(params={}, &block)
      params.each do |attr, value|
        self.public_send("#{attr}=", value)
      end if params
      unless block.nil?
        block.call(self)
      end
      constructor_method if respond_to?(:constructor_method)
      block.call(self) if block
    end')
    unless block_for_each.nil?
      self.send(:define_method, :constructor_method, &block_for_each)
    end
  end
end<commit_msg>No need to use public_send after all.<commit_after>class Object
  def param_constructor(&block_for_each)
    self.class_eval('
    def initialize(params={}, &block)
      params.each do |attr, value|
        self.send("#{attr}=", value)
      end if params
      unless block.nil?
        block.call(self)
      end
      constructor_method if respond_to?(:constructor_method)
      block.call(self) if block
    end')
    unless block_for_each.nil?
      self.send(:define_method, :constructor_method, &block_for_each)
    end
  end
end
{'fraction_non_alphanumeric': 0.10312204351939451, 'fraction_numerical': 0.0, 'mean_word_length': 3.10077519379845, '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': '4506283', 'n_tokens_mistral': 327, 'n_tokens_neox': 328, 'n_words': 77}