<commit_before>h1. Enumerable Proxy

h2. Background

See "here":http://www.jacobrothstein.com/entries/enumerable-proxy and "here":http://www.jacobrothstein.com/entries/further-enumerable-proxy

h2. Installation

<pre><code>sudo gem install enumerable-proxy</code></pre>

h2. Usage

<pre><code>
require 'enumerable_proxy'

[1, 2, 3].proxy(:map) == 2 #=> [false, true, false]

[1, 2, 3].p(:map).to_s #=> ['1', '2', '3']

[1, 2, 3].pmap * 10 #=> [10, 20, 30]

#peach, pmap, pselect, preject, pall?, pany?, pdetect are all added to Array.
</code></pre>

To get even more succinct, require @enumerable_proxy/array_extensions@ and
it'll alias_method_chain Array#map, each, etc so if they are called with no block,
they will return a proxy for their method.

<code><pre>
require 'enumerable_proxy/array_extensions'

[1, 2, 3].map.to_s #=> ['1', '2', '3']
[1, 2, 3].map + 2 #=> [3, 4, 5]
<commit_msg>> 10 years of html and still not closing tags<commit_after>h1. Enumerable Proxy

h2. Background

See "here":http://www.jacobrothstein.com/entries/enumerable-proxy and "here":http://www.jacobrothstein.com/entries/further-enumerable-proxy

h2. Installation

<pre><code>sudo gem install enumerable-proxy</code></pre>

h2. Usage

<pre><code>
require 'enumerable_proxy'

[1, 2, 3].proxy(:map) == 2 #=> [false, true, false]

[1, 2, 3].p(:map).to_s #=> ['1', '2', '3']

[1, 2, 3].pmap * 10 #=> [10, 20, 30]

#peach, pmap, pselect, preject, pall?, pany?, pdetect are all added to Array.
</code></pre>

To get even more succinct, require @enumerable_proxy/array_extensions@ and
it'll alias_method_chain Array#map, each, etc so if they are called with no block,
they will return a proxy for their method.

<pre><code>
require 'enumerable_proxy/array_extensions'

[1, 2, 3].map.to_s #=> ['1', '2', '3']
[1, 2, 3].map + 2 #=> [3, 4, 5]

{'fraction_non_alphanumeric': 0.18116740088105726, 'fraction_numerical': 0.042951541850220265, 'mean_word_length': 4.713836477987422, 'pattern_counts': {'":': 4, '<': 23, '<?xml version=': 0, '>': 34, 'https://': 0, 'lorem ipsum': 0, 'www.': 4, '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': '7506491', 'n_tokens_mistral': 765, 'n_tokens_neox': 694, 'n_words': 205}