<commit_before>= group_delegator

GroupDelegator provides a way to wrap a collection of objects and send method calls to the entire collection.
* Simple case: Bind a collection of existing objects to a common wrapper that will proxy the method calls to each object
  Example:
    require 'group_delegator'

    proxy_numbers = ["1", "2", "3"]
    proxy_all = SimpleGroupDelegator.new(proxy_numbers)
    proxy_data = proxy_all.to_i
      #=> {"1"=>1, "2"=>2, "3"=>3}

    #or if you just wanted the integers
    proxy_integers = proxy_all.to_i
      #=> [1, 2, 3]
    puts "proxied to_i: #{proxy_integers.values.inspect}"

* Why not just use Array#map to do the same transformation? i.e.:
    map_numbers =["1", "2", "3"]
    mapped_integers = map_numbers.map{|t| t.to_i}
    puts "mapped to_i: #{mapped_integers.inspect}"

* Let's compare
  * Group Delegator proxying
    proxy_numbers = ["1", "2", "3"]
    proxy_all = SimpleGroupDelegator.new(proxy_numbers)
    proxy_integers = proxy_all.to_i
    #lets add the string "times" to each number
    proxy_string = proxy_all<< " times"
    #then make it uppercase
    proxy_upcase = proxy_all.upcase

  * Array#map
    map_numbers =["1", "2", "3"]
    map_integers = map_numbers.map{|t| t.to_i}
    #lets add the string "times" to each number
    map_string = map_numbers.map{|t| t << " times"}
    #then make it uppercase
    map_upcase = map_string.map{|t| t.upcase}
<commit_msg>Updating readme doc<commit_after>= group_delegator

GroupDelegator provides a way to wrap a collection of objects and send method calls to the entire collection.
* Simple case: Bind a collection of existing objects to a common wrapper that will proxy the method calls to each object
  Example:
    require 'group_delegator'

    proxy_numbers = ["1", "2", "3"]
    proxy_all = SimpleGroupDelegator.new(proxy_numbers)
    proxy_data = proxy_all.to_i
      #=> {"1"=>1, "2"=>2, "3"=>3}

    #or if you just wanted the integers
    proxy_integers = proxy_all.to_i
      #=> [1, 2, 3]
    puts "proxied to_i: #{proxy_integers.values.inspect}"

* Why not just use Array#map to do the same transformation? i.e.:
    map_numbers =["1", "2", "3"]
    mapped_integers = map_numbers.map{|t| t.to_i}
    puts "mapped to_i: #{mapped_integers.inspect}"

* Let's compare
  * Group Delegator proxying
    
    #proxy by group_delegator
    proxy_numbers = ["1", "2", "3"]
    proxy_all = SimpleGroupDelegator.new(proxy_numbers)
    proxy_integers = proxy_all.to_i
    #lets add the string "times" to each number
    proxy_string = proxy_all<< " times"
    #then make it uppercase
    proxy_upcase = proxy_all.upcase

  * Array#map

    #tranform collection by Array#map
    map_numbers =["1", "2", "3"]
    map_integers = map_numbers.map{|t| t.to_i}
    #lets add the string "times" to each number
    map_string = map_numbers.map{|t| t << " times"}
    #then make it uppercase
    map_upcase = map_string.map{|t| t.upcase}

{'fraction_non_alphanumeric': 0.11470388019060586, 'fraction_numerical': 0.014295439074200136, 'mean_word_length': 3.5921875, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 13, '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': '1715015', 'n_tokens_mistral': 1044, 'n_tokens_neox': 1011, 'n_words': 309}