cliutils 1.0.0 → 1.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.yardoc/checksums +11 -0
- data/.yardoc/object_types +0 -0
- data/.yardoc/objects/root.dat +0 -0
- data/.yardoc/proxy_types +0 -0
- data/doc/CLIUtils/Configuration.html +373 -0
- data/doc/CLIUtils/Configurator.html +873 -0
- data/doc/CLIUtils/LoggerDelegator.html +560 -0
- data/doc/CLIUtils/Messenging.html +396 -0
- data/doc/CLIUtils/Prefs.html +609 -0
- data/doc/CLIUtils/PrettyIO.html +1333 -0
- data/doc/CLIUtils.html +131 -0
- data/doc/Hash.html +672 -0
- data/doc/Logger.html +233 -0
- data/doc/String.html +562 -0
- data/doc/_index.html +207 -0
- data/doc/class_list.html +54 -0
- data/doc/css/common.css +1 -0
- data/doc/css/full_list.css +57 -0
- data/doc/css/style.css +339 -0
- data/doc/file.README.html +415 -0
- data/doc/file_list.html +56 -0
- data/doc/frames.html +26 -0
- data/doc/index.html +415 -0
- data/doc/js/app.js +219 -0
- data/doc/js/full_list.js +178 -0
- data/doc/js/jquery.js +4 -0
- data/doc/method_list.html +389 -0
- data/doc/top-level-namespace.html +114 -0
- data/lib/cliutils/version.rb +1 -1
- metadata +29 -57
- data/.DS_Store +0 -0
- data/README.rdoc +0 -19
- data/html/CLIUtils/Configuration.html +0 -271
- data/html/CLIUtils/Configurator.html +0 -504
- data/html/CLIUtils/LoggerDelegator.html +0 -344
- data/html/CLIUtils/Messenging.html +0 -284
- data/html/CLIUtils/Prefs.html +0 -330
- data/html/CLIUtils/PrettyIO.html +0 -799
- data/html/CLIUtils.html +0 -112
- data/html/Hash.html +0 -453
- data/html/Logger.html +0 -183
- data/html/Object.html +0 -120
- data/html/README_md.html +0 -454
- data/html/String.html +0 -413
- data/html/created.rid +0 -13
- data/html/fonts/Lato-Light.ttf +0 -0
- data/html/fonts/Lato-LightItalic.ttf +0 -0
- data/html/fonts/Lato-Regular.ttf +0 -0
- data/html/fonts/Lato-RegularItalic.ttf +0 -0
- data/html/fonts/SourceCodePro-Bold.ttf +0 -0
- data/html/fonts/SourceCodePro-Regular.ttf +0 -0
- data/html/fonts.css +0 -167
- data/html/images/add.png +0 -0
- data/html/images/arrow_up.png +0 -0
- data/html/images/brick.png +0 -0
- data/html/images/brick_link.png +0 -0
- data/html/images/bug.png +0 -0
- data/html/images/bullet_black.png +0 -0
- data/html/images/bullet_toggle_minus.png +0 -0
- data/html/images/bullet_toggle_plus.png +0 -0
- data/html/images/date.png +0 -0
- data/html/images/delete.png +0 -0
- data/html/images/find.png +0 -0
- data/html/images/loadingAnimation.gif +0 -0
- data/html/images/macFFBgHack.png +0 -0
- data/html/images/package.png +0 -0
- data/html/images/page_green.png +0 -0
- data/html/images/page_white_text.png +0 -0
- data/html/images/page_white_width.png +0 -0
- data/html/images/plugin.png +0 -0
- data/html/images/ruby.png +0 -0
- data/html/images/tag_blue.png +0 -0
- data/html/images/tag_green.png +0 -0
- data/html/images/transparent.png +0 -0
- data/html/images/wrench.png +0 -0
- data/html/images/wrench_orange.png +0 -0
- data/html/images/zoom.png +0 -0
- data/html/index.html +0 -455
- data/html/js/darkfish.js +0 -140
- data/html/js/jquery.js +0 -18
- data/html/js/navigation.js +0 -142
- data/html/js/search.js +0 -109
- data/html/js/search_index.js +0 -1
- data/html/js/searcher.js +0 -228
- data/html/rdoc.css +0 -580
- data/html/table_of_contents.html +0 -399
@@ -1,344 +0,0 @@
|
|
1
|
-
<!DOCTYPE html>
|
2
|
-
|
3
|
-
<html>
|
4
|
-
<head>
|
5
|
-
<meta charset="UTF-8">
|
6
|
-
|
7
|
-
<title>class CLIUtils::LoggerDelegator - CLIUtils</title>
|
8
|
-
|
9
|
-
<link href="../fonts.css" rel="stylesheet">
|
10
|
-
<link href="../rdoc.css" rel="stylesheet">
|
11
|
-
|
12
|
-
<script type="text/javascript">
|
13
|
-
var rdoc_rel_prefix = "../";
|
14
|
-
</script>
|
15
|
-
|
16
|
-
<script src="../js/jquery.js"></script>
|
17
|
-
<script src="../js/navigation.js"></script>
|
18
|
-
<script src="../js/search_index.js"></script>
|
19
|
-
<script src="../js/search.js"></script>
|
20
|
-
<script src="../js/searcher.js"></script>
|
21
|
-
<script src="../js/darkfish.js"></script>
|
22
|
-
|
23
|
-
|
24
|
-
<body id="top" role="document" class="class">
|
25
|
-
<nav role="navigation">
|
26
|
-
<div id="project-navigation">
|
27
|
-
<div id="home-section" role="region" title="Quick navigation" class="nav-section">
|
28
|
-
<h2>
|
29
|
-
<a href="../index.html" rel="home">Home</a>
|
30
|
-
</h2>
|
31
|
-
|
32
|
-
<div id="table-of-contents-navigation">
|
33
|
-
<a href="../table_of_contents.html#pages">Pages</a>
|
34
|
-
<a href="../table_of_contents.html#classes">Classes</a>
|
35
|
-
<a href="../table_of_contents.html#methods">Methods</a>
|
36
|
-
</div>
|
37
|
-
</div>
|
38
|
-
|
39
|
-
<div id="search-section" role="search" class="project-section initially-hidden">
|
40
|
-
<form action="#" method="get" accept-charset="utf-8">
|
41
|
-
<div id="search-field-wrapper">
|
42
|
-
<input id="search-field" role="combobox" aria-label="Search"
|
43
|
-
aria-autocomplete="list" aria-controls="search-results"
|
44
|
-
type="text" name="search" placeholder="Search" spellcheck="false"
|
45
|
-
title="Type to search, Up and Down to navigate, Enter to load">
|
46
|
-
</div>
|
47
|
-
|
48
|
-
<ul id="search-results" aria-label="Search Results"
|
49
|
-
aria-busy="false" aria-expanded="false"
|
50
|
-
aria-atomic="false" class="initially-hidden"></ul>
|
51
|
-
</form>
|
52
|
-
</div>
|
53
|
-
|
54
|
-
</div>
|
55
|
-
|
56
|
-
|
57
|
-
<div class="nav-section">
|
58
|
-
<h3>Table of Contents</h3>
|
59
|
-
|
60
|
-
<ul class="link-list" role="directory">
|
61
|
-
<li><a href="#class-CLIUtils::LoggerDelegator-label-"></a>
|
62
|
-
<li><a href="#class-CLIUtils::LoggerDelegator-label-"></a>
|
63
|
-
</ul>
|
64
|
-
</div>
|
65
|
-
|
66
|
-
|
67
|
-
<div id="class-metadata">
|
68
|
-
|
69
|
-
<div id="parent-class-section" class="nav-section">
|
70
|
-
<h3>Parent</h3>
|
71
|
-
|
72
|
-
|
73
|
-
<p class="link">Object
|
74
|
-
|
75
|
-
</div>
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
<!-- Method Quickref -->
|
80
|
-
<div id="method-list-section" class="nav-section">
|
81
|
-
<h3>Methods</h3>
|
82
|
-
|
83
|
-
<ul class="link-list" role="directory">
|
84
|
-
|
85
|
-
<li ><a href="#method-c-delegate">::delegate</a>
|
86
|
-
|
87
|
-
<li ><a href="#method-c-new">::new</a>
|
88
|
-
|
89
|
-
<li ><a href="#method-i-attach">#attach</a>
|
90
|
-
|
91
|
-
<li ><a href="#method-i-detach">#detach</a>
|
92
|
-
|
93
|
-
</ul>
|
94
|
-
</div>
|
95
|
-
|
96
|
-
</div>
|
97
|
-
</nav>
|
98
|
-
|
99
|
-
<main role="main" aria-labelledby="class-CLIUtils::LoggerDelegator">
|
100
|
-
<h1 id="class-CLIUtils::LoggerDelegator" class="class">
|
101
|
-
class CLIUtils::LoggerDelegator
|
102
|
-
</h1>
|
103
|
-
|
104
|
-
<section class="description">
|
105
|
-
|
106
|
-
<h6 id="class-CLIUtils::LoggerDelegator-label-"><span><a href="#class-CLIUtils::LoggerDelegator-label-">¶</a> <a href="#documentation">↑</a></span></h6>
|
107
|
-
|
108
|
-
<p><a href="LoggerDelegator.html">LoggerDelegator</a> Class</p>
|
109
|
-
|
110
|
-
<p>Manages any configuration values and the flat YAML file into which they get
|
111
|
-
stored.</p>
|
112
|
-
|
113
|
-
<h6 id="class-CLIUtils::LoggerDelegator-label-"><span><a href="#class-CLIUtils::LoggerDelegator-label-">¶</a> <a href="#documentation">↑</a></span></h6>
|
114
|
-
|
115
|
-
</section>
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
<section id="5Buntitled-5D" class="documentation-section">
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
<section class="attribute-method-details" class="method-section">
|
129
|
-
<header>
|
130
|
-
<h3>Attributes</h3>
|
131
|
-
</header>
|
132
|
-
|
133
|
-
|
134
|
-
<div id="attribute-i-devices" class="method-detail">
|
135
|
-
<div class="method-heading attribute-method-heading">
|
136
|
-
<span class="method-name">devices</span><span
|
137
|
-
class="attribute-access-type">[R]</span>
|
138
|
-
</div>
|
139
|
-
|
140
|
-
<div class="method-description">
|
141
|
-
|
142
|
-
<h6 id="attribute-i-devices-label-"><span><a href="#attribute-i-devices-label-">¶</a> <a href="#documentation">↑</a></span></h6>
|
143
|
-
|
144
|
-
<p>Attributes</p>
|
145
|
-
|
146
|
-
<h6 id="attribute-i-devices-label-"><span><a href="#attribute-i-devices-label-">¶</a> <a href="#documentation">↑</a></span></h6>
|
147
|
-
|
148
|
-
</div>
|
149
|
-
</div>
|
150
|
-
|
151
|
-
</section>
|
152
|
-
|
153
|
-
|
154
|
-
|
155
|
-
<section id="public-class-5Buntitled-5D-method-details" class="method-section">
|
156
|
-
<header>
|
157
|
-
<h3>Public Class Methods</h3>
|
158
|
-
</header>
|
159
|
-
|
160
|
-
|
161
|
-
<div id="method-c-delegate" class="method-detail ">
|
162
|
-
|
163
|
-
<div class="method-heading">
|
164
|
-
<span class="method-name">delegate</span><span
|
165
|
-
class="method-args">()</span>
|
166
|
-
|
167
|
-
<span class="method-click-advice">click to toggle source</span>
|
168
|
-
|
169
|
-
</div>
|
170
|
-
|
171
|
-
|
172
|
-
<div class="method-description">
|
173
|
-
|
174
|
-
<hr>
|
175
|
-
|
176
|
-
<p>delegate_all method</p>
|
177
|
-
|
178
|
-
<p>Creates delegator methods for all of the methods on IO. @return void</p>
|
179
|
-
<hr>
|
180
|
-
|
181
|
-
|
182
|
-
|
183
|
-
|
184
|
-
<div class="method-source-code" id="delegate-source">
|
185
|
-
<pre><span class="ruby-comment"># File lib/cliutils/logger-delegator.rb, line 47</span>
|
186
|
-
<span class="ruby-keyword">def</span> <span class="ruby-keyword">self</span>.<span class="ruby-identifier">delegate</span>
|
187
|
-
<span class="ruby-node">%w(log debug info warn error section success)</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">m</span><span class="ruby-operator">|</span>
|
188
|
-
<span class="ruby-identifier">define_method</span>(<span class="ruby-identifier">m</span>) <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-operator">*</span><span class="ruby-identifier">args</span><span class="ruby-operator">|</span>
|
189
|
-
<span class="ruby-ivar">@targets</span>.<span class="ruby-identifier">map</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">t</span><span class="ruby-operator">|</span> <span class="ruby-identifier">t</span>.<span class="ruby-identifier">send</span>(<span class="ruby-identifier">m</span>, <span class="ruby-operator">*</span><span class="ruby-identifier">args</span>) }
|
190
|
-
<span class="ruby-keyword">end</span>
|
191
|
-
<span class="ruby-keyword">end</span>
|
192
|
-
<span class="ruby-keyword">end</span></pre>
|
193
|
-
</div>
|
194
|
-
|
195
|
-
</div>
|
196
|
-
|
197
|
-
|
198
|
-
|
199
|
-
|
200
|
-
</div>
|
201
|
-
|
202
|
-
|
203
|
-
<div id="method-c-new" class="method-detail ">
|
204
|
-
|
205
|
-
<div class="method-heading">
|
206
|
-
<span class="method-name">new</span><span
|
207
|
-
class="method-args">(*targets)</span>
|
208
|
-
|
209
|
-
<span class="method-click-advice">click to toggle source</span>
|
210
|
-
|
211
|
-
</div>
|
212
|
-
|
213
|
-
|
214
|
-
<div class="method-description">
|
215
|
-
|
216
|
-
<h6 id="method-c-new-label-"><span><a href="#method-c-new-label-">¶</a> <a href="#documentation">↑</a></span></h6>
|
217
|
-
|
218
|
-
<p>Methods</p>
|
219
|
-
|
220
|
-
<h6 id="method-c-new-label-"><span><a href="#method-c-new-label-">¶</a> <a href="#documentation">↑</a></span></h6>
|
221
|
-
<hr>
|
222
|
-
|
223
|
-
<p>initialize method</p>
|
224
|
-
|
225
|
-
<p>Initializer @param *targets The endpoints to delegate to @return void</p>
|
226
|
-
<hr>
|
227
|
-
|
228
|
-
|
229
|
-
|
230
|
-
|
231
|
-
<div class="method-source-code" id="new-source">
|
232
|
-
<pre><span class="ruby-comment"># File lib/cliutils/logger-delegator.rb, line 24</span>
|
233
|
-
<span class="ruby-keyword">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-operator">*</span><span class="ruby-identifier">targets</span>)
|
234
|
-
<span class="ruby-ivar">@targets</span> = <span class="ruby-identifier">targets</span>
|
235
|
-
<span class="ruby-constant">LoggerDelegator</span>.<span class="ruby-identifier">delegate</span>
|
236
|
-
<span class="ruby-keyword">end</span></pre>
|
237
|
-
</div>
|
238
|
-
|
239
|
-
</div>
|
240
|
-
|
241
|
-
|
242
|
-
|
243
|
-
|
244
|
-
</div>
|
245
|
-
|
246
|
-
|
247
|
-
</section>
|
248
|
-
|
249
|
-
<section id="public-instance-5Buntitled-5D-method-details" class="method-section">
|
250
|
-
<header>
|
251
|
-
<h3>Public Instance Methods</h3>
|
252
|
-
</header>
|
253
|
-
|
254
|
-
|
255
|
-
<div id="method-i-attach" class="method-detail ">
|
256
|
-
|
257
|
-
<div class="method-heading">
|
258
|
-
<span class="method-name">attach</span><span
|
259
|
-
class="method-args">(target)</span>
|
260
|
-
|
261
|
-
<span class="method-click-advice">click to toggle source</span>
|
262
|
-
|
263
|
-
</div>
|
264
|
-
|
265
|
-
|
266
|
-
<div class="method-description">
|
267
|
-
|
268
|
-
<hr>
|
269
|
-
|
270
|
-
<p>attach method</p>
|
271
|
-
|
272
|
-
<p>Attaches a new target to delegate to. @return void</p>
|
273
|
-
<hr>
|
274
|
-
|
275
|
-
|
276
|
-
|
277
|
-
|
278
|
-
<div class="method-source-code" id="attach-source">
|
279
|
-
<pre><span class="ruby-comment"># File lib/cliutils/logger-delegator.rb, line 35</span>
|
280
|
-
<span class="ruby-keyword">def</span> <span class="ruby-identifier">attach</span>(<span class="ruby-identifier">target</span>)
|
281
|
-
<span class="ruby-ivar">@targets</span> <span class="ruby-operator"><<</span> <span class="ruby-identifier">target</span>
|
282
|
-
<span class="ruby-constant">LoggerDelegator</span>.<span class="ruby-identifier">delegate</span>
|
283
|
-
<span class="ruby-keyword">end</span></pre>
|
284
|
-
</div>
|
285
|
-
|
286
|
-
</div>
|
287
|
-
|
288
|
-
|
289
|
-
|
290
|
-
|
291
|
-
</div>
|
292
|
-
|
293
|
-
|
294
|
-
<div id="method-i-detach" class="method-detail ">
|
295
|
-
|
296
|
-
<div class="method-heading">
|
297
|
-
<span class="method-name">detach</span><span
|
298
|
-
class="method-args">(target)</span>
|
299
|
-
|
300
|
-
<span class="method-click-advice">click to toggle source</span>
|
301
|
-
|
302
|
-
</div>
|
303
|
-
|
304
|
-
|
305
|
-
<div class="method-description">
|
306
|
-
|
307
|
-
<hr>
|
308
|
-
|
309
|
-
<p>detach method</p>
|
310
|
-
|
311
|
-
<p>Detaches a delegation target. @return void</p>
|
312
|
-
<hr>
|
313
|
-
|
314
|
-
|
315
|
-
|
316
|
-
|
317
|
-
<div class="method-source-code" id="detach-source">
|
318
|
-
<pre><span class="ruby-comment"># File lib/cliutils/logger-delegator.rb, line 61</span>
|
319
|
-
<span class="ruby-keyword">def</span> <span class="ruby-identifier">detach</span>(<span class="ruby-identifier">target</span>)
|
320
|
-
<span class="ruby-ivar">@targets</span>.<span class="ruby-identifier">delete</span>(<span class="ruby-identifier">target</span>)
|
321
|
-
<span class="ruby-constant">LoggerDelegator</span>.<span class="ruby-identifier">delegate</span>
|
322
|
-
<span class="ruby-keyword">end</span></pre>
|
323
|
-
</div>
|
324
|
-
|
325
|
-
</div>
|
326
|
-
|
327
|
-
|
328
|
-
|
329
|
-
|
330
|
-
</div>
|
331
|
-
|
332
|
-
|
333
|
-
</section>
|
334
|
-
|
335
|
-
</section>
|
336
|
-
</main>
|
337
|
-
|
338
|
-
|
339
|
-
<footer id="validator-badges" role="contentinfo">
|
340
|
-
<p><a href="http://validator.w3.org/check/referer">Validate</a>
|
341
|
-
<p>Generated by <a href="http://rdoc.rubyforge.org">RDoc</a> 4.1.1.
|
342
|
-
<p>Based on <a href="http://deveiate.org/projects/Darkfish-Rdoc/">Darkfish</a> by <a href="http://deveiate.org">Michael Granger</a>.
|
343
|
-
</footer>
|
344
|
-
|
@@ -1,284 +0,0 @@
|
|
1
|
-
<!DOCTYPE html>
|
2
|
-
|
3
|
-
<html>
|
4
|
-
<head>
|
5
|
-
<meta charset="UTF-8">
|
6
|
-
|
7
|
-
<title>module CLIUtils::Messenging - CLIUtils</title>
|
8
|
-
|
9
|
-
<link href="../fonts.css" rel="stylesheet">
|
10
|
-
<link href="../rdoc.css" rel="stylesheet">
|
11
|
-
|
12
|
-
<script type="text/javascript">
|
13
|
-
var rdoc_rel_prefix = "../";
|
14
|
-
</script>
|
15
|
-
|
16
|
-
<script src="../js/jquery.js"></script>
|
17
|
-
<script src="../js/navigation.js"></script>
|
18
|
-
<script src="../js/search_index.js"></script>
|
19
|
-
<script src="../js/search.js"></script>
|
20
|
-
<script src="../js/searcher.js"></script>
|
21
|
-
<script src="../js/darkfish.js"></script>
|
22
|
-
|
23
|
-
|
24
|
-
<body id="top" role="document" class="module">
|
25
|
-
<nav role="navigation">
|
26
|
-
<div id="project-navigation">
|
27
|
-
<div id="home-section" role="region" title="Quick navigation" class="nav-section">
|
28
|
-
<h2>
|
29
|
-
<a href="../index.html" rel="home">Home</a>
|
30
|
-
</h2>
|
31
|
-
|
32
|
-
<div id="table-of-contents-navigation">
|
33
|
-
<a href="../table_of_contents.html#pages">Pages</a>
|
34
|
-
<a href="../table_of_contents.html#classes">Classes</a>
|
35
|
-
<a href="../table_of_contents.html#methods">Methods</a>
|
36
|
-
</div>
|
37
|
-
</div>
|
38
|
-
|
39
|
-
<div id="search-section" role="search" class="project-section initially-hidden">
|
40
|
-
<form action="#" method="get" accept-charset="utf-8">
|
41
|
-
<div id="search-field-wrapper">
|
42
|
-
<input id="search-field" role="combobox" aria-label="Search"
|
43
|
-
aria-autocomplete="list" aria-controls="search-results"
|
44
|
-
type="text" name="search" placeholder="Search" spellcheck="false"
|
45
|
-
title="Type to search, Up and Down to navigate, Enter to load">
|
46
|
-
</div>
|
47
|
-
|
48
|
-
<ul id="search-results" aria-label="Search Results"
|
49
|
-
aria-busy="false" aria-expanded="false"
|
50
|
-
aria-atomic="false" class="initially-hidden"></ul>
|
51
|
-
</form>
|
52
|
-
</div>
|
53
|
-
|
54
|
-
</div>
|
55
|
-
|
56
|
-
|
57
|
-
<div class="nav-section">
|
58
|
-
<h3>Table of Contents</h3>
|
59
|
-
|
60
|
-
<ul class="link-list" role="directory">
|
61
|
-
<li><a href="#module-CLIUtils::Messenging-label-"></a>
|
62
|
-
<li><a href="#module-CLIUtils::Messenging-label-"></a>
|
63
|
-
</ul>
|
64
|
-
</div>
|
65
|
-
|
66
|
-
|
67
|
-
<div id="class-metadata">
|
68
|
-
|
69
|
-
|
70
|
-
<div id="includes-section" class="nav-section">
|
71
|
-
<h3>Included Modules</h3>
|
72
|
-
|
73
|
-
<ul class="link-list">
|
74
|
-
|
75
|
-
|
76
|
-
<li><a class="include" href="PrettyIO.html">CLIUtils::PrettyIO</a>
|
77
|
-
|
78
|
-
|
79
|
-
</ul>
|
80
|
-
</div>
|
81
|
-
|
82
|
-
|
83
|
-
<!-- Method Quickref -->
|
84
|
-
<div id="method-list-section" class="nav-section">
|
85
|
-
<h3>Methods</h3>
|
86
|
-
|
87
|
-
<ul class="link-list" role="directory">
|
88
|
-
|
89
|
-
<li ><a href="#method-c-included">::included</a>
|
90
|
-
|
91
|
-
<li ><a href="#method-i-default_instance">#default_instance</a>
|
92
|
-
|
93
|
-
<li ><a href="#method-i-messenger">#messenger</a>
|
94
|
-
|
95
|
-
</ul>
|
96
|
-
</div>
|
97
|
-
|
98
|
-
</div>
|
99
|
-
</nav>
|
100
|
-
|
101
|
-
<main role="main" aria-labelledby="module-CLIUtils::Messenging">
|
102
|
-
<h1 id="module-CLIUtils::Messenging" class="module">
|
103
|
-
module CLIUtils::Messenging
|
104
|
-
</h1>
|
105
|
-
|
106
|
-
<section class="description">
|
107
|
-
|
108
|
-
<h6 id="module-CLIUtils::Messenging-label-"><span><a href="#module-CLIUtils::Messenging-label-">¶</a> <a href="#documentation">↑</a></span></h6>
|
109
|
-
|
110
|
-
<p>CLIMessenger Module Outputs color-coordinated messages to a CLI</p>
|
111
|
-
|
112
|
-
<h6 id="module-CLIUtils::Messenging-label-"><span><a href="#module-CLIUtils::Messenging-label-">¶</a> <a href="#documentation">↑</a></span></h6>
|
113
|
-
|
114
|
-
</section>
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
<section id="5Buntitled-5D" class="documentation-section">
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
<section id="public-class-5Buntitled-5D-method-details" class="method-section">
|
130
|
-
<header>
|
131
|
-
<h3>Public Class Methods</h3>
|
132
|
-
</header>
|
133
|
-
|
134
|
-
|
135
|
-
<div id="method-c-included" class="method-detail ">
|
136
|
-
|
137
|
-
<div class="method-heading">
|
138
|
-
<span class="method-name">included</span><span
|
139
|
-
class="method-args">(k)</span>
|
140
|
-
|
141
|
-
<span class="method-click-advice">click to toggle source</span>
|
142
|
-
|
143
|
-
</div>
|
144
|
-
|
145
|
-
|
146
|
-
<div class="method-description">
|
147
|
-
|
148
|
-
<h6 id="method-c-included-label-"><span><a href="#method-c-included-label-">¶</a> <a href="#documentation">↑</a></span></h6>
|
149
|
-
|
150
|
-
<p>Methods</p>
|
151
|
-
|
152
|
-
<h6 id="method-c-included-label-"><span><a href="#method-c-included-label-">¶</a> <a href="#documentation">↑</a></span></h6>
|
153
|
-
<hr>
|
154
|
-
|
155
|
-
<p>included method</p>
|
156
|
-
|
157
|
-
<p>Hook called when this module gets mixed in; extends the includer with the
|
158
|
-
methods defined here. @param k The includer @return Void</p>
|
159
|
-
<hr>
|
160
|
-
|
161
|
-
|
162
|
-
|
163
|
-
|
164
|
-
<div class="method-source-code" id="included-source">
|
165
|
-
<pre><span class="ruby-comment"># File lib/cliutils/messenging.rb, line 20</span>
|
166
|
-
<span class="ruby-keyword">def</span> <span class="ruby-keyword">self</span>.<span class="ruby-identifier">included</span>(<span class="ruby-identifier">k</span>)
|
167
|
-
<span class="ruby-identifier">k</span>.<span class="ruby-identifier">extend</span>(<span class="ruby-keyword">self</span>)
|
168
|
-
<span class="ruby-keyword">end</span></pre>
|
169
|
-
</div>
|
170
|
-
|
171
|
-
</div>
|
172
|
-
|
173
|
-
|
174
|
-
|
175
|
-
|
176
|
-
</div>
|
177
|
-
|
178
|
-
|
179
|
-
</section>
|
180
|
-
|
181
|
-
<section id="public-instance-5Buntitled-5D-method-details" class="method-section">
|
182
|
-
<header>
|
183
|
-
<h3>Public Instance Methods</h3>
|
184
|
-
</header>
|
185
|
-
|
186
|
-
|
187
|
-
<div id="method-i-default_instance" class="method-detail ">
|
188
|
-
|
189
|
-
<div class="method-heading">
|
190
|
-
<span class="method-name">default_instance</span><span
|
191
|
-
class="method-args">()</span>
|
192
|
-
|
193
|
-
<span class="method-click-advice">click to toggle source</span>
|
194
|
-
|
195
|
-
</div>
|
196
|
-
|
197
|
-
|
198
|
-
<div class="method-description">
|
199
|
-
|
200
|
-
<hr>
|
201
|
-
|
202
|
-
<p><a href="Messenging.html#method-i-default_instance">#default_instance</a>
|
203
|
-
method</p>
|
204
|
-
|
205
|
-
<p>Returns a default instance of <a
|
206
|
-
href="LoggerDelegator.html">LoggerDelegator</a> that delegates to STDOUT
|
207
|
-
only. @return <a href="LoggerDelegator.html">LoggerDelegator</a></p>
|
208
|
-
<hr>
|
209
|
-
|
210
|
-
|
211
|
-
|
212
|
-
|
213
|
-
<div class="method-source-code" id="default_instance-source">
|
214
|
-
<pre><span class="ruby-comment"># File lib/cliutils/messenging.rb, line 31</span>
|
215
|
-
<span class="ruby-keyword">def</span> <span class="ruby-identifier">default_instance</span>
|
216
|
-
<span class="ruby-identifier">stdout_logger</span> = <span class="ruby-constant">Logger</span>.<span class="ruby-identifier">new</span>(<span class="ruby-constant">STDOUT</span>)
|
217
|
-
<span class="ruby-identifier">stdout_logger</span>.<span class="ruby-identifier">formatter</span> = <span class="ruby-identifier">proc</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">severity</span>, <span class="ruby-identifier">datetime</span>, <span class="ruby-identifier">progname</span>, <span class="ruby-identifier">msg</span><span class="ruby-operator">|</span>
|
218
|
-
<span class="ruby-identifier">send</span>(<span class="ruby-identifier">severity</span>.<span class="ruby-identifier">downcase</span>, <span class="ruby-identifier">msg</span>)
|
219
|
-
<span class="ruby-keyword">end</span>
|
220
|
-
|
221
|
-
<span class="ruby-constant">LoggerDelegator</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">stdout_logger</span>)
|
222
|
-
<span class="ruby-keyword">end</span></pre>
|
223
|
-
</div>
|
224
|
-
|
225
|
-
</div>
|
226
|
-
|
227
|
-
|
228
|
-
|
229
|
-
|
230
|
-
</div>
|
231
|
-
|
232
|
-
|
233
|
-
<div id="method-i-messenger" class="method-detail ">
|
234
|
-
|
235
|
-
<div class="method-heading">
|
236
|
-
<span class="method-name">messenger</span><span
|
237
|
-
class="method-args">()</span>
|
238
|
-
|
239
|
-
<span class="method-click-advice">click to toggle source</span>
|
240
|
-
|
241
|
-
</div>
|
242
|
-
|
243
|
-
|
244
|
-
<div class="method-description">
|
245
|
-
|
246
|
-
<hr>
|
247
|
-
|
248
|
-
<p>messenger method</p>
|
249
|
-
|
250
|
-
<p>Singleton method to return (or initialize, if needed) a <a
|
251
|
-
href="LoggerDelegator.html">LoggerDelegator</a>. @return <a
|
252
|
-
href="LoggerDelegator.html">LoggerDelegator</a></p>
|
253
|
-
<hr>
|
254
|
-
|
255
|
-
|
256
|
-
|
257
|
-
|
258
|
-
<div class="method-source-code" id="messenger-source">
|
259
|
-
<pre><span class="ruby-comment"># File lib/cliutils/messenging.rb, line 47</span>
|
260
|
-
<span class="ruby-keyword">def</span> <span class="ruby-identifier">messenger</span>
|
261
|
-
<span class="ruby-ivar">@messenger</span> <span class="ruby-operator">||=</span> <span class="ruby-identifier">default_instance</span>
|
262
|
-
<span class="ruby-keyword">end</span></pre>
|
263
|
-
</div>
|
264
|
-
|
265
|
-
</div>
|
266
|
-
|
267
|
-
|
268
|
-
|
269
|
-
|
270
|
-
</div>
|
271
|
-
|
272
|
-
|
273
|
-
</section>
|
274
|
-
|
275
|
-
</section>
|
276
|
-
</main>
|
277
|
-
|
278
|
-
|
279
|
-
<footer id="validator-badges" role="contentinfo">
|
280
|
-
<p><a href="http://validator.w3.org/check/referer">Validate</a>
|
281
|
-
<p>Generated by <a href="http://rdoc.rubyforge.org">RDoc</a> 4.1.1.
|
282
|
-
<p>Based on <a href="http://deveiate.org/projects/Darkfish-Rdoc/">Darkfish</a> by <a href="http://deveiate.org">Michael Granger</a>.
|
283
|
-
</footer>
|
284
|
-
|