shenanigans 1.0.10 → 1.0.11

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 2e044d2e0504fe9effa8d5ab1ded585d95a0d0c1
4
- data.tar.gz: a249b7f56f152919252ad63491f26d77ed00868e
3
+ metadata.gz: 9053b8f68fa13d513448f8ac266a9cade66c4352
4
+ data.tar.gz: 0d030150d1978caf219710b256aad90ab7f708c2
5
5
  SHA512:
6
- metadata.gz: 970384c5685779c928b2cf4347d4722148999ab9962bf0c9b9bafe7b64d5bbd437e0a8e2359b4387b2857571f8007fdbe5c964aa2c994111f5424f67bb535000
7
- data.tar.gz: 4700cacb85b89461dc89ad01f954a8b2b5d0a632307c8c36713f3125b588fc91007b1d8a6450a1916a2aa88498b6cd06e577c0e4b616eab13427f9f086edb58b
6
+ metadata.gz: fdc433aa82c73dce7da543c65cf4a7dfa5c3566e24e5a1a314ae998fc942bfe5a6320d5d3e8b1850dfb856e70c6f08e5d573ec27a749cfa2dd5ecd11a8ceb215
7
+ data.tar.gz: b6a6e67c9e57677d7482dabc71054a9dd2c17df8e383c56fb6e4cd5e286974c384a040d6182041c5ec9c65dda79e99682cd774227fff6c5b26e09541b99efb91
data/doc/Array.html CHANGED
@@ -237,9 +237,9 @@ symbol.</p>
237
237
 
238
238
  <p>Returns an array containing elements exclusive between two arrays.</p>
239
239
 
240
- <pre class="ruby">[<span class="ruby-value">1</span>, <span class="ruby-value">2</span>, <span class="ruby-value">3</span>] <span class="ruby-operator">^</span> [<span class="ruby-value">1</span>, <span class="ruby-value">2</span>, <span class="ruby-value">4</span>]
241
- <span class="ruby-comment">#=&gt; [3, 4]</span>
242
- </pre>
240
+ <pre class="code ruby"><code class="ruby"><span class='lbracket'>[</span><span class='int'>1</span><span class='comma'>,</span> <span class='int'>2</span><span class='comma'>,</span> <span class='int'>3</span><span class='rbracket'>]</span> <span class='op'>^</span> <span class='lbracket'>[</span><span class='int'>1</span><span class='comma'>,</span> <span class='int'>2</span><span class='comma'>,</span> <span class='int'>4</span><span class='rbracket'>]</span>
241
+ <span class='comment'>#=&gt; [3, 4]
242
+ </span></code></pre>
243
243
 
244
244
 
245
245
  </div>
@@ -283,10 +283,10 @@ symbol.</p>
283
283
  <p>Generates random subarrays. Uses random numbers and bit-fiddling to assure
284
284
  performant uniform distributions even for large arrays.</p>
285
285
 
286
- <pre class="ruby"><span class="ruby-identifier">a</span> = <span class="ruby-operator">*</span><span class="ruby-value">1</span><span class="ruby-operator">..</span><span class="ruby-value">5</span>
287
- <span class="ruby-identifier">a</span>.<span class="ruby-identifier">random_subarray</span>(<span class="ruby-value">3</span>)
288
- <span class="ruby-comment">#=&gt; [[1, 3, 5], [2, 4], [1, 3, 4, 5]]</span>
289
- </pre>
286
+ <pre class="code ruby"><code class="ruby"><span class='id identifier rubyid_a'>a</span> <span class='op'>=</span> <span class='op'>*</span><span class='int'>1</span><span class='op'>..</span><span class='int'>5</span>
287
+ <span class='id identifier rubyid_a'>a</span><span class='period'>.</span><span class='id identifier rubyid_random_subarray'>random_subarray</span><span class='lparen'>(</span><span class='int'>3</span><span class='rparen'>)</span>
288
+ <span class='comment'>#=&gt; [[1, 3, 5], [2, 4], [1, 3, 4, 5]]
289
+ </span></code></pre>
290
290
 
291
291
 
292
292
  </div>
@@ -354,14 +354,14 @@ intermediate values. Has the same interface as
354
354
  both can be supplied. This method may eventually be moved to the
355
355
  <code>Enumerable</code> module.</p>
356
356
 
357
- <pre class="ruby"><span class="ruby-identifier">a</span> = [<span class="ruby-operator">*</span><span class="ruby-value">1</span><span class="ruby-operator">..</span><span class="ruby-value">4</span>]
358
- <span class="ruby-identifier">a</span>.<span class="ruby-identifier">reductions</span>(:<span class="ruby-operator">+</span>)
359
- <span class="ruby-comment">#=&gt; 10</span>
360
- <span class="ruby-identifier">a</span>.<span class="ruby-identifier">reductions</span>(<span class="ruby-value">50</span>, :<span class="ruby-operator">+</span>)
361
- <span class="ruby-comment">#=&gt; 60</span>
362
- <span class="ruby-node">%w(a b c)</span>.<span class="ruby-identifier">reductions</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">s1</span>, <span class="ruby-identifier">s2</span><span class="ruby-operator">|</span> <span class="ruby-identifier">s1</span><span class="ruby-operator">+</span><span class="ruby-identifier">s2</span> }
363
- <span class="ruby-comment">#=&gt; [&quot;a&quot;, &quot;ab&quot;, &quot;abc&quot;]</span>
364
- </pre>
357
+ <pre class="code ruby"><code class="ruby"><span class='id identifier rubyid_a'>a</span> <span class='op'>=</span> <span class='lbracket'>[</span><span class='op'>*</span><span class='int'>1</span><span class='op'>..</span><span class='int'>4</span><span class='rbracket'>]</span>
358
+ <span class='id identifier rubyid_a'>a</span><span class='period'>.</span><span class='id identifier rubyid_reductions'>reductions</span><span class='lparen'>(</span><span class='symbol'>:+</span><span class='rparen'>)</span>
359
+ <span class='comment'>#=&gt; 10
360
+ </span><span class='id identifier rubyid_a'>a</span><span class='period'>.</span><span class='id identifier rubyid_reductions'>reductions</span><span class='lparen'>(</span><span class='int'>50</span><span class='comma'>,</span> <span class='symbol'>:+</span><span class='rparen'>)</span>
361
+ <span class='comment'>#=&gt; 60
362
+ </span><span class='qwords_beg'>%w(</span><span class='tstring_content'>a</span><span class='words_sep'> </span><span class='tstring_content'>b</span><span class='words_sep'> </span><span class='tstring_content'>c</span><span class='words_sep'>)</span><span class='period'>.</span><span class='id identifier rubyid_reductions'>reductions</span> <span class='lbrace'>{</span> <span class='op'>|</span><span class='id identifier rubyid_s1'>s1</span><span class='comma'>,</span> <span class='id identifier rubyid_s2'>s2</span><span class='op'>|</span> <span class='id identifier rubyid_s1'>s1</span><span class='op'>+</span><span class='id identifier rubyid_s2'>s2</span> <span class='rbrace'>}</span>
363
+ <span class='comment'>#=&gt; [&quot;a&quot;, &quot;ab&quot;, &quot;abc&quot;]
364
+ </span></code></pre>
365
365
 
366
366
 
367
367
  </div>
@@ -449,17 +449,17 @@ both can be supplied. This method may eventually be moved to the
449
449
  the provided block or symbol. The resulting array will be as long as the
450
450
  shorter of the two arrays.</p>
451
451
 
452
- <pre class="ruby">[<span class="ruby-value">1</span>,<span class="ruby-value">2</span>,<span class="ruby-value">3</span>].<span class="ruby-identifier">zip_with</span>([<span class="ruby-value">6</span>,<span class="ruby-value">5</span>,<span class="ruby-value">4</span>], :<span class="ruby-operator">+</span>)
453
- <span class="ruby-comment">#=&gt; [7, 7, 7]</span>
454
- <span class="ruby-node">%w(a b)</span>.<span class="ruby-identifier">zip_with</span>(<span class="ruby-node">%w(c d)</span>, :<span class="ruby-operator">+</span>)
455
- <span class="ruby-comment">#=&gt; [&quot;ac&quot;, &quot;bd&quot;]</span>
456
- </pre>
452
+ <pre class="code ruby"><code class="ruby"><span class='lbracket'>[</span><span class='int'>1</span><span class='comma'>,</span><span class='int'>2</span><span class='comma'>,</span><span class='int'>3</span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_zip_with'>zip_with</span><span class='lparen'>(</span><span class='lbracket'>[</span><span class='int'>6</span><span class='comma'>,</span><span class='int'>5</span><span class='comma'>,</span><span class='int'>4</span><span class='rbracket'>]</span><span class='comma'>,</span> <span class='symbol'>:+</span><span class='rparen'>)</span>
453
+ <span class='comment'>#=&gt; [7, 7, 7]
454
+ </span><span class='qwords_beg'>%w(</span><span class='tstring_content'>a</span><span class='words_sep'> </span><span class='tstring_content'>b</span><span class='words_sep'>)</span><span class='period'>.</span><span class='id identifier rubyid_zip_with'>zip_with</span><span class='lparen'>(</span><span class='qwords_beg'>%w(</span><span class='tstring_content'>c</span><span class='words_sep'> </span><span class='tstring_content'>d</span><span class='words_sep'>)</span><span class='comma'>,</span> <span class='symbol'>:+</span><span class='rparen'>)</span>
455
+ <span class='comment'>#=&gt; [&quot;ac&quot;, &quot;bd&quot;]
456
+ </span></code></pre>
457
457
 
458
458
  <p>For more complex combinations, a block can be provided:</p>
459
459
 
460
- <pre class="ruby">[<span class="ruby-value">1</span>,<span class="ruby-value">2</span>,<span class="ruby-value">3</span>].<span class="ruby-identifier">zip_with</span>([<span class="ruby-value">6</span>,<span class="ruby-value">5</span>,<span class="ruby-value">4</span>]) { <span class="ruby-operator">|</span><span class="ruby-identifier">a</span>,<span class="ruby-identifier">b</span><span class="ruby-operator">|</span> <span class="ruby-value">3</span><span class="ruby-operator">*</span><span class="ruby-identifier">a</span><span class="ruby-operator">+</span><span class="ruby-value">2</span><span class="ruby-operator">*</span><span class="ruby-identifier">b</span> }
461
- <span class="ruby-comment">#=&gt; [15, 16, 17]</span>
462
- </pre>
460
+ <pre class="code ruby"><code class="ruby"><span class='lbracket'>[</span><span class='int'>1</span><span class='comma'>,</span><span class='int'>2</span><span class='comma'>,</span><span class='int'>3</span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_zip_with'>zip_with</span><span class='lparen'>(</span><span class='lbracket'>[</span><span class='int'>6</span><span class='comma'>,</span><span class='int'>5</span><span class='comma'>,</span><span class='int'>4</span><span class='rbracket'>]</span><span class='rparen'>)</span> <span class='lbrace'>{</span> <span class='op'>|</span><span class='id identifier rubyid_a'>a</span><span class='comma'>,</span><span class='id identifier rubyid_b'>b</span><span class='op'>|</span> <span class='int'>3</span><span class='op'>*</span><span class='id identifier rubyid_a'>a</span><span class='op'>+</span><span class='int'>2</span><span class='op'>*</span><span class='id identifier rubyid_b'>b</span> <span class='rbrace'>}</span>
461
+ <span class='comment'>#=&gt; [15, 16, 17]
462
+ </span></code></pre>
463
463
 
464
464
 
465
465
  </div>
@@ -509,9 +509,9 @@ shorter of the two arrays.</p>
509
509
  </div>
510
510
 
511
511
  <div id="footer">
512
- Generated on Tue Dec 31 15:41:29 2013 by
512
+ Generated on Fri Jan 24 17:13:27 2014 by
513
513
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
514
- 0.8.7.3 (ruby-2.0.0).
514
+ 0.8.7.3 (ruby-2.1.0).
515
515
  </div>
516
516
 
517
517
  </body>
data/doc/Fixnum.html CHANGED
@@ -161,13 +161,13 @@
161
161
 
162
162
  <p>Returns the length of the number&#39;s string representation.</p>
163
163
 
164
- <pre class="ruby"><span class="ruby-value">0</span>.<span class="ruby-identifier">string_length</span>
165
- <span class="ruby-comment">#=&gt; 1</span>
166
- <span class="ruby-value">123</span>.<span class="ruby-identifier">string_length</span>
167
- <span class="ruby-comment">#=&gt; 3</span>
168
- <span class="ruby-value">-1</span>.<span class="ruby-identifier">string_length</span>
169
- <span class="ruby-comment">#=&gt; 2</span>
170
- </pre>
164
+ <pre class="code ruby"><code class="ruby"><span class='int'>0</span><span class='period'>.</span><span class='id identifier rubyid_string_length'>string_length</span>
165
+ <span class='comment'>#=&gt; 1
166
+ </span><span class='int'>123</span><span class='period'>.</span><span class='id identifier rubyid_string_length'>string_length</span>
167
+ <span class='comment'>#=&gt; 3
168
+ </span><span class='op'>-</span><span class='int'>1</span><span class='period'>.</span><span class='id identifier rubyid_string_length'>string_length</span>
169
+ <span class='comment'>#=&gt; 2
170
+ </span></code></pre>
171
171
 
172
172
 
173
173
  </div>
@@ -205,9 +205,9 @@
205
205
  </div>
206
206
 
207
207
  <div id="footer">
208
- Generated on Tue Dec 31 15:41:29 2013 by
208
+ Generated on Fri Jan 24 17:13:28 2014 by
209
209
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
210
- 0.8.7.3 (ruby-2.0.0).
210
+ 0.8.7.3 (ruby-2.1.0).
211
211
  </div>
212
212
 
213
213
  </body>
data/doc/Hash.html CHANGED
@@ -211,12 +211,12 @@
211
211
 
212
212
  <p>Returns a new hash only with the specified keys (if present).</p>
213
213
 
214
- <pre class="ruby"><span class="ruby-identifier">hash</span> = { <span class="ruby-identifier">a</span><span class="ruby-operator">:</span> <span class="ruby-value">1</span>, <span class="ruby-identifier">b</span><span class="ruby-operator">:</span> <span class="ruby-value">2</span>, <span class="ruby-identifier">c</span><span class="ruby-operator">:</span> <span class="ruby-value">3</span> }
215
- <span class="ruby-identifier">hash</span>.<span class="ruby-identifier">extract</span>(:<span class="ruby-identifier">b</span>, :<span class="ruby-identifier">a</span>)
216
- <span class="ruby-comment">#=&gt; { a: 1, b: 2 }</span>
217
- <span class="ruby-identifier">hash</span>.<span class="ruby-identifier">extract</span>(:<span class="ruby-identifier">a</span>, :<span class="ruby-identifier">d</span>)
218
- <span class="ruby-comment">#=&gt; { a: 1}</span>
219
- </pre>
214
+ <pre class="code ruby"><code class="ruby"><span class='id identifier rubyid_hash'>hash</span> <span class='op'>=</span> <span class='lbrace'>{</span> <span class='label'>a:</span> <span class='int'>1</span><span class='comma'>,</span> <span class='label'>b:</span> <span class='int'>2</span><span class='comma'>,</span> <span class='label'>c:</span> <span class='int'>3</span> <span class='rbrace'>}</span>
215
+ <span class='id identifier rubyid_hash'>hash</span><span class='period'>.</span><span class='id identifier rubyid_extract'>extract</span><span class='lparen'>(</span><span class='symbol'>:b</span><span class='comma'>,</span> <span class='symbol'>:a</span><span class='rparen'>)</span>
216
+ <span class='comment'>#=&gt; { a: 1, b: 2 }
217
+ </span><span class='id identifier rubyid_hash'>hash</span><span class='period'>.</span><span class='id identifier rubyid_extract'>extract</span><span class='lparen'>(</span><span class='symbol'>:a</span><span class='comma'>,</span> <span class='symbol'>:d</span><span class='rparen'>)</span>
218
+ <span class='comment'>#=&gt; { a: 1}
219
+ </span></code></pre>
220
220
 
221
221
 
222
222
  </div>
@@ -261,20 +261,20 @@
261
261
 
262
262
  <p>Checks if a hash has a certain structure.</p>
263
263
 
264
- <pre class="ruby"><span class="ruby-identifier">h</span> = { <span class="ruby-identifier">k1</span><span class="ruby-operator">:</span> <span class="ruby-value">1</span>, <span class="ruby-identifier">k2</span><span class="ruby-operator">:</span> <span class="ruby-string">&quot;1&quot;</span> }
265
- <span class="ruby-identifier">h</span>.<span class="ruby-identifier">has_shape?</span>(<span class="ruby-identifier">k1</span><span class="ruby-operator">:</span> <span class="ruby-constant">Fixnum</span>, <span class="ruby-identifier">k2</span><span class="ruby-operator">:</span> <span class="ruby-constant">String</span>)
266
- <span class="ruby-comment">#=&gt; true</span>
267
- <span class="ruby-identifier">h</span>.<span class="ruby-identifier">has_shape?</span>(<span class="ruby-identifier">k1</span><span class="ruby-operator">:</span> <span class="ruby-constant">Class</span>, <span class="ruby-identifier">k2</span><span class="ruby-operator">:</span> <span class="ruby-constant">String</span>)
268
- <span class="ruby-comment">#=&gt; false</span>
269
- </pre>
264
+ <pre class="code ruby"><code class="ruby"><span class='id identifier rubyid_h'>h</span> <span class='op'>=</span> <span class='lbrace'>{</span> <span class='label'>k1:</span> <span class='int'>1</span><span class='comma'>,</span> <span class='label'>k2:</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>1</span><span class='tstring_end'>&quot;</span></span> <span class='rbrace'>}</span>
265
+ <span class='id identifier rubyid_h'>h</span><span class='period'>.</span><span class='id identifier rubyid_has_shape?'>has_shape?</span><span class='lparen'>(</span><span class='label'>k1:</span> <span class='const'>Fixnum</span><span class='comma'>,</span> <span class='label'>k2:</span> <span class='const'>String</span><span class='rparen'>)</span>
266
+ <span class='comment'>#=&gt; true
267
+ </span><span class='id identifier rubyid_h'>h</span><span class='period'>.</span><span class='id identifier rubyid_has_shape?'>has_shape?</span><span class='lparen'>(</span><span class='label'>k1:</span> <span class='const'>Class</span><span class='comma'>,</span> <span class='label'>k2:</span> <span class='const'>String</span><span class='rparen'>)</span>
268
+ <span class='comment'>#=&gt; false
269
+ </span></code></pre>
270
270
 
271
271
  <p>It also works with compound data structures.</p>
272
272
 
273
- <pre class="ruby"><span class="ruby-identifier">h</span> = { <span class="ruby-identifier">k1</span><span class="ruby-operator">:</span> [], <span class="ruby-identifier">k2</span><span class="ruby-operator">:</span> { <span class="ruby-identifier">k3</span><span class="ruby-operator">:</span> <span class="ruby-constant">Struct</span>.<span class="ruby-identifier">new</span>(<span class="ruby-string">&quot;Foo&quot;</span>) } }
274
- <span class="ruby-identifier">shape</span> = { <span class="ruby-identifier">k1</span><span class="ruby-operator">:</span> <span class="ruby-constant">Array</span>, <span class="ruby-identifier">k2</span><span class="ruby-operator">:</span> { <span class="ruby-identifier">k3</span><span class="ruby-operator">:</span> <span class="ruby-constant">Module</span> } }
275
- <span class="ruby-identifier">h</span>.<span class="ruby-identifier">has_shape?</span>(<span class="ruby-identifier">shape</span>)
276
- <span class="ruby-comment">#=&gt; true</span>
277
- </pre>
273
+ <pre class="code ruby"><code class="ruby"><span class='id identifier rubyid_h'>h</span> <span class='op'>=</span> <span class='lbrace'>{</span> <span class='label'>k1:</span> <span class='lbracket'>[</span><span class='rbracket'>]</span><span class='comma'>,</span> <span class='label'>k2:</span> <span class='lbrace'>{</span> <span class='label'>k3:</span> <span class='const'>Struct</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>Foo</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span> <span class='rbrace'>}</span> <span class='rbrace'>}</span>
274
+ <span class='id identifier rubyid_shape'>shape</span> <span class='op'>=</span> <span class='lbrace'>{</span> <span class='label'>k1:</span> <span class='const'>Array</span><span class='comma'>,</span> <span class='label'>k2:</span> <span class='lbrace'>{</span> <span class='label'>k3:</span> <span class='const'>Module</span> <span class='rbrace'>}</span> <span class='rbrace'>}</span>
275
+ <span class='id identifier rubyid_h'>h</span><span class='period'>.</span><span class='id identifier rubyid_has_shape?'>has_shape?</span><span class='lparen'>(</span><span class='id identifier rubyid_shape'>shape</span><span class='rparen'>)</span>
276
+ <span class='comment'>#=&gt; true
277
+ </span></code></pre>
278
278
 
279
279
 
280
280
  </div>
@@ -335,8 +335,8 @@
335
335
  <p>Recursively converts a <code>Hash</code> and all nested <code>Hash</code>es
336
336
  to <code>OpenStruct</code>s. Especially useful for parsing YAML.</p>
337
337
 
338
- <pre class="ruby"><span class="ruby-identifier">yaml</span>=<span class="ruby-value">&lt;&lt;EOY
339
- subject: Programming Languages
338
+ <pre class="code ruby"><code class="ruby"><span class='id identifier rubyid_yaml'>yaml</span><span class='op'>=</span><span class='heredoc_beg'>&lt;&lt;EOY</span>
339
+ <span class='tstring_content'>subject: Programming Languages
340
340
  languages:
341
341
  - name : Ruby
342
342
  creator : Matz
@@ -344,15 +344,15 @@ languages:
344
344
  creator : Guido van Rossum
345
345
  - name : Perl
346
346
  creator : Larry Wall
347
- EOY</span>
348
- <span class="ruby-identifier">struct</span> = <span class="ruby-constant">YAML</span>.<span class="ruby-identifier">load</span>(<span class="ruby-identifier">yaml</span>).<span class="ruby-identifier">to_ostruct</span>
349
- <span class="ruby-identifier">struct</span>.<span class="ruby-identifier">subject</span>
350
- <span class="ruby-comment">#=&gt; &quot;Programming Languages&quot;</span>
351
- <span class="ruby-identifier">struct</span>.<span class="ruby-identifier">languages</span>.<span class="ruby-identifier">first</span>
352
- <span class="ruby-comment">#=&gt; #&lt;OpenStruct name=&quot;Ruby&quot;, creator=&quot;Matz&quot;&gt;</span>
353
- <span class="ruby-identifier">struct</span>.<span class="ruby-identifier">languages</span>.<span class="ruby-identifier">first</span>.<span class="ruby-identifier">creator</span>
354
- <span class="ruby-comment">#=&gt; &quot;Matz&quot;</span>
355
- </pre>
347
+ </span><span class='heredoc_end'>EOY
348
+ </span><span class='id identifier rubyid_struct'>struct</span> <span class='op'>=</span> <span class='const'>YAML</span><span class='period'>.</span><span class='id identifier rubyid_load'>load</span><span class='lparen'>(</span><span class='id identifier rubyid_yaml'>yaml</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_to_ostruct'>to_ostruct</span>
349
+ <span class='id identifier rubyid_struct'>struct</span><span class='period'>.</span><span class='id identifier rubyid_subject'>subject</span>
350
+ <span class='comment'>#=&gt; &quot;Programming Languages&quot;
351
+ </span><span class='id identifier rubyid_struct'>struct</span><span class='period'>.</span><span class='id identifier rubyid_languages'>languages</span><span class='period'>.</span><span class='id identifier rubyid_first'>first</span>
352
+ <span class='comment'>#=&gt; #&lt;OpenStruct name=&quot;Ruby&quot;, creator=&quot;Matz&quot;&gt;
353
+ </span><span class='id identifier rubyid_struct'>struct</span><span class='period'>.</span><span class='id identifier rubyid_languages'>languages</span><span class='period'>.</span><span class='id identifier rubyid_first'>first</span><span class='period'>.</span><span class='id identifier rubyid_creator'>creator</span>
354
+ <span class='comment'>#=&gt; &quot;Matz&quot;
355
+ </span></code></pre>
356
356
 
357
357
 
358
358
  </div>
@@ -406,9 +406,9 @@ EOY</span>
406
406
  </div>
407
407
 
408
408
  <div id="footer">
409
- Generated on Tue Dec 31 15:41:29 2013 by
409
+ Generated on Fri Jan 24 17:13:27 2014 by
410
410
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
411
- 0.8.7.3 (ruby-2.0.0).
411
+ 0.8.7.3 (ruby-2.1.0).
412
412
  </div>
413
413
 
414
414
  </body>
data/doc/Kernel.html CHANGED
@@ -246,12 +246,12 @@
246
246
  <p>Composes a list of functions. Functions can be specified as symbols or
247
247
  lambdas.</p>
248
248
 
249
- <pre class="ruby">[<span class="ruby-string">&quot;foo bar&quot;</span>, <span class="ruby-string">&quot;baz qux&quot;</span>].<span class="ruby-identifier">map</span> <span class="ruby-operator">&amp;</span><span class="ruby-identifier">fn</span>(:<span class="ruby-identifier">split</span>, :<span class="ruby-identifier">last</span>)
250
- <span class="ruby-comment">#=&gt; [&quot;bar&quot;, &quot;qux&quot;]</span>
251
-
252
- (<span class="ruby-value">1</span><span class="ruby-operator">..</span><span class="ruby-value">3</span>).<span class="ruby-identifier">map</span> <span class="ruby-operator">&amp;</span><span class="ruby-identifier">fn</span>(:<span class="ruby-keyword">next</span>, <span class="ruby-operator">-</span><span class="ruby-operator">&gt;</span> <span class="ruby-identifier">x</span> { <span class="ruby-identifier">x</span> <span class="ruby-operator">*</span> <span class="ruby-identifier">x</span> }, <span class="ruby-operator">-</span><span class="ruby-operator">&gt;</span> <span class="ruby-identifier">x</span> { <span class="ruby-identifier">x</span>.<span class="ruby-identifier">to_f</span> <span class="ruby-operator">/</span> <span class="ruby-value">2</span> } )
253
- <span class="ruby-comment">#=&gt; [2.0, 4.5, 8.0]</span>
254
- </pre>
249
+ <pre class="code ruby"><code class="ruby"><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>foo bar</span><span class='tstring_end'>&quot;</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>baz qux</span><span class='tstring_end'>&quot;</span></span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_map'>map</span> <span class='op'>&amp;</span><span class='id identifier rubyid_fn'>fn</span><span class='lparen'>(</span><span class='symbol'>:split</span><span class='comma'>,</span> <span class='symbol'>:last</span><span class='rparen'>)</span>
250
+ <span class='comment'>#=&gt; [&quot;bar&quot;, &quot;qux&quot;]
251
+ </span>
252
+ <span class='lparen'>(</span><span class='int'>1</span><span class='op'>..</span><span class='int'>3</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_map'>map</span> <span class='op'>&amp;</span><span class='id identifier rubyid_fn'>fn</span><span class='lparen'>(</span><span class='symbol'>:next</span><span class='comma'>,</span> <span class='tlambda'>-&gt;</span> <span class='id identifier rubyid_x'>x</span> <span class='tlambeg'>{</span> <span class='id identifier rubyid_x'>x</span> <span class='op'>*</span> <span class='id identifier rubyid_x'>x</span> <span class='rbrace'>}</span><span class='comma'>,</span> <span class='tlambda'>-&gt;</span> <span class='id identifier rubyid_x'>x</span> <span class='tlambeg'>{</span> <span class='id identifier rubyid_x'>x</span><span class='period'>.</span><span class='id identifier rubyid_to_f'>to_f</span> <span class='op'>/</span> <span class='int'>2</span> <span class='rbrace'>}</span> <span class='rparen'>)</span>
253
+ <span class='comment'>#=&gt; [2.0, 4.5, 8.0]
254
+ </span></code></pre>
255
255
 
256
256
 
257
257
  </div>
@@ -304,14 +304,14 @@ lambdas.</p>
304
304
  method <code>raw_input</code>, but also can be supplied with an optional
305
305
  conversion method.</p>
306
306
 
307
- <pre class="ruby"><span class="ruby-identifier">prompt</span>(<span class="ruby-string">&quot;Prompt&gt; &quot;</span>)
308
- <span class="ruby-constant">Prompt</span><span class="ruby-operator">&gt;</span> <span class="ruby-value">12</span>
309
- <span class="ruby-comment">#=&gt; &quot;12&quot;</span>
310
-
311
- <span class="ruby-identifier">prompt</span>(<span class="ruby-string">&quot;Prompt&gt; &quot;</span>, :<span class="ruby-identifier">to_f</span>)
312
- <span class="ruby-constant">Prompt</span><span class="ruby-operator">&gt;</span> <span class="ruby-value">12</span>
313
- <span class="ruby-comment">#=&gt; 12.0</span>
314
- </pre>
307
+ <pre class="code ruby"><code class="ruby"><span class='id identifier rubyid_prompt'>prompt</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>Prompt&gt; </span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span>
308
+ <span class='const'>Prompt</span><span class='op'>&gt;</span> <span class='int'>12</span>
309
+ <span class='comment'>#=&gt; &quot;12&quot;
310
+ </span>
311
+ <span class='id identifier rubyid_prompt'>prompt</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>Prompt&gt; </span><span class='tstring_end'>&quot;</span></span><span class='comma'>,</span> <span class='symbol'>:to_f</span><span class='rparen'>)</span>
312
+ <span class='const'>Prompt</span><span class='op'>&gt;</span> <span class='int'>12</span>
313
+ <span class='comment'>#=&gt; 12.0
314
+ </span></code></pre>
315
315
 
316
316
 
317
317
  </div>
@@ -359,14 +359,14 @@ conversion method.</p>
359
359
  <p>Optionally require a gem. If it is not available, <code>nil</code> will be
360
360
  returned. Alternatively, a block can be provided with code to run.</p>
361
361
 
362
- <pre class="ruby"><span class="ruby-identifier">require</span> <span class="ruby-string">&#39;non_existent&#39;</span>
363
- <span class="ruby-comment">#=&gt; nil</span>
364
-
365
- <span class="ruby-identifier">require</span> <span class="ruby-string">&#39;non_existent&#39;</span> <span class="ruby-keyword">do</span>
366
- <span class="ruby-identifier">puts</span> <span class="ruby-string">&#39;Something went wrong&#39;</span>
367
- <span class="ruby-keyword">end</span>
368
- <span class="ruby-comment">#=&gt; Outputs &#39;Something went wrong&#39;</span>
369
- </pre>
362
+ <pre class="code ruby"><code class="ruby"><span class='id identifier rubyid_require'>require</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>non_existent</span><span class='tstring_end'>&#39;</span></span>
363
+ <span class='comment'>#=&gt; nil
364
+ </span>
365
+ <span class='id identifier rubyid_require'>require</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>non_existent</span><span class='tstring_end'>&#39;</span></span> <span class='kw'>do</span>
366
+ <span class='id identifier rubyid_puts'>puts</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>Something went wrong</span><span class='tstring_end'>&#39;</span></span>
367
+ <span class='kw'>end</span>
368
+ <span class='comment'>#=&gt; Outputs &#39;Something went wrong&#39;
369
+ </span></code></pre>
370
370
 
371
371
 
372
372
  </div>
@@ -414,12 +414,12 @@ returned. Alternatively, a block can be provided with code to run.</p>
414
414
  <p>A Pascal/ActionScript like <code>with</code> method. Yields its argument to
415
415
  the provided block and then returns it.</p>
416
416
 
417
- <pre class="ruby"><span class="ruby-identifier">with</span>([]) <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">a</span><span class="ruby-operator">|</span>
418
- <span class="ruby-identifier">a</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-string">&quot;a&quot;</span>
419
- <span class="ruby-identifier">a</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-string">&quot;b&quot;</span>
420
- <span class="ruby-keyword">end</span>
421
- <span class="ruby-comment">#=&gt; [&quot;a&quot;, &quot;b&quot;]</span>
422
- </pre>
417
+ <pre class="code ruby"><code class="ruby"><span class='id identifier rubyid_with'>with</span><span class='lparen'>(</span><span class='lbracket'>[</span><span class='rbracket'>]</span><span class='rparen'>)</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_a'>a</span><span class='op'>|</span>
418
+ <span class='id identifier rubyid_a'>a</span> <span class='op'>&lt;&lt;</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>a</span><span class='tstring_end'>&quot;</span></span>
419
+ <span class='id identifier rubyid_a'>a</span> <span class='op'>&lt;&lt;</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>b</span><span class='tstring_end'>&quot;</span></span>
420
+ <span class='kw'>end</span>
421
+ <span class='comment'>#=&gt; [&quot;a&quot;, &quot;b&quot;]
422
+ </span></code></pre>
423
423
 
424
424
 
425
425
  </div>
@@ -453,9 +453,9 @@ the provided block and then returns it.</p>
453
453
  </div>
454
454
 
455
455
  <div id="footer">
456
- Generated on Tue Dec 31 15:41:29 2013 by
456
+ Generated on Fri Jan 24 17:13:27 2014 by
457
457
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
458
- 0.8.7.3 (ruby-2.0.0).
458
+ 0.8.7.3 (ruby-2.1.0).
459
459
  </div>
460
460
 
461
461
  </body>
data/doc/Module.html CHANGED
@@ -227,9 +227,9 @@ href="https://github.com/citizen428/ivar_encapsulation">ivar_encapsulation</a>.<
227
227
  </div>
228
228
 
229
229
  <div id="footer">
230
- Generated on Tue Dec 31 15:41:30 2013 by
230
+ Generated on Fri Jan 24 17:13:28 2014 by
231
231
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
232
- 0.8.7.3 (ruby-2.0.0).
232
+ 0.8.7.3 (ruby-2.1.0).
233
233
  </div>
234
234
 
235
235
  </body>
data/doc/Object.html CHANGED
@@ -187,13 +187,13 @@
187
187
  <code>new_line</code> is <code>true</code> and <code>print</code>
188
188
  otherwise.</p>
189
189
 
190
- <pre class="ruby"><span class="ruby-string">&quot;foo&quot;</span>.<span class="ruby-identifier">display</span>
191
- <span class="ruby-identifier">foo</span>
192
- <span class="ruby-comment">#=&gt; &quot;foo&quot;</span>
193
-
194
- <span class="ruby-string">&quot;foo&quot;</span>.<span class="ruby-identifier">display</span>(<span class="ruby-keyword">false</span>)
195
- <span class="ruby-identifier">foo</span><span class="ruby-comment">#=&gt; &quot;foo&quot;</span>
196
- </pre>
190
+ <pre class="code ruby"><code class="ruby"><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>foo</span><span class='tstring_end'>&quot;</span></span><span class='period'>.</span><span class='id identifier rubyid_display'>display</span>
191
+ <span class='id identifier rubyid_foo'>foo</span>
192
+ <span class='comment'>#=&gt; &quot;foo&quot;
193
+ </span>
194
+ <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>foo</span><span class='tstring_end'>&quot;</span></span><span class='period'>.</span><span class='id identifier rubyid_display'>display</span><span class='lparen'>(</span><span class='kw'>false</span><span class='rparen'>)</span>
195
+ <span class='id identifier rubyid_foo'>foo</span><span class='comment'>#=&gt; &quot;foo&quot;
196
+ </span></code></pre>
197
197
 
198
198
 
199
199
  </div>
@@ -239,9 +239,9 @@ otherwise.</p>
239
239
  <p>An identity method that provides access to an object&#39;s
240
240
  <code>self</code>.</p>
241
241
 
242
- <pre class="ruby">[<span class="ruby-value">1</span>,<span class="ruby-value">2</span>,<span class="ruby-value">3</span>,<span class="ruby-value">4</span>,<span class="ruby-value">5</span>,<span class="ruby-value">1</span>,<span class="ruby-value">2</span>,<span class="ruby-value">2</span>,<span class="ruby-value">3</span>].<span class="ruby-identifier">group_by</span>(<span class="ruby-operator">&amp;</span>:<span class="ruby-identifier">it</span>)
243
- <span class="ruby-comment">#=&gt; {1=&gt;[1, 1], 2=&gt;[2, 2, 2], 3=&gt;[3, 3], 4=&gt;[4], 5=&gt;[5]}</span>
244
- </pre>
242
+ <pre class="code ruby"><code class="ruby"><span class='lbracket'>[</span><span class='int'>1</span><span class='comma'>,</span><span class='int'>2</span><span class='comma'>,</span><span class='int'>3</span><span class='comma'>,</span><span class='int'>4</span><span class='comma'>,</span><span class='int'>5</span><span class='comma'>,</span><span class='int'>1</span><span class='comma'>,</span><span class='int'>2</span><span class='comma'>,</span><span class='int'>2</span><span class='comma'>,</span><span class='int'>3</span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_group_by'>group_by</span><span class='lparen'>(</span><span class='op'>&amp;</span><span class='symbol'>:it</span><span class='rparen'>)</span>
243
+ <span class='comment'>#=&gt; {1=&gt;[1, 1], 2=&gt;[2, 2, 2], 3=&gt;[3, 3], 4=&gt;[4], 5=&gt;[5]}
244
+ </span></code></pre>
245
245
 
246
246
 
247
247
  </div>
@@ -275,9 +275,9 @@ otherwise.</p>
275
275
  </div>
276
276
 
277
277
  <div id="footer">
278
- Generated on Tue Dec 31 15:41:29 2013 by
278
+ Generated on Fri Jan 24 17:13:27 2014 by
279
279
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
280
- 0.8.7.3 (ruby-2.0.0).
280
+ 0.8.7.3 (ruby-2.1.0).
281
281
  </div>
282
282
 
283
283
  </body>
data/doc/String.html CHANGED
@@ -94,7 +94,9 @@
94
94
 
95
95
 
96
96
  <dt class="r2 last">Defined in:</dt>
97
- <dd class="r2 last">lib/shenanigans/string/in_groups_of.rb</dd>
97
+ <dd class="r2 last">lib/shenanigans/string/cmpi.rb<span class="defines">,<br />
98
+ lib/shenanigans/string/in_groups_of.rb</span>
99
+ </dd>
98
100
 
99
101
  </dl>
100
102
  <div class="clear"></div>
@@ -117,6 +119,30 @@
117
119
  <li class="public ">
118
120
  <span class="summary_signature">
119
121
 
122
+ <a href="#cmpi-instance_method" title="#cmpi (instance method)">- (Object) <strong>cmpi</strong>(other) </a>
123
+
124
+
125
+
126
+ </span>
127
+
128
+
129
+
130
+
131
+
132
+
133
+
134
+
135
+
136
+ <span class="summary_desc"><div class='inline'>
137
+ <p>Compares strings ignoring case “test”.cmpi(“tesT”) #=&gt; true.</p>
138
+ </div></span>
139
+
140
+ </li>
141
+
142
+
143
+ <li class="public ">
144
+ <span class="summary_signature">
145
+
120
146
  <a href="#in_groups_of-instance_method" title="#in_groups_of (instance method)">- (Object) <strong>in_groups_of</strong>(size) </a>
121
147
 
122
148
 
@@ -148,7 +174,52 @@
148
174
 
149
175
 
150
176
  <div class="method_details first">
151
- <h3 class="signature first" id="in_groups_of-instance_method">
177
+ <h3 class="signature first" id="cmpi-instance_method">
178
+
179
+ - (<tt><span class='object_link'><a href="Object.html" title="Object (class)">Object</a></span></tt>) <strong>cmpi</strong>(other)
180
+
181
+
182
+
183
+
184
+
185
+ </h3><div class="docstring">
186
+ <div class="discussion">
187
+
188
+ <p>Compares strings ignoring case</p>
189
+
190
+ <pre class="code ruby"><code class="ruby"><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>test</span><span class='tstring_end'>&quot;</span></span><span class='period'>.</span><span class='id identifier rubyid_cmpi'>cmpi</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>tesT</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span>
191
+ <span class='comment'>#=&gt; true
192
+ </span></code></pre>
193
+
194
+
195
+ </div>
196
+ </div>
197
+ <div class="tags">
198
+
199
+
200
+ </div><table class="source_code">
201
+ <tr>
202
+ <td>
203
+ <pre class="lines">
204
+
205
+
206
+ 5
207
+ 6
208
+ 7</pre>
209
+ </td>
210
+ <td>
211
+ <pre class="code"><span class="info file"># File 'lib/shenanigans/string/cmpi.rb', line 5</span>
212
+
213
+ <span class='kw'>def</span> <span class='id identifier rubyid_cmpi'>cmpi</span><span class='lparen'>(</span><span class='id identifier rubyid_other'>other</span><span class='rparen'>)</span>
214
+ <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_casecmp'>casecmp</span><span class='lparen'>(</span><span class='id identifier rubyid_other'>other</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_zero?'>zero?</span>
215
+ <span class='kw'>end</span></pre>
216
+ </td>
217
+ </tr>
218
+ </table>
219
+ </div>
220
+
221
+ <div class="method_details ">
222
+ <h3 class="signature " id="in_groups_of-instance_method">
152
223
 
153
224
  - (<tt><span class='object_link'><a href="Object.html" title="Object (class)">Object</a></span></tt>) <strong>in_groups_of</strong>(size)
154
225
 
@@ -162,13 +233,13 @@
162
233
  <p>Returns an array of the string broken down into groups of <code>size</code>
163
234
  characters.</p>
164
235
 
165
- <pre class="ruby"><span class="ruby-string">&quot;aabbcc&quot;</span>.<span class="ruby-identifier">in_groups_of</span>(<span class="ruby-value">2</span>)
166
- <span class="ruby-comment">#=&gt; [&#39;aa&#39;, &#39;bb&#39;, &#39;cc&#39;]</span>
167
- <span class="ruby-string">&quot;&quot;</span>.<span class="ruby-identifier">in_groups_of</span>(<span class="ruby-value">2</span>)
168
- <span class="ruby-comment">#=&gt; []</span>
169
- <span class="ruby-string">&quot;&quot;</span>.<span class="ruby-identifier">in_groups_of</span>(<span class="ruby-value">0</span>)
170
- <span class="ruby-comment">#=&gt; ArgumentError</span>
171
- </pre>
236
+ <pre class="code ruby"><code class="ruby"><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>aabbcc</span><span class='tstring_end'>&quot;</span></span><span class='period'>.</span><span class='id identifier rubyid_in_groups_of'>in_groups_of</span><span class='lparen'>(</span><span class='int'>2</span><span class='rparen'>)</span>
237
+ <span class='comment'>#=&gt; [&#39;aa&#39;, &#39;bb&#39;, &#39;cc&#39;]
238
+ </span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_end'>&quot;</span></span><span class='period'>.</span><span class='id identifier rubyid_in_groups_of'>in_groups_of</span><span class='lparen'>(</span><span class='int'>2</span><span class='rparen'>)</span>
239
+ <span class='comment'>#=&gt; []
240
+ </span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_end'>&quot;</span></span><span class='period'>.</span><span class='id identifier rubyid_in_groups_of'>in_groups_of</span><span class='lparen'>(</span><span class='int'>0</span><span class='rparen'>)</span>
241
+ <span class='comment'>#=&gt; ArgumentError
242
+ </span></code></pre>
172
243
 
173
244
 
174
245
  </div>
@@ -217,9 +288,9 @@ characters.</p>
217
288
  </div>
218
289
 
219
290
  <div id="footer">
220
- Generated on Tue Dec 31 15:41:29 2013 by
291
+ Generated on Fri Jan 24 17:13:27 2014 by
221
292
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
222
- 0.8.7.3 (ruby-2.0.0).
293
+ 0.8.7.3 (ruby-2.1.0).
223
294
  </div>
224
295
 
225
296
  </body>
data/doc/_index.html CHANGED
@@ -179,9 +179,9 @@
179
179
  </div>
180
180
 
181
181
  <div id="footer">
182
- Generated on Tue Dec 31 15:41:28 2013 by
182
+ Generated on Fri Jan 24 17:13:27 2014 by
183
183
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
184
- 0.8.7.3 (ruby-2.0.0).
184
+ 0.8.7.3 (ruby-2.1.0).
185
185
  </div>
186
186
 
187
187
  </body>
data/doc/file.README.html CHANGED
@@ -105,18 +105,18 @@ Ruby release.</p>
105
105
 
106
106
  <p>If you really want the whole shebang, you can get it this way:</p>
107
107
 
108
- <pre class="ruby"><span class="ruby-identifier">require</span> <span class="ruby-string">&#39;shenanigans&#39;</span>
109
- </pre>
108
+ <pre class="code ruby"><code class="ruby"><span class='id identifier rubyid_require'>require</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>shenanigans</span><span class='tstring_end'>&#39;</span></span>
109
+ </code></pre>
110
110
 
111
111
  <p>Requiring a single method works as follows:</p>
112
112
 
113
- <pre class="ruby"><span class="ruby-identifier">require</span> <span class="ruby-string">&#39;shenanigans/&lt;class|module&gt;/&lt;method&gt;&#39;</span>
114
- </pre>
113
+ <pre class="code ruby"><code class="ruby"><span class='id identifier rubyid_require'>require</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>shenanigans/&lt;class|module&gt;/&lt;method&gt;</span><span class='tstring_end'>&#39;</span></span>
114
+ </code></pre>
115
115
 
116
116
  <p>Requiring all the extensions of a class or module also works:</p>
117
117
 
118
- <pre class="ruby"><span class="ruby-identifier">require</span> <span class="ruby-string">&#39;shenanigans/kernel&#39;</span>
119
- </pre>
118
+ <pre class="code ruby"><code class="ruby"><span class='id identifier rubyid_require'>require</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>shenanigans/kernel</span><span class='tstring_end'>&#39;</span></span>
119
+ </code></pre>
120
120
 
121
121
  <h2 id="label-Contribute">Contribute</h2>
122
122
 
@@ -153,9 +153,9 @@ DEALINGS IN THE SOFTWARE.</p>
153
153
  </div></div>
154
154
 
155
155
  <div id="footer">
156
- Generated on Tue Dec 31 15:41:29 2013 by
156
+ Generated on Fri Jan 24 17:13:27 2014 by
157
157
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
158
- 0.8.7.3 (ruby-2.0.0).
158
+ 0.8.7.3 (ruby-2.1.0).
159
159
  </div>
160
160
 
161
161
  </body>
data/doc/index.html CHANGED
@@ -105,18 +105,18 @@ Ruby release.</p>
105
105
 
106
106
  <p>If you really want the whole shebang, you can get it this way:</p>
107
107
 
108
- <pre class="ruby"><span class="ruby-identifier">require</span> <span class="ruby-string">&#39;shenanigans&#39;</span>
109
- </pre>
108
+ <pre class="code ruby"><code class="ruby"><span class='id identifier rubyid_require'>require</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>shenanigans</span><span class='tstring_end'>&#39;</span></span>
109
+ </code></pre>
110
110
 
111
111
  <p>Requiring a single method works as follows:</p>
112
112
 
113
- <pre class="ruby"><span class="ruby-identifier">require</span> <span class="ruby-string">&#39;shenanigans/&lt;class|module&gt;/&lt;method&gt;&#39;</span>
114
- </pre>
113
+ <pre class="code ruby"><code class="ruby"><span class='id identifier rubyid_require'>require</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>shenanigans/&lt;class|module&gt;/&lt;method&gt;</span><span class='tstring_end'>&#39;</span></span>
114
+ </code></pre>
115
115
 
116
116
  <p>Requiring all the extensions of a class or module also works:</p>
117
117
 
118
- <pre class="ruby"><span class="ruby-identifier">require</span> <span class="ruby-string">&#39;shenanigans/kernel&#39;</span>
119
- </pre>
118
+ <pre class="code ruby"><code class="ruby"><span class='id identifier rubyid_require'>require</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>shenanigans/kernel</span><span class='tstring_end'>&#39;</span></span>
119
+ </code></pre>
120
120
 
121
121
  <h2 id="label-Contribute">Contribute</h2>
122
122
 
@@ -153,9 +153,9 @@ DEALINGS IN THE SOFTWARE.</p>
153
153
  </div></div>
154
154
 
155
155
  <div id="footer">
156
- Generated on Tue Dec 31 15:41:28 2013 by
156
+ Generated on Fri Jan 24 17:13:27 2014 by
157
157
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
158
- 0.8.7.3 (ruby-2.0.0).
158
+ 0.8.7.3 (ruby-2.1.0).
159
159
  </div>
160
160
 
161
161
  </body>
data/doc/method_list.html CHANGED
@@ -54,90 +54,96 @@
54
54
 
55
55
 
56
56
  <li class="r2 ">
57
+ <span class='object_link'><a href="String.html#cmpi-instance_method" title="String#cmpi (method)">#cmpi</a></span>
58
+ <small>String</small>
59
+ </li>
60
+
61
+
62
+ <li class="r1 ">
57
63
  <span class='object_link'><a href="Object.html#display-instance_method" title="Object#display (method)">#display</a></span>
58
64
  <small>Object</small>
59
65
  </li>
60
66
 
61
67
 
62
- <li class="r1 ">
68
+ <li class="r2 ">
63
69
  <span class='object_link'><a href="Hash.html#extract-instance_method" title="Hash#extract (method)">#extract</a></span>
64
70
  <small>Hash</small>
65
71
  </li>
66
72
 
67
73
 
68
- <li class="r2 ">
74
+ <li class="r1 ">
69
75
  <span class='object_link'><a href="Kernel.html#fn-instance_method" title="Kernel#fn (method)">#fn</a></span>
70
76
  <small>Kernel</small>
71
77
  </li>
72
78
 
73
79
 
74
- <li class="r1 ">
80
+ <li class="r2 ">
75
81
  <span class='object_link'><a href="Hash.html#has_shape%3F-instance_method" title="Hash#has_shape? (method)">#has_shape?</a></span>
76
82
  <small>Hash</small>
77
83
  </li>
78
84
 
79
85
 
80
- <li class="r2 ">
86
+ <li class="r1 ">
81
87
  <span class='object_link'><a href="String.html#in_groups_of-instance_method" title="String#in_groups_of (method)">#in_groups_of</a></span>
82
88
  <small>String</small>
83
89
  </li>
84
90
 
85
91
 
86
- <li class="r1 ">
92
+ <li class="r2 ">
87
93
  <span class='object_link'><a href="Object.html#it-instance_method" title="Object#it (method)">#it</a></span>
88
94
  <small>Object</small>
89
95
  </li>
90
96
 
91
97
 
92
- <li class="r2 ">
98
+ <li class="r1 ">
93
99
  <span class='object_link'><a href="Module.html#private_accessor-instance_method" title="Module#private_accessor (method)">#private_accessor</a></span>
94
100
  <small>Module</small>
95
101
  </li>
96
102
 
97
103
 
98
- <li class="r1 ">
104
+ <li class="r2 ">
99
105
  <span class='object_link'><a href="Kernel.html#prompt-instance_method" title="Kernel#prompt (method)">#prompt</a></span>
100
106
  <small>Kernel</small>
101
107
  </li>
102
108
 
103
109
 
104
- <li class="r2 ">
110
+ <li class="r1 ">
105
111
  <span class='object_link'><a href="Array.html#random_subarray-instance_method" title="Array#random_subarray (method)">#random_subarray</a></span>
106
112
  <small>Array</small>
107
113
  </li>
108
114
 
109
115
 
110
- <li class="r1 ">
116
+ <li class="r2 ">
111
117
  <span class='object_link'><a href="Array.html#reductions-instance_method" title="Array#reductions (method)">#reductions</a></span>
112
118
  <small>Array</small>
113
119
  </li>
114
120
 
115
121
 
116
- <li class="r2 ">
122
+ <li class="r1 ">
117
123
  <span class='object_link'><a href="Kernel.html#require_optional-instance_method" title="Kernel#require_optional (method)">#require_optional</a></span>
118
124
  <small>Kernel</small>
119
125
  </li>
120
126
 
121
127
 
122
- <li class="r1 ">
128
+ <li class="r2 ">
123
129
  <span class='object_link'><a href="Fixnum.html#string_length-instance_method" title="Fixnum#string_length (method)">#string_length</a></span>
124
130
  <small>Fixnum</small>
125
131
  </li>
126
132
 
127
133
 
128
- <li class="r2 ">
134
+ <li class="r1 ">
129
135
  <span class='object_link'><a href="Hash.html#to_ostruct-instance_method" title="Hash#to_ostruct (method)">#to_ostruct</a></span>
130
136
  <small>Hash</small>
131
137
  </li>
132
138
 
133
139
 
134
- <li class="r1 ">
140
+ <li class="r2 ">
135
141
  <span class='object_link'><a href="Kernel.html#with-instance_method" title="Kernel#with (method)">#with</a></span>
136
142
  <small>Kernel</small>
137
143
  </li>
138
144
 
139
145
 
140
- <li class="r2 ">
146
+ <li class="r1 ">
141
147
  <span class='object_link'><a href="Array.html#zip_with-instance_method" title="Array#zip_with (method)">#zip_with</a></span>
142
148
  <small>Array</small>
143
149
  </li>
@@ -105,9 +105,9 @@
105
105
  </div>
106
106
 
107
107
  <div id="footer">
108
- Generated on Tue Dec 31 15:41:29 2013 by
108
+ Generated on Fri Jan 24 17:13:27 2014 by
109
109
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
110
- 0.8.7.3 (ruby-2.0.0).
110
+ 0.8.7.3 (ruby-2.1.0).
111
111
  </div>
112
112
 
113
113
  </body>
@@ -1 +1,2 @@
1
1
  require_relative 'string/in_groups_of'
2
+ require_relative 'string/cmpi'
@@ -0,0 +1,8 @@
1
+ class String
2
+ # Compares strings ignoring case
3
+ # "test".cmpi("tesT")
4
+ # #=> true
5
+ def cmpi(other)
6
+ self.casecmp(other).zero?
7
+ end
8
+ end
@@ -0,0 +1,10 @@
1
+ require 'minitest/autorun'
2
+ require 'shenanigans/string/cmpi'
3
+
4
+ class Cmpi < MiniTest::Unit::TestCase
5
+ def cmpi
6
+ str = "aabbcc"
7
+ assert str.cmpi("AAbbcc")
8
+ assert_equal cmpi("foo"), false
9
+ end
10
+ end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: shenanigans
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.10
4
+ version: 1.0.11
5
5
  platform: ruby
6
6
  authors:
7
7
  - Michael Kohl
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-12-31 00:00:00.000000000 Z
11
+ date: 2014-01-24 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: A collection of extensions for various Ruby core classes.
14
14
  email: citizen428@gmail.com
@@ -19,68 +19,69 @@ files:
19
19
  - Gemfile
20
20
  - LICENSE
21
21
  - README.rdoc
22
- - doc/frames.html
23
- - doc/top-level-namespace.html
24
- - doc/file_list.html
22
+ - doc/Array.html
25
23
  - doc/Fixnum.html
26
- - doc/Object.html
27
24
  - doc/Hash.html
28
- - doc/class_list.html
25
+ - doc/Kernel.html
29
26
  - doc/Module.html
30
- - doc/index.html
31
- - doc/Array.html
32
- - doc/css/style.css
27
+ - doc/Object.html
28
+ - doc/String.html
29
+ - doc/_index.html
30
+ - doc/class_list.html
33
31
  - doc/css/common.css
34
32
  - doc/css/full_list.css
35
- - doc/String.html
36
- - doc/method_list.html
37
- - doc/Kernel.html
38
- - doc/js/jquery.js
33
+ - doc/css/style.css
34
+ - doc/file.README.html
35
+ - doc/file_list.html
36
+ - doc/frames.html
37
+ - doc/index.html
39
38
  - doc/js/app.js
40
39
  - doc/js/full_list.js
41
- - doc/_index.html
42
- - doc/file.README.html
40
+ - doc/js/jquery.js
41
+ - doc/method_list.html
42
+ - doc/top-level-namespace.html
43
43
  - lib/shenanigans.rb
44
- - lib/shenanigans/fixnum/string_length.rb
45
- - lib/shenanigans/object.rb
46
- - lib/shenanigans/kernel.rb
47
- - lib/shenanigans/string.rb
48
- - lib/shenanigans/kernel/prompt.rb
49
- - lib/shenanigans/kernel/fn.rb
50
- - lib/shenanigans/kernel/with.rb
51
- - lib/shenanigans/kernel/require_optional.rb
52
44
  - lib/shenanigans/array.rb
53
- - lib/shenanigans/array/zip_with.rb
54
45
  - lib/shenanigans/array/caret.rb
55
46
  - lib/shenanigans/array/random_subarray.rb
56
47
  - lib/shenanigans/array/reductions.rb
48
+ - lib/shenanigans/array/zip_with.rb
57
49
  - lib/shenanigans/fixnum.rb
50
+ - lib/shenanigans/fixnum/string_length.rb
51
+ - lib/shenanigans/hash.rb
52
+ - lib/shenanigans/hash/extract.rb
58
53
  - lib/shenanigans/hash/has_shape_pred.rb
59
54
  - lib/shenanigans/hash/to_ostruct.rb
60
- - lib/shenanigans/hash/extract.rb
55
+ - lib/shenanigans/kernel.rb
56
+ - lib/shenanigans/kernel/fn.rb
57
+ - lib/shenanigans/kernel/prompt.rb
58
+ - lib/shenanigans/kernel/require_optional.rb
59
+ - lib/shenanigans/kernel/with.rb
61
60
  - lib/shenanigans/module.rb
62
61
  - lib/shenanigans/module/private_accessor.rb
63
- - lib/shenanigans/string/in_groups_of.rb
64
- - lib/shenanigans/object/it.rb
62
+ - lib/shenanigans/object.rb
65
63
  - lib/shenanigans/object/display.rb
66
- - lib/shenanigans/hash.rb
67
- - test/fixnum/test_string_length.rb
68
- - test/kernel/test_prompt.rb
69
- - test/kernel/test_with.rb
70
- - test/kernel/test_fn.rb
71
- - test/kernel/test_require_optional.rb
72
- - test/array/test_zip_with.rb
64
+ - lib/shenanigans/object/it.rb
65
+ - lib/shenanigans/string.rb
66
+ - lib/shenanigans/string/cmpi.rb
67
+ - lib/shenanigans/string/in_groups_of.rb
68
+ - test/array/test_caret.rb
73
69
  - test/array/test_random_subarray.rb
74
70
  - test/array/test_reductions.rb
75
- - test/array/test_caret.rb
71
+ - test/array/test_zip_with.rb
72
+ - test/fixnum/test_string_length.rb
76
73
  - test/hash/test_extract.rb
77
- - test/hash/test_to_ostruct.rb
78
74
  - test/hash/test_has_shape_pred.rb
75
+ - test/hash/test_to_ostruct.rb
76
+ - test/kernel/test_fn.rb
77
+ - test/kernel/test_prompt.rb
78
+ - test/kernel/test_require_optional.rb
79
+ - test/kernel/test_with.rb
79
80
  - test/module/test_private_accessor.rb
80
- - test/string/test_in_groups_of.rb
81
- - test/string/test_display.rb
82
- - test/object/test_it.rb
83
81
  - test/object/test_display.rb
82
+ - test/object/test_it.rb
83
+ - test/string/test_cmpi.rb
84
+ - test/string/test_in_groups_of.rb
84
85
  homepage: http://rubydoc.info/gems/shenanigans/frames
85
86
  licenses:
86
87
  - MIT
@@ -91,17 +92,17 @@ require_paths:
91
92
  - lib
92
93
  required_ruby_version: !ruby/object:Gem::Requirement
93
94
  requirements:
94
- - - '>='
95
+ - - ">="
95
96
  - !ruby/object:Gem::Version
96
97
  version: '0'
97
98
  required_rubygems_version: !ruby/object:Gem::Requirement
98
99
  requirements:
99
- - - '>='
100
+ - - ">="
100
101
  - !ruby/object:Gem::Version
101
102
  version: '0'
102
103
  requirements: []
103
104
  rubyforge_project:
104
- rubygems_version: 2.0.3
105
+ rubygems_version: 2.2.0
105
106
  signing_key:
106
107
  specification_version: 4
107
108
  summary: Think Facets, just less useful
@@ -1,36 +0,0 @@
1
- require 'minitest/autorun'
2
- require 'shenanigans/object/display'
3
- require 'stringio'
4
-
5
- class Display < MiniTest::Unit::TestCase
6
- def setup
7
- @orig_stdout = $stdout
8
- $stdout = StringIO.new("", "r+")
9
- end
10
-
11
- def teardown
12
- $stdout = @orig_stdout
13
- end
14
-
15
- def test_display
16
- str = "foo"
17
- assert str.display == str
18
- $stdout.rewind
19
- assert $stdout.gets.chomp == str
20
- end
21
-
22
- def test_display_alias
23
- str = "foo"
24
- assert str.d == str
25
- $stdout.rewind
26
- assert $stdout.gets.chomp == str
27
- end
28
-
29
- def test_display_no_new_line
30
- str = "foo"
31
- assert str.display(false) == str
32
- $stdout.rewind
33
- assert $stdout.gets == str
34
- end
35
-
36
- end