mack-facets 0.7.0.1 → 0.7.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (49) hide show
  1. data/doc/classes/Array.html +60 -60
  2. data/doc/classes/Class.html +18 -18
  3. data/doc/classes/Hash.html +18 -18
  4. data/doc/classes/Kernel.html +40 -12
  5. data/doc/classes/Mack/Facets/DateTime.html +168 -0
  6. data/doc/classes/Mack/Facets.html +111 -0
  7. data/doc/classes/Mack/Utils/BlankSlate.html +113 -0
  8. data/doc/classes/Mack/Utils/Inflector.html +47 -47
  9. data/doc/classes/Mack/Utils/RegistryList.html +74 -74
  10. data/doc/classes/Mack/Utils/RegistryMap.html +71 -71
  11. data/doc/classes/Math.html +18 -18
  12. data/doc/classes/Module.html +12 -12
  13. data/doc/classes/NilClass.html +6 -6
  14. data/doc/classes/Object.html +68 -68
  15. data/doc/classes/String.html +185 -172
  16. data/doc/classes/Symbol.html +6 -6
  17. data/doc/classes/Time.html +204 -0
  18. data/doc/created.rid +1 -1
  19. data/doc/files/README.html +1 -1
  20. data/doc/files/lib/mack-facets/english_extensions/inflect_rb.html +1 -1
  21. data/doc/files/lib/mack-facets/english_extensions/numerals_rb.html +1 -1
  22. data/doc/files/lib/mack-facets/extensions/array_rb.html +1 -1
  23. data/doc/files/lib/mack-facets/extensions/class_rb.html +1 -1
  24. data/doc/files/lib/mack-facets/extensions/date_time_rb.html +129 -0
  25. data/doc/files/lib/mack-facets/extensions/hash_rb.html +1 -1
  26. data/doc/files/lib/mack-facets/extensions/kernel_rb.html +1 -1
  27. data/doc/files/lib/mack-facets/extensions/math_rb.html +1 -1
  28. data/doc/files/lib/mack-facets/extensions/module_rb.html +1 -1
  29. data/doc/files/lib/mack-facets/extensions/nil_class_rb.html +1 -1
  30. data/doc/files/lib/mack-facets/extensions/object_rb.html +1 -1
  31. data/doc/files/lib/mack-facets/extensions/string_rb.html +1 -1
  32. data/doc/files/lib/mack-facets/extensions/symbol_rb.html +1 -1
  33. data/doc/files/lib/mack-facets/extensions/time_rb.html +108 -0
  34. data/doc/files/lib/mack-facets/utils/blank_slate_rb.html +101 -0
  35. data/doc/files/lib/mack-facets/utils/inflections_rb.html +1 -1
  36. data/doc/files/lib/mack-facets/utils/inflector_rb.html +1 -1
  37. data/doc/files/lib/mack-facets/utils/options_merger_rb.html +1 -1
  38. data/doc/files/lib/mack-facets/utils/registry_list_rb.html +1 -1
  39. data/doc/files/lib/mack-facets/utils/registry_map_rb.html +1 -1
  40. data/doc/files/lib/mack-facets_rb.html +3 -3
  41. data/doc/fr_class_index.html +2 -0
  42. data/doc/fr_file_index.html +1 -0
  43. data/doc/fr_method_index.html +75 -71
  44. data/lib/mack-facets/extensions/date_time.rb +36 -0
  45. data/lib/mack-facets/extensions/kernel.rb +5 -0
  46. data/lib/mack-facets/extensions/string.rb +2 -0
  47. data/lib/mack-facets/extensions/time.rb +5 -0
  48. data/lib/mack-facets.rb +3 -4
  49. metadata +12 -4
@@ -88,17 +88,17 @@
88
88
  <h3 class="section-bar">Methods</h3>
89
89
 
90
90
  <div class="name-list">
91
- <a href="#M000025">class_parents</a>&nbsp;&nbsp;
92
- <a href="#M000030">ivar_cache</a>&nbsp;&nbsp;
93
- <a href="#M000031">ivar_cache_clear</a>&nbsp;&nbsp;
94
- <a href="#M000032">namespaces</a>&nbsp;&nbsp;
95
- <a href="#M000027">needs_method</a>&nbsp;&nbsp;
96
- <a href="#M000023">print_methods</a>&nbsp;&nbsp;
97
- <a href="#M000028">running_time</a>&nbsp;&nbsp;
98
- <a href="#M000022">safely_include_module</a>&nbsp;&nbsp;
99
- <a href="#M000029">send_with_chain</a>&nbsp;&nbsp;
100
- <a href="#M000026">to_param</a>&nbsp;&nbsp;
101
- <a href="#M000024">with_options</a>&nbsp;&nbsp;
91
+ <a href="#M000004">class_parents</a>&nbsp;&nbsp;
92
+ <a href="#M000009">ivar_cache</a>&nbsp;&nbsp;
93
+ <a href="#M000010">ivar_cache_clear</a>&nbsp;&nbsp;
94
+ <a href="#M000011">namespaces</a>&nbsp;&nbsp;
95
+ <a href="#M000006">needs_method</a>&nbsp;&nbsp;
96
+ <a href="#M000002">print_methods</a>&nbsp;&nbsp;
97
+ <a href="#M000007">running_time</a>&nbsp;&nbsp;
98
+ <a href="#M000001">safely_include_module</a>&nbsp;&nbsp;
99
+ <a href="#M000008">send_with_chain</a>&nbsp;&nbsp;
100
+ <a href="#M000005">to_param</a>&nbsp;&nbsp;
101
+ <a href="#M000003">with_options</a>&nbsp;&nbsp;
102
102
  </div>
103
103
  </div>
104
104
 
@@ -120,11 +120,11 @@
120
120
  <div id="methods">
121
121
  <h3 class="section-bar">Public Class methods</h3>
122
122
 
123
- <div id="method-M000027" class="method-detail">
124
- <a name="M000027"></a>
123
+ <div id="method-M000006" class="method-detail">
124
+ <a name="M000006"></a>
125
125
 
126
126
  <div class="method-heading">
127
- <a href="#M000027" class="method-signature">
127
+ <a href="#M000006" class="method-signature">
128
128
  <span class="method-name">needs_method</span><span class="method-args">(meth)</span>
129
129
  </a>
130
130
  </div>
@@ -137,8 +137,8 @@ for creating interfaces and you want to stub out methods that others need
137
137
  to implement.
138
138
  </p>
139
139
  <p><a class="source-toggle" href="#"
140
- onclick="toggleCode('M000027-source');return false;">[Source]</a></p>
141
- <div class="method-source-code" id="M000027-source">
140
+ onclick="toggleCode('M000006-source');return false;">[Source]</a></p>
141
+ <div class="method-source-code" id="M000006-source">
142
142
  <pre>
143
143
  <span class="ruby-comment cmt"># File lib/mack-facets/extensions/object.rb, line 56</span>
144
144
  56: <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">needs_method</span>(<span class="ruby-identifier">meth</span>)
@@ -153,11 +153,11 @@ to implement.
153
153
 
154
154
  <h3 class="section-bar">Public Instance methods</h3>
155
155
 
156
- <div id="method-M000025" class="method-detail">
157
- <a name="M000025"></a>
156
+ <div id="method-M000004" class="method-detail">
157
+ <a name="M000004"></a>
158
158
 
159
159
  <div class="method-heading">
160
- <a href="#M000025" class="method-signature">
160
+ <a href="#M000004" class="method-signature">
161
161
  <span class="method-name">class_parents</span><span class="method-args">()</span>
162
162
  </a>
163
163
  </div>
@@ -167,8 +167,8 @@ to implement.
167
167
  See <a href="Class.html">Class</a> parents for more information.
168
168
  </p>
169
169
  <p><a class="source-toggle" href="#"
170
- onclick="toggleCode('M000025-source');return false;">[Source]</a></p>
171
- <div class="method-source-code" id="M000025-source">
170
+ onclick="toggleCode('M000004-source');return false;">[Source]</a></p>
171
+ <div class="method-source-code" id="M000004-source">
172
172
  <pre>
173
173
  <span class="ruby-comment cmt"># File lib/mack-facets/extensions/object.rb, line 43</span>
174
174
  43: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">class_parents</span>
@@ -179,18 +179,18 @@ See <a href="Class.html">Class</a> parents for more information.
179
179
  </div>
180
180
  </div>
181
181
 
182
- <div id="method-M000030" class="method-detail">
183
- <a name="M000030"></a>
182
+ <div id="method-M000009" class="method-detail">
183
+ <a name="M000009"></a>
184
184
 
185
185
  <div class="method-heading">
186
- <a href="#M000030" class="method-signature">
186
+ <a href="#M000009" class="method-signature">
187
187
  <span class="method-name">ivar_cache</span><span class="method-args">(var_name = nil) {|| ...}</span>
188
188
  </a>
189
189
  </div>
190
190
 
191
191
  <div class="method-description">
192
192
  <p>
193
- <a href="Object.html#M000030">ivar_cache</a> allows you to cache the
193
+ <a href="Object.html#M000009">ivar_cache</a> allows you to cache the
194
194
  results of the block into an instance variable in a class, and then will
195
195
  serve up that instance variable the next time you call that method again.
196
196
  </p>
@@ -234,8 +234,8 @@ overridden like such:
234
234
  now it will cache it to <tt>@foo_var</tt>
235
235
  </p>
236
236
  <p><a class="source-toggle" href="#"
237
- onclick="toggleCode('M000030-source');return false;">[Source]</a></p>
238
- <div class="method-source-code" id="M000030-source">
237
+ onclick="toggleCode('M000009-source');return false;">[Source]</a></p>
238
+ <div class="method-source-code" id="M000009-source">
239
239
  <pre>
240
240
  <span class="ruby-comment cmt"># File lib/mack-facets/extensions/object.rb, line 129</span>
241
241
  129: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">ivar_cache</span>(<span class="ruby-identifier">var_name</span> = <span class="ruby-keyword kw">nil</span>, <span class="ruby-operator">&amp;</span><span class="ruby-identifier">block</span>)
@@ -254,19 +254,19 @@ now it will cache it to <tt>@foo_var</tt>
254
254
  </div>
255
255
  </div>
256
256
 
257
- <div id="method-M000031" class="method-detail">
258
- <a name="M000031"></a>
257
+ <div id="method-M000010" class="method-detail">
258
+ <a name="M000010"></a>
259
259
 
260
260
  <div class="method-heading">
261
- <a href="#M000031" class="method-signature">
261
+ <a href="#M000010" class="method-signature">
262
262
  <span class="method-name">ivar_cache_clear</span><span class="method-args">(var_name = nil) {|if block_given?| ...}</span>
263
263
  </a>
264
264
  </div>
265
265
 
266
266
  <div class="method-description">
267
267
  <p><a class="source-toggle" href="#"
268
- onclick="toggleCode('M000031-source');return false;">[Source]</a></p>
269
- <div class="method-source-code" id="M000031-source">
268
+ onclick="toggleCode('M000010-source');return false;">[Source]</a></p>
269
+ <div class="method-source-code" id="M000010-source">
270
270
  <pre>
271
271
  <span class="ruby-comment cmt"># File lib/mack-facets/extensions/object.rb, line 141</span>
272
272
  141: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">ivar_cache_clear</span>(<span class="ruby-identifier">var_name</span> = <span class="ruby-keyword kw">nil</span>, <span class="ruby-operator">&amp;</span><span class="ruby-identifier">block</span>)
@@ -282,18 +282,18 @@ now it will cache it to <tt>@foo_var</tt>
282
282
  </div>
283
283
  </div>
284
284
 
285
- <div id="method-M000032" class="method-detail">
286
- <a name="M000032"></a>
285
+ <div id="method-M000011" class="method-detail">
286
+ <a name="M000011"></a>
287
287
 
288
288
  <div class="method-heading">
289
- <a href="#M000032" class="method-signature">
289
+ <a href="#M000011" class="method-signature">
290
290
  <span class="method-name">namespaces</span><span class="method-args">()</span>
291
291
  </a>
292
292
  </div>
293
293
 
294
294
  <div class="method-description">
295
295
  <p>
296
- Returns the <a href="Object.html#M000032">namespaces</a> for a particular
296
+ Returns the <a href="Object.html#M000011">namespaces</a> for a particular
297
297
  object.
298
298
  </p>
299
299
  <p>
@@ -303,8 +303,8 @@ Examples:
303
303
  Animals::Dog::Poodle.new.namespaces # =&gt; [&quot;Animals&quot;, &quot;Dog&quot;]
304
304
  </pre>
305
305
  <p><a class="source-toggle" href="#"
306
- onclick="toggleCode('M000032-source');return false;">[Source]</a></p>
307
- <div class="method-source-code" id="M000032-source">
306
+ onclick="toggleCode('M000011-source');return false;">[Source]</a></p>
307
+ <div class="method-source-code" id="M000011-source">
308
308
  <pre>
309
309
  <span class="ruby-comment cmt"># File lib/mack-facets/extensions/object.rb, line 154</span>
310
310
  154: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">namespaces</span>
@@ -321,11 +321,11 @@ Examples:
321
321
  </div>
322
322
  </div>
323
323
 
324
- <div id="method-M000023" class="method-detail">
325
- <a name="M000023"></a>
324
+ <div id="method-M000002" class="method-detail">
325
+ <a name="M000002"></a>
326
326
 
327
327
  <div class="method-heading">
328
- <a href="#M000023" class="method-signature">
328
+ <a href="#M000002" class="method-signature">
329
329
  <span class="method-name">print_methods</span><span class="method-args">()</span>
330
330
  </a>
331
331
  </div>
@@ -335,8 +335,8 @@ Examples:
335
335
  Prints out the methods associated with this object in alphabetical order.
336
336
  </p>
337
337
  <p><a class="source-toggle" href="#"
338
- onclick="toggleCode('M000023-source');return false;">[Source]</a></p>
339
- <div class="method-source-code" id="M000023-source">
338
+ onclick="toggleCode('M000002-source');return false;">[Source]</a></p>
339
+ <div class="method-source-code" id="M000002-source">
340
340
  <pre>
341
341
  <span class="ruby-comment cmt"># File lib/mack-facets/extensions/object.rb, line 16</span>
342
342
  16: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">print_methods</span>
@@ -350,11 +350,11 @@ Prints out the methods associated with this object in alphabetical order.
350
350
  </div>
351
351
  </div>
352
352
 
353
- <div id="method-M000028" class="method-detail">
354
- <a name="M000028"></a>
353
+ <div id="method-M000007" class="method-detail">
354
+ <a name="M000007"></a>
355
355
 
356
356
  <div class="method-heading">
357
- <a href="#M000028" class="method-signature">
357
+ <a href="#M000007" class="method-signature">
358
358
  <span class="method-name">running_time</span><span class="method-args">(message = &quot;&quot;, logger = nil) {|if block_given?| ...}</span>
359
359
  </a>
360
360
  </div>
@@ -366,8 +366,8 @@ things like Rake tasks, etc&#8230; where you would like to know how long
366
366
  it, or a section of it took to run.
367
367
  </p>
368
368
  <p><a class="source-toggle" href="#"
369
- onclick="toggleCode('M000028-source');return false;">[Source]</a></p>
370
- <div class="method-source-code" id="M000028-source">
369
+ onclick="toggleCode('M000007-source');return false;">[Source]</a></p>
370
+ <div class="method-source-code" id="M000007-source">
371
371
  <pre>
372
372
  <span class="ruby-comment cmt"># File lib/mack-facets/extensions/object.rb, line 65</span>
373
373
  65: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">running_time</span>(<span class="ruby-identifier">message</span> = <span class="ruby-value str">&quot;&quot;</span>, <span class="ruby-identifier">logger</span> = <span class="ruby-keyword kw">nil</span>)
@@ -395,11 +395,11 @@ it, or a section of it took to run.
395
395
  </div>
396
396
  </div>
397
397
 
398
- <div id="method-M000022" class="method-detail">
399
- <a name="M000022"></a>
398
+ <div id="method-M000001" class="method-detail">
399
+ <a name="M000001"></a>
400
400
 
401
401
  <div class="method-heading">
402
- <a href="#M000022" class="method-signature">
402
+ <a href="#M000001" class="method-signature">
403
403
  <span class="method-name">safely_include_module</span><span class="method-args">(*modules)</span>
404
404
  </a>
405
405
  </div>
@@ -418,8 +418,8 @@ Example:
418
418
  end
419
419
  </pre>
420
420
  <p><a class="source-toggle" href="#"
421
- onclick="toggleCode('M000022-source');return false;">[Source]</a></p>
422
- <div class="method-source-code" id="M000022-source">
421
+ onclick="toggleCode('M000001-source');return false;">[Source]</a></p>
422
+ <div class="method-source-code" id="M000001-source">
423
423
  <pre>
424
424
  <span class="ruby-comment cmt"># File lib/mack-facets/extensions/object.rb, line 9</span>
425
425
  9: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">safely_include_module</span>(<span class="ruby-operator">*</span><span class="ruby-identifier">modules</span>)
@@ -432,11 +432,11 @@ Example:
432
432
  </div>
433
433
  </div>
434
434
 
435
- <div id="method-M000029" class="method-detail">
436
- <a name="M000029"></a>
435
+ <div id="method-M000008" class="method-detail">
436
+ <a name="M000008"></a>
437
437
 
438
438
  <div class="method-heading">
439
- <a href="#M000029" class="method-signature">
439
+ <a href="#M000008" class="method-signature">
440
440
  <span class="method-name">send_with_chain</span><span class="method-args">(methods, *args)</span>
441
441
  </a>
442
442
  </div>
@@ -459,8 +459,8 @@ This would be the equivalent:
459
459
  Fruit.new.get_citrus.get_orange.class
460
460
  </pre>
461
461
  <p><a class="source-toggle" href="#"
462
- onclick="toggleCode('M000029-source');return false;">[Source]</a></p>
463
- <div class="method-source-code" id="M000029-source">
462
+ onclick="toggleCode('M000008-source');return false;">[Source]</a></p>
463
+ <div class="method-source-code" id="M000008-source">
464
464
  <pre>
465
465
  <span class="ruby-comment cmt"># File lib/mack-facets/extensions/object.rb, line 93</span>
466
466
  93: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">send_with_chain</span>(<span class="ruby-identifier">methods</span>, <span class="ruby-operator">*</span><span class="ruby-identifier">args</span>)
@@ -473,11 +473,11 @@ This would be the equivalent:
473
473
  </div>
474
474
  </div>
475
475
 
476
- <div id="method-M000026" class="method-detail">
477
- <a name="M000026"></a>
476
+ <div id="method-M000005" class="method-detail">
477
+ <a name="M000005"></a>
478
478
 
479
479
  <div class="method-heading">
480
- <a href="#M000026" class="method-signature">
480
+ <a href="#M000005" class="method-signature">
481
481
  <span class="method-name">to_param</span><span class="method-args">()</span>
482
482
  </a>
483
483
  </div>
@@ -489,8 +489,8 @@ can be overridden in an <a href="Object.html">Object</a> to provlde custom
489
489
  handling of parameters.
490
490
  </p>
491
491
  <p><a class="source-toggle" href="#"
492
- onclick="toggleCode('M000026-source');return false;">[Source]</a></p>
493
- <div class="method-source-code" id="M000026-source">
492
+ onclick="toggleCode('M000005-source');return false;">[Source]</a></p>
493
+ <div class="method-source-code" id="M000005-source">
494
494
  <pre>
495
495
  <span class="ruby-comment cmt"># File lib/mack-facets/extensions/object.rb, line 49</span>
496
496
  49: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">to_param</span>
@@ -501,11 +501,11 @@ handling of parameters.
501
501
  </div>
502
502
  </div>
503
503
 
504
- <div id="method-M000024" class="method-detail">
505
- <a name="M000024"></a>
504
+ <div id="method-M000003" class="method-detail">
505
+ <a name="M000003"></a>
506
506
 
507
507
  <div class="method-heading">
508
- <a href="#M000024" class="method-signature">
508
+ <a href="#M000003" class="method-signature">
509
509
  <span class="method-name">with_options</span><span class="method-args">(options) {|Mack::Utils::OptionMerger.new(self, options)| ...}</span>
510
510
  </a>
511
511
  </div>
@@ -531,8 +531,8 @@ Can also be used with an explicit receiver:
531
531
  end
532
532
  </pre>
533
533
  <p><a class="source-toggle" href="#"
534
- onclick="toggleCode('M000024-source');return false;">[Source]</a></p>
535
- <div class="method-source-code" id="M000024-source">
534
+ onclick="toggleCode('M000003-source');return false;">[Source]</a></p>
535
+ <div class="method-source-code" id="M000003-source">
536
536
  <pre>
537
537
  <span class="ruby-comment cmt"># File lib/mack-facets/extensions/object.rb, line 38</span>
538
538
  38: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">with_options</span>(<span class="ruby-identifier">options</span>)