<commit_before># encoding: utf-8

class Daberu
  instance_methods.each do |m|
    undef_method m unless m.to_s =~ /^__|method_missing|respond_to?|object_id/
  end

  def initialize(obj = Object.new)
    @obj = obj
  end

  def method_missing(name, *args, &block)
    p "Class: %s, Method: %s, Arguments: %s, Block: %s" %  [@obj.class, name, args, block]
    @obj.send(name, *args, &block)
  end
end

<commit_msg>フォーマット文字列をインスタンス変数に修正 [modified format string to instance variable.]<commit_after># encoding: utf-8

class Daberu
  instance_methods.each do |m|
    undef_method m unless m.to_s =~ /^__|method_missing|respond_to?|object_id/
  end

  def initialize(obj = Object.new)
    @obj = obj
    @format = "Class: %s, Method: %s, Arguments: %s, Block: %s"
  end

  def method_missing(name, *args, &block)
    p @format %  [@obj.class, name, args, block]
    @obj.send(name, *args, &block)
  end
end


{'fraction_non_alphanumeric': 0.13984461709211987, 'fraction_numerical': 0.0022197558268590455, 'mean_word_length': 3.7724867724867726, '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': '1144789', 'n_tokens_mistral': 366, 'n_tokens_neox': 353, 'n_words': 92}