cliutils 1.0.2 → 1.0.3

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 (46) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +2 -0
  3. data/.yardoc/checksums +11 -11
  4. data/.yardoc/object_types +0 -0
  5. data/.yardoc/objects/root.dat +0 -0
  6. data/Gemfile.lock +12 -33
  7. data/README.md +1 -1
  8. data/Rakefile +36 -31
  9. data/cliutils.gemspec +3 -2
  10. data/lib/cliutils/configuration.rb +13 -31
  11. data/lib/cliutils/configurator.rb +23 -62
  12. data/lib/cliutils/ext/Hash+Extensions.rb +39 -78
  13. data/lib/cliutils/ext/Logger+Extensions.rb +6 -11
  14. data/lib/cliutils/ext/String+Extensions.rb +25 -13
  15. data/lib/cliutils/logger-delegator.rb +15 -39
  16. data/lib/cliutils/messenging.rb +10 -28
  17. data/lib/cliutils/prefs.rb +18 -43
  18. data/lib/cliutils/pretty-io.rb +59 -127
  19. data/lib/cliutils/version.rb +2 -1
  20. data/lib/cliutils.rb +2 -0
  21. metadata +20 -32
  22. data/bin/cliutils +0 -38
  23. data/doc/CLIUtils/Configuration.html +0 -373
  24. data/doc/CLIUtils/Configurator.html +0 -873
  25. data/doc/CLIUtils/LoggerDelegator.html +0 -560
  26. data/doc/CLIUtils/Messenging.html +0 -396
  27. data/doc/CLIUtils/Prefs.html +0 -609
  28. data/doc/CLIUtils/PrettyIO.html +0 -1333
  29. data/doc/CLIUtils.html +0 -131
  30. data/doc/Hash.html +0 -672
  31. data/doc/Logger.html +0 -233
  32. data/doc/String.html +0 -562
  33. data/doc/_index.html +0 -207
  34. data/doc/class_list.html +0 -54
  35. data/doc/css/common.css +0 -1
  36. data/doc/css/full_list.css +0 -57
  37. data/doc/css/style.css +0 -339
  38. data/doc/file.README.html +0 -415
  39. data/doc/file_list.html +0 -56
  40. data/doc/frames.html +0 -26
  41. data/doc/index.html +0 -415
  42. data/doc/js/app.js +0 -219
  43. data/doc/js/full_list.js +0 -178
  44. data/doc/js/jquery.js +0 -4
  45. data/doc/method_list.html +0 -389
  46. data/doc/top-level-namespace.html +0 -114
@@ -1,560 +0,0 @@
1
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
2
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3
- <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
4
- <head>
5
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
6
- <title>
7
- Class: CLIUtils::LoggerDelegator
8
-
9
- &mdash; Documentation by YARD 0.8.7.4
10
-
11
- </title>
12
-
13
- <link rel="stylesheet" href="../css/style.css" type="text/css" charset="utf-8" />
14
-
15
- <link rel="stylesheet" href="../css/common.css" type="text/css" charset="utf-8" />
16
-
17
- <script type="text/javascript" charset="utf-8">
18
- hasFrames = window.top.frames.main ? true : false;
19
- relpath = '../';
20
- framesUrl = "../frames.html#!CLIUtils/LoggerDelegator.html";
21
- </script>
22
-
23
-
24
- <script type="text/javascript" charset="utf-8" src="../js/jquery.js"></script>
25
-
26
- <script type="text/javascript" charset="utf-8" src="../js/app.js"></script>
27
-
28
-
29
- </head>
30
- <body>
31
- <div id="header">
32
- <div id="menu">
33
-
34
- <a href="../_index.html">Index (L)</a> &raquo;
35
- <span class='title'><span class='object_link'><a href="../CLIUtils.html" title="CLIUtils (module)">CLIUtils</a></span></span>
36
- &raquo;
37
- <span class="title">LoggerDelegator</span>
38
-
39
-
40
- <div class="noframes"><span class="title">(</span><a href="." target="_top">no frames</a><span class="title">)</span></div>
41
- </div>
42
-
43
- <div id="search">
44
-
45
- <a class="full_list_link" id="class_list_link"
46
- href="../class_list.html">
47
- Class List
48
- </a>
49
-
50
- <a class="full_list_link" id="method_list_link"
51
- href="../method_list.html">
52
- Method List
53
- </a>
54
-
55
- <a class="full_list_link" id="file_list_link"
56
- href="../file_list.html">
57
- File List
58
- </a>
59
-
60
- </div>
61
- <div class="clear"></div>
62
- </div>
63
-
64
- <iframe id="search_frame"></iframe>
65
-
66
- <div id="content"><h1>Class: CLIUtils::LoggerDelegator
67
-
68
-
69
-
70
- </h1>
71
-
72
- <dl class="box">
73
-
74
- <dt class="r1">Inherits:</dt>
75
- <dd class="r1">
76
- <span class="inheritName">Object</span>
77
-
78
- <ul class="fullTree">
79
- <li>Object</li>
80
-
81
- <li class="next">CLIUtils::LoggerDelegator</li>
82
-
83
- </ul>
84
- <a href="#" class="inheritanceTree">show all</a>
85
-
86
- </dd>
87
-
88
-
89
-
90
-
91
-
92
-
93
-
94
-
95
-
96
- <dt class="r2 last">Defined in:</dt>
97
- <dd class="r2 last">lib/cliutils/logger-delegator.rb</dd>
98
-
99
- </dl>
100
- <div class="clear"></div>
101
-
102
- <h2>Overview</h2><div class="docstring">
103
- <div class="discussion">
104
-
105
- <h6 id="label-"></h6>
106
-
107
- <pre class="code ruby"><code class="ruby">LoggerDelegator Class
108
-
109
- Manages any configuration values and the flat YAML file
110
- into which they get stored.
111
- ======================================================</code></pre>
112
-
113
-
114
- </div>
115
- </div>
116
- <div class="tags">
117
-
118
-
119
- </div>
120
-
121
-
122
-
123
- <h2>Instance Attribute Summary <small>(<a href="#" class="summary_toggle">collapse</a>)</small></h2>
124
- <ul class="summary">
125
-
126
- <li class="public ">
127
- <span class="summary_signature">
128
-
129
- <a href="#devices-instance_method" title="#devices (instance method)">- (Object) <strong>devices</strong> </a>
130
-
131
-
132
-
133
- </span>
134
-
135
-
136
-
137
-
138
- <span class="note title readonly">readonly</span>
139
-
140
-
141
-
142
-
143
-
144
-
145
-
146
-
147
-
148
- <span class="summary_desc"><div class='inline'>
149
- <h6 id="label-Attributes++%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D.">Attributes ====================================================.</h6>
150
- </div></span>
151
-
152
- </li>
153
-
154
-
155
- </ul>
156
-
157
-
158
-
159
-
160
-
161
- <h2>
162
- Class Method Summary
163
- <small>(<a href="#" class="summary_toggle">collapse</a>)</small>
164
- </h2>
165
-
166
- <ul class="summary">
167
-
168
- <li class="public ">
169
- <span class="summary_signature">
170
-
171
- <a href="#delegate-class_method" title="delegate (class method)">+ (Object) <strong>delegate</strong> </a>
172
-
173
-
174
-
175
- </span>
176
-
177
-
178
-
179
-
180
-
181
-
182
-
183
-
184
-
185
- <span class="summary_desc"><div class='inline'>
186
- <p>—————————————————- delegate_all method.</p>
187
- </div></span>
188
-
189
- </li>
190
-
191
-
192
- </ul>
193
-
194
- <h2>
195
- Instance Method Summary
196
- <small>(<a href="#" class="summary_toggle">collapse</a>)</small>
197
- </h2>
198
-
199
- <ul class="summary">
200
-
201
- <li class="public ">
202
- <span class="summary_signature">
203
-
204
- <a href="#attach-instance_method" title="#attach (instance method)">- (Object) <strong>attach</strong>(target) </a>
205
-
206
-
207
-
208
- </span>
209
-
210
-
211
-
212
-
213
-
214
-
215
-
216
-
217
-
218
- <span class="summary_desc"><div class='inline'>
219
- <p>—————————————————- attach method.</p>
220
- </div></span>
221
-
222
- </li>
223
-
224
-
225
- <li class="public ">
226
- <span class="summary_signature">
227
-
228
- <a href="#detach-instance_method" title="#detach (instance method)">- (Object) <strong>detach</strong>(target) </a>
229
-
230
-
231
-
232
- </span>
233
-
234
-
235
-
236
-
237
-
238
-
239
-
240
-
241
-
242
- <span class="summary_desc"><div class='inline'>
243
- <p>—————————————————- detach method.</p>
244
- </div></span>
245
-
246
- </li>
247
-
248
-
249
- <li class="public ">
250
- <span class="summary_signature">
251
-
252
- <a href="#initialize-instance_method" title="#initialize (instance method)">- (LoggerDelegator) <strong>initialize</strong>(*targets) </a>
253
-
254
-
255
-
256
- </span>
257
-
258
-
259
- <span class="note title constructor">constructor</span>
260
-
261
-
262
-
263
-
264
-
265
-
266
-
267
-
268
- <span class="summary_desc"><div class='inline'>
269
- <h6 id="label-Methods++%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D++----------------------------------------------------++initialize+method.">Methods ==================================================== —————————————————- initialize method.</h6>
270
- </div></span>
271
-
272
- </li>
273
-
274
-
275
- </ul>
276
-
277
-
278
- <div id="constructor_details" class="method_details_list">
279
- <h2>Constructor Details</h2>
280
-
281
- <div class="method_details first">
282
- <h3 class="signature first" id="initialize-instance_method">
283
-
284
- - (<tt><span class='object_link'><a href="" title="CLIUtils::LoggerDelegator (class)">LoggerDelegator</a></span></tt>) <strong>initialize</strong>(*targets)
285
-
286
-
287
-
288
-
289
-
290
- </h3><div class="docstring">
291
- <div class="discussion">
292
-
293
- <h6 id="label-"></h6>
294
-
295
- <pre class="code ruby"><code class="ruby">Methods
296
- ====================================================
297
- ----------------------------------------------------
298
- initialize method
299
-
300
- Initializer
301
- @param *targets The endpoints to delegate to
302
- @return void
303
- ----------------------------------------------------</code></pre>
304
-
305
-
306
- </div>
307
- </div>
308
- <div class="tags">
309
-
310
-
311
- </div><table class="source_code">
312
- <tr>
313
- <td>
314
- <pre class="lines">
315
-
316
-
317
- 24
318
- 25
319
- 26
320
- 27</pre>
321
- </td>
322
- <td>
323
- <pre class="code"><span class="info file"># File 'lib/cliutils/logger-delegator.rb', line 24</span>
324
-
325
- <span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span><span class='lparen'>(</span><span class='op'>*</span><span class='id identifier rubyid_targets'>targets</span><span class='rparen'>)</span>
326
- <span class='ivar'>@targets</span> <span class='op'>=</span> <span class='id identifier rubyid_targets'>targets</span>
327
- <span class='const'>LoggerDelegator</span><span class='period'>.</span><span class='id identifier rubyid_delegate'>delegate</span>
328
- <span class='kw'>end</span></pre>
329
- </td>
330
- </tr>
331
- </table>
332
- </div>
333
-
334
- </div>
335
-
336
- <div id="instance_attr_details" class="attr_details">
337
- <h2>Instance Attribute Details</h2>
338
-
339
-
340
- <span id=""></span>
341
- <div class="method_details first">
342
- <h3 class="signature first" id="devices-instance_method">
343
-
344
- - (<tt>Object</tt>) <strong>devices</strong> <span class="extras">(readonly)</span>
345
-
346
-
347
-
348
-
349
-
350
- </h3><div class="docstring">
351
- <div class="discussion">
352
-
353
- <h6 id="label-"></h6>
354
-
355
- <pre class="code ruby"><code class="ruby">Attributes
356
- ====================================================</code></pre>
357
-
358
-
359
- </div>
360
- </div>
361
- <div class="tags">
362
-
363
-
364
- </div><table class="source_code">
365
- <tr>
366
- <td>
367
- <pre class="lines">
368
-
369
-
370
- 12
371
- 13
372
- 14</pre>
373
- </td>
374
- <td>
375
- <pre class="code"><span class="info file"># File 'lib/cliutils/logger-delegator.rb', line 12</span>
376
-
377
- <span class='kw'>def</span> <span class='id identifier rubyid_devices'>devices</span>
378
- <span class='ivar'>@devices</span>
379
- <span class='kw'>end</span></pre>
380
- </td>
381
- </tr>
382
- </table>
383
- </div>
384
-
385
- </div>
386
-
387
-
388
- <div id="class_method_details" class="method_details_list">
389
- <h2>Class Method Details</h2>
390
-
391
-
392
- <div class="method_details first">
393
- <h3 class="signature first" id="delegate-class_method">
394
-
395
- + (<tt>Object</tt>) <strong>delegate</strong>
396
-
397
-
398
-
399
-
400
-
401
- </h3><div class="docstring">
402
- <div class="discussion">
403
- <hr>
404
-
405
- <pre class="code ruby"><code class="ruby">delegate_all method
406
-
407
- Creates delegator methods for all of the methods
408
- on IO.
409
- @return void
410
- ----------------------------------------------------</code></pre>
411
-
412
-
413
- </div>
414
- </div>
415
- <div class="tags">
416
-
417
-
418
- </div><table class="source_code">
419
- <tr>
420
- <td>
421
- <pre class="lines">
422
-
423
-
424
- 47
425
- 48
426
- 49
427
- 50
428
- 51
429
- 52
430
- 53</pre>
431
- </td>
432
- <td>
433
- <pre class="code"><span class="info file"># File 'lib/cliutils/logger-delegator.rb', line 47</span>
434
-
435
- <span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_delegate'>delegate</span>
436
- <span class='qwords_beg'>%w(</span><span class='tstring_content'>log</span><span class='words_sep'> </span><span class='tstring_content'>debug</span><span class='words_sep'> </span><span class='tstring_content'>info</span><span class='words_sep'> </span><span class='tstring_content'>warn</span><span class='words_sep'> </span><span class='tstring_content'>error</span><span class='words_sep'> </span><span class='tstring_content'>section</span><span class='words_sep'> </span><span class='tstring_content'>success</span><span class='words_sep'>)</span><span class='period'>.</span><span class='id identifier rubyid_each'>each</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_m'>m</span><span class='op'>|</span>
437
- <span class='id identifier rubyid_define_method'>define_method</span><span class='lparen'>(</span><span class='id identifier rubyid_m'>m</span><span class='rparen'>)</span> <span class='kw'>do</span> <span class='op'>|</span><span class='op'>*</span><span class='id identifier rubyid_args'>args</span><span class='op'>|</span>
438
- <span class='ivar'>@targets</span><span class='period'>.</span><span class='id identifier rubyid_map'>map</span> <span class='lbrace'>{</span> <span class='op'>|</span><span class='id identifier rubyid_t'>t</span><span class='op'>|</span> <span class='id identifier rubyid_t'>t</span><span class='period'>.</span><span class='id identifier rubyid_send'>send</span><span class='lparen'>(</span><span class='id identifier rubyid_m'>m</span><span class='comma'>,</span> <span class='op'>*</span><span class='id identifier rubyid_args'>args</span><span class='rparen'>)</span> <span class='rbrace'>}</span>
439
- <span class='kw'>end</span>
440
- <span class='kw'>end</span>
441
- <span class='kw'>end</span></pre>
442
- </td>
443
- </tr>
444
- </table>
445
- </div>
446
-
447
- </div>
448
-
449
- <div id="instance_method_details" class="method_details_list">
450
- <h2>Instance Method Details</h2>
451
-
452
-
453
- <div class="method_details first">
454
- <h3 class="signature first" id="attach-instance_method">
455
-
456
- - (<tt>Object</tt>) <strong>attach</strong>(target)
457
-
458
-
459
-
460
-
461
-
462
- </h3><div class="docstring">
463
- <div class="discussion">
464
- <hr>
465
-
466
- <pre class="code ruby"><code class="ruby">attach method
467
-
468
- Attaches a new target to delegate to.
469
- @return void
470
- ----------------------------------------------------</code></pre>
471
-
472
-
473
- </div>
474
- </div>
475
- <div class="tags">
476
-
477
-
478
- </div><table class="source_code">
479
- <tr>
480
- <td>
481
- <pre class="lines">
482
-
483
-
484
- 35
485
- 36
486
- 37
487
- 38</pre>
488
- </td>
489
- <td>
490
- <pre class="code"><span class="info file"># File 'lib/cliutils/logger-delegator.rb', line 35</span>
491
-
492
- <span class='kw'>def</span> <span class='id identifier rubyid_attach'>attach</span><span class='lparen'>(</span><span class='id identifier rubyid_target'>target</span><span class='rparen'>)</span>
493
- <span class='ivar'>@targets</span> <span class='op'>&lt;&lt;</span> <span class='id identifier rubyid_target'>target</span>
494
- <span class='const'>LoggerDelegator</span><span class='period'>.</span><span class='id identifier rubyid_delegate'>delegate</span>
495
- <span class='kw'>end</span></pre>
496
- </td>
497
- </tr>
498
- </table>
499
- </div>
500
-
501
- <div class="method_details ">
502
- <h3 class="signature " id="detach-instance_method">
503
-
504
- - (<tt>Object</tt>) <strong>detach</strong>(target)
505
-
506
-
507
-
508
-
509
-
510
- </h3><div class="docstring">
511
- <div class="discussion">
512
- <hr>
513
-
514
- <pre class="code ruby"><code class="ruby">detach method
515
-
516
- Detaches a delegation target.
517
- @return void
518
- ----------------------------------------------------</code></pre>
519
-
520
-
521
- </div>
522
- </div>
523
- <div class="tags">
524
-
525
-
526
- </div><table class="source_code">
527
- <tr>
528
- <td>
529
- <pre class="lines">
530
-
531
-
532
- 61
533
- 62
534
- 63
535
- 64</pre>
536
- </td>
537
- <td>
538
- <pre class="code"><span class="info file"># File 'lib/cliutils/logger-delegator.rb', line 61</span>
539
-
540
- <span class='kw'>def</span> <span class='id identifier rubyid_detach'>detach</span><span class='lparen'>(</span><span class='id identifier rubyid_target'>target</span><span class='rparen'>)</span>
541
- <span class='ivar'>@targets</span><span class='period'>.</span><span class='id identifier rubyid_delete'>delete</span><span class='lparen'>(</span><span class='id identifier rubyid_target'>target</span><span class='rparen'>)</span>
542
- <span class='const'>LoggerDelegator</span><span class='period'>.</span><span class='id identifier rubyid_delegate'>delegate</span>
543
- <span class='kw'>end</span></pre>
544
- </td>
545
- </tr>
546
- </table>
547
- </div>
548
-
549
- </div>
550
-
551
- </div>
552
-
553
- <div id="footer">
554
- Generated on Sat Mar 29 17:22:03 2014 by
555
- <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
556
- 0.8.7.4 (ruby-2.1.0).
557
- </div>
558
-
559
- </body>
560
- </html>