rumodule 0.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.
data/doc/Rumodule.html ADDED
@@ -0,0 +1,841 @@
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: Rumodule
8
+
9
+ &mdash; Documentation by YARD 0.8.7.6
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#!Rumodule.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 (R)</a> &raquo;
35
+
36
+
37
+ <span class="title">Rumodule</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: Rumodule
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"><span class='object_link'><a href="RumoduleCommon.html" title="RumoduleCommon (class)">RumoduleCommon</a></span></span>
77
+
78
+ <ul class="fullTree">
79
+ <li>Object</li>
80
+
81
+ <li class="next"><span class='object_link'><a href="RumoduleCommon.html" title="RumoduleCommon (class)">RumoduleCommon</a></span></li>
82
+
83
+ <li class="next">Rumodule</li>
84
+
85
+ </ul>
86
+ <a href="#" class="inheritanceTree">show all</a>
87
+
88
+ </dd>
89
+
90
+
91
+
92
+
93
+
94
+
95
+ <dt class="r2">Includes:</dt>
96
+ <dd class="r2"><span class='object_link'><a href="Utility.html" title="Utility (module)">Utility</a></span></dd>
97
+
98
+
99
+
100
+
101
+
102
+ <dt class="r1 last">Defined in:</dt>
103
+ <dd class="r1 last">bin/rumodule</dd>
104
+
105
+ </dl>
106
+ <div class="clear"></div>
107
+
108
+ <h2>Overview</h2><div class="docstring">
109
+ <div class="discussion">
110
+
111
+ <p>Prefined Rumodule commands.</p>
112
+
113
+
114
+ </div>
115
+ </div>
116
+ <div class="tags">
117
+
118
+
119
+ </div><div id="subclasses">
120
+ <h2>Direct Known Subclasses</h2>
121
+ <p class="children"><span class='object_link'><a href="CmdAdd.html" title="CmdAdd (class)">CmdAdd</a></span>, <span class='object_link'><a href="CmdDisplay.html" title="CmdDisplay (class)">CmdDisplay</a></span>, <span class='object_link'><a href="CmdHelp.html" title="CmdHelp (class)">CmdHelp</a></span>, <span class='object_link'><a href="CmdList.html" title="CmdList (class)">CmdList</a></span>, <span class='object_link'><a href="CmdRm.html" title="CmdRm (class)">CmdRm</a></span>, <span class='object_link'><a href="CmdSlist.html" title="CmdSlist (class)">CmdSlist</a></span>, <span class='object_link'><a href="CmdWhich.html" title="CmdWhich (class)">CmdWhich</a></span></p>
122
+ </div>
123
+
124
+ <h2>Constant Summary</h2>
125
+
126
+ <dl class="constants">
127
+
128
+ <dt id="outputlist-classvariable" class="">@@outputlist =
129
+ <div class="docstring">
130
+ <div class="discussion">
131
+
132
+ <p>List of output command lines to shell. Must be separeted with semicolon and
133
+ newline.</p>
134
+
135
+
136
+ </div>
137
+ </div>
138
+ <div class="tags">
139
+
140
+
141
+ </div>
142
+ </dt>
143
+ <dd><pre class="code"><span class='lbracket'>[</span><span class='rbracket'>]</span></pre></dd>
144
+
145
+ <dt id="varcache-classvariable" class="">@@varcache =
146
+ <div class="docstring">
147
+ <div class="discussion">
148
+
149
+ <p>Cache variables from env to Hash. All updated values are visible to
150
+ subsequent commands.</p>
151
+
152
+
153
+ </div>
154
+ </div>
155
+ <div class="tags">
156
+
157
+
158
+ </div>
159
+ </dt>
160
+ <dd><pre class="code"><span class='lbrace'>{</span><span class='rbrace'>}</span></pre></dd>
161
+
162
+ </dl>
163
+
164
+
165
+
166
+
167
+
168
+
169
+ <h3 class="inherited">Constants included
170
+ from <span class='object_link'><a href="Utility.html" title="Utility (module)">Utility</a></span></h3>
171
+ <p class="inherited"><span class='object_link'><a href="Utility.html#LOADED-constant" title="Utility::LOADED (constant)">Utility::LOADED</a></span>, <span class='object_link'><a href="Utility.html#MODULEDIRS-constant" title="Utility::MODULEDIRS (constant)">Utility::MODULEDIRS</a></span>, <span class='object_link'><a href="Utility.html#RUMODULE_PUSH-constant" title="Utility::RUMODULE_PUSH (constant)">Utility::RUMODULE_PUSH</a></span>, <span class='object_link'><a href="Utility.html#SUBLOADED-constant" title="Utility::SUBLOADED (constant)">Utility::SUBLOADED</a></span>, <span class='object_link'><a href="Utility.html#SYSLOADED-constant" title="Utility::SYSLOADED (constant)">Utility::SYSLOADED</a></span></p>
172
+
173
+
174
+
175
+ <h3 class="inherited">Constants inherited
176
+ from <span class='object_link'><a href="RumoduleCommon.html" title="RumoduleCommon (class)">RumoduleCommon</a></span></h3>
177
+ <p class="inherited"><span class='object_link'><a href="RumoduleCommon.html#SHELL-constant" title="RumoduleCommon::SHELL (constant)">RumoduleCommon::SHELL</a></span></p>
178
+
179
+
180
+
181
+
182
+
183
+
184
+ <h2>
185
+ Class Method Summary
186
+ <small>(<a href="#" class="summary_toggle">collapse</a>)</small>
187
+ </h2>
188
+
189
+ <ul class="summary">
190
+
191
+ <li class="public ">
192
+ <span class="summary_signature">
193
+
194
+ <a href="#flush-class_method" title="flush (class method)">+ (Object) <strong>flush</strong> </a>
195
+
196
+
197
+
198
+ </span>
199
+
200
+
201
+
202
+
203
+
204
+
205
+
206
+
207
+
208
+ <span class="summary_desc"><div class='inline'>
209
+ <p>Flush all pending shell output.</p>
210
+ </div></span>
211
+
212
+ </li>
213
+
214
+
215
+ <li class="public ">
216
+ <span class="summary_signature">
217
+
218
+ <a href="#run-class_method" title="run (class method)">+ (Object) <strong>run</strong>(cmd, mods) </a>
219
+
220
+
221
+
222
+ </span>
223
+
224
+
225
+
226
+
227
+
228
+
229
+
230
+
231
+
232
+ <span class="summary_desc"><div class='inline'>
233
+ <p>Map rumodule cmd to internal class method.</p>
234
+ </div></span>
235
+
236
+ </li>
237
+
238
+
239
+ </ul>
240
+
241
+ <h2>
242
+ Instance Method Summary
243
+ <small>(<a href="#" class="summary_toggle">collapse</a>)</small>
244
+ </h2>
245
+
246
+ <ul class="summary">
247
+
248
+ <li class="public ">
249
+ <span class="summary_signature">
250
+
251
+ <a href="#_is_loaded-instance_method" title="#_is_loaded (instance method)">- (Boolean) <strong>_is_loaded</strong>(mod) </a>
252
+
253
+
254
+
255
+ </span>
256
+
257
+
258
+
259
+
260
+
261
+
262
+
263
+
264
+
265
+ <span class="summary_desc"><div class='inline'>
266
+ <p>Is module(s) loaded?.</p>
267
+ </div></span>
268
+
269
+ </li>
270
+
271
+
272
+ <li class="public ">
273
+ <span class="summary_signature">
274
+
275
+ <a href="#_output-instance_method" title="#_output (instance method)">- (Object) <strong>_output</strong>(str) </a>
276
+
277
+
278
+
279
+ </span>
280
+
281
+
282
+
283
+
284
+
285
+
286
+
287
+
288
+
289
+ <span class="summary_desc"><div class='inline'>
290
+ <p>Place str to output buffer (shell output).</p>
291
+ </div></span>
292
+
293
+ </li>
294
+
295
+
296
+ <li class="public ">
297
+ <span class="summary_signature">
298
+
299
+ <a href="#getenvar-instance_method" title="#getenvar (instance method)">- (String) <strong>getenvar</strong>(var, create = false) </a>
300
+
301
+
302
+
303
+ </span>
304
+
305
+
306
+
307
+
308
+
309
+
310
+
311
+
312
+
313
+ <span class="summary_desc"><div class='inline'>
314
+ <p>Fetch env varible from env.</p>
315
+ </div></span>
316
+
317
+ </li>
318
+
319
+
320
+ </ul>
321
+
322
+
323
+
324
+
325
+
326
+
327
+
328
+
329
+
330
+
331
+
332
+ <h3 class="inherited">Methods included from <span class='object_link'><a href="Utility.html" title="Utility (module)">Utility</a></span></h3>
333
+ <p class="inherited"><span class='object_link'><a href="Utility.html#abort-instance_method" title="Utility#abort (method)">#abort</a></span>, <span class='object_link'><a href="Utility.html#all_loaded-instance_method" title="Utility#all_loaded (method)">#all_loaded</a></span>, <span class='object_link'><a href="Utility.html#commonHelp-instance_method" title="Utility#commonHelp (method)">#commonHelp</a></span>, <span class='object_link'><a href="Utility.html#error-instance_method" title="Utility#error (method)">#error</a></span>, <span class='object_link'><a href="Utility.html#findModule-instance_method" title="Utility#findModule (method)">#findModule</a></span>, <span class='object_link'><a href="Utility.html#help-instance_method" title="Utility#help (method)">#help</a></span>, <span class='object_link'><a href="Utility.html#loadModule-instance_method" title="Utility#loadModule (method)">#loadModule</a></span>, <span class='object_link'><a href="Utility.html#loaded-instance_method" title="Utility#loaded (method)">#loaded</a></span>, <span class='object_link'><a href="Utility.html#registerModule-instance_method" title="Utility#registerModule (method)">#registerModule</a></span>, <span class='object_link'><a href="Utility.html#sys_loaded-instance_method" title="Utility#sys_loaded (method)">#sys_loaded</a></span>, <span class='object_link'><a href="Utility.html#unregisterModule-instance_method" title="Utility#unregisterModule (method)">#unregisterModule</a></span>, <span class='object_link'><a href="Utility.html#usage-instance_method" title="Utility#usage (method)">#usage</a></span>, <span class='object_link'><a href="Utility.html#warning-instance_method" title="Utility#warning (method)">#warning</a></span></p>
334
+
335
+
336
+
337
+
338
+
339
+
340
+
341
+
342
+
343
+
344
+
345
+
346
+
347
+
348
+
349
+ <h3 class="inherited">Methods included from <span class='object_link'><a href="RumoduleMod.html" title="RumoduleMod (module)">RumoduleMod</a></span></h3>
350
+ <p class="inherited"><span class='object_link'><a href="RumoduleMod.html#home-instance_method" title="RumoduleMod#home (method)">#home</a></span></p>
351
+
352
+
353
+ <div id="class_method_details" class="method_details_list">
354
+ <h2>Class Method Details</h2>
355
+
356
+
357
+ <div class="method_details first">
358
+ <h3 class="signature first" id="flush-class_method">
359
+
360
+ + (<tt>Object</tt>) <strong>flush</strong>
361
+
362
+
363
+
364
+
365
+
366
+ </h3><div class="docstring">
367
+ <div class="discussion">
368
+
369
+ <p>Flush all pending shell output.</p>
370
+
371
+
372
+ </div>
373
+ </div>
374
+ <div class="tags">
375
+
376
+
377
+ </div><table class="source_code">
378
+ <tr>
379
+ <td>
380
+ <pre class="lines">
381
+
382
+
383
+ 725
384
+ 726
385
+ 727
386
+ 728
387
+ 729
388
+ 730
389
+ 731
390
+ 732
391
+ 733
392
+ 734
393
+ 735
394
+ 736
395
+ 737
396
+ 738</pre>
397
+ </td>
398
+ <td>
399
+ <pre class="code"><span class="info file"># File 'bin/rumodule', line 725</span>
400
+
401
+ <span class='kw'>def</span> <span class='const'>Rumodule</span><span class='period'>.</span><span class='id identifier rubyid_flush'>flush</span>
402
+
403
+ <span class='comment'># Check for changed env varibles and perform update.
404
+ </span> <span class='cvar'>@@varcache</span><span class='period'>.</span><span class='id identifier rubyid_values'>values</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_v'>v</span><span class='op'>|</span>
405
+ <span class='kw'>if</span> <span class='id identifier rubyid_v'>v</span><span class='period'>.</span><span class='id identifier rubyid_dirty'>dirty</span>
406
+ <span class='cvar'>@@outputlist</span><span class='period'>.</span><span class='id identifier rubyid_push'>push</span> <span class='id identifier rubyid_v'>v</span><span class='period'>.</span><span class='id identifier rubyid_export'>export</span>
407
+ <span class='kw'>end</span>
408
+ <span class='kw'>end</span>
409
+
410
+ <span class='comment'># Output updates.
411
+ </span> <span class='kw'>if</span> <span class='cvar'>@@outputlist</span><span class='period'>.</span><span class='id identifier rubyid_length'>length</span> <span class='op'>&gt;</span> <span class='int'>0</span>
412
+ <span class='id identifier rubyid_puts'>puts</span> <span class='cvar'>@@outputlist</span><span class='period'>.</span><span class='id identifier rubyid_join'>join</span><span class='lparen'>(</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>;\n</span><span class='tstring_end'>&quot;</span></span> <span class='rparen'>)</span>
413
+ <span class='kw'>end</span>
414
+ <span class='kw'>end</span></pre>
415
+ </td>
416
+ </tr>
417
+ </table>
418
+ </div>
419
+
420
+ <div class="method_details ">
421
+ <h3 class="signature " id="run-class_method">
422
+
423
+ + (<tt>Object</tt>) <strong>run</strong>(cmd, mods)
424
+
425
+
426
+
427
+
428
+
429
+ </h3><div class="docstring">
430
+ <div class="discussion">
431
+
432
+ <p>Map rumodule cmd to internal class method.</p>
433
+
434
+
435
+ </div>
436
+ </div>
437
+ <div class="tags">
438
+ <p class="tag_title">Parameters:</p>
439
+ <ul class="param">
440
+
441
+ <li>
442
+
443
+ <span class='name'>cmd</span>
444
+
445
+
446
+ <span class='type'>(<tt>String</tt>)</span>
447
+
448
+
449
+
450
+ &mdash;
451
+ <div class='inline'>
452
+ <p>Rumodule user command.</p>
453
+ </div>
454
+
455
+ </li>
456
+
457
+ <li>
458
+
459
+ <span class='name'>mods</span>
460
+
461
+
462
+ <span class='type'>(<tt>Array</tt>)</span>
463
+
464
+
465
+
466
+ &mdash;
467
+ <div class='inline'>
468
+ <p>List of modules.</p>
469
+ </div>
470
+
471
+ </li>
472
+
473
+ </ul>
474
+
475
+
476
+ </div><table class="source_code">
477
+ <tr>
478
+ <td>
479
+ <pre class="lines">
480
+
481
+
482
+ 637
483
+ 638
484
+ 639
485
+ 640
486
+ 641
487
+ 642
488
+ 643
489
+ 644
490
+ 645
491
+ 646
492
+ 647
493
+ 648
494
+ 649
495
+ 650
496
+ 651
497
+ 652
498
+ 653
499
+ 654</pre>
500
+ </td>
501
+ <td>
502
+ <pre class="code"><span class="info file"># File 'bin/rumodule', line 637</span>
503
+
504
+ <span class='kw'>def</span> <span class='const'>Rumodule</span><span class='period'>.</span><span class='id identifier rubyid_run'>run</span><span class='lparen'>(</span> <span class='id identifier rubyid_cmd'>cmd</span><span class='comma'>,</span> <span class='id identifier rubyid_mods'>mods</span> <span class='rparen'>)</span>
505
+
506
+ <span class='comment'># Internal class name.
507
+ </span> <span class='id identifier rubyid_cmdClass'>cmdClass</span> <span class='op'>=</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>Cmd</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_cmd'>cmd</span><span class='period'>.</span><span class='id identifier rubyid_capitalize'>capitalize</span><span class='embexpr_end'>}</span><span class='tstring_end'>&quot;</span></span>
508
+
509
+ <span class='kw'>if</span> <span class='const'>Module</span><span class='period'>.</span><span class='id identifier rubyid_const_defined?'>const_defined?</span><span class='lparen'>(</span> <span class='id identifier rubyid_cmdClass'>cmdClass</span> <span class='rparen'>)</span>
510
+
511
+ <span class='comment'># Create instance of the class.
512
+ </span> <span class='id identifier rubyid_obj'>obj</span> <span class='op'>=</span> <span class='const'>Object</span><span class='op'>::</span><span class='id identifier rubyid_const_get'>const_get</span><span class='lparen'>(</span> <span class='id identifier rubyid_cmdClass'>cmdClass</span> <span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span>
513
+
514
+ <span class='comment'># Execute rumodule method.
515
+ </span> <span class='id identifier rubyid_obj'>obj</span><span class='period'>.</span><span class='id identifier rubyid_action'>action</span><span class='lparen'>(</span> <span class='id identifier rubyid_mods'>mods</span> <span class='rparen'>)</span>
516
+
517
+ <span class='kw'>else</span>
518
+
519
+ <span class='id identifier rubyid_error'>error</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>Unknown command: \&quot;</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_cmd'>cmd</span><span class='embexpr_end'>}</span><span class='tstring_content'>\&quot;!</span><span class='tstring_end'>&quot;</span></span>
520
+ <span class='kw'>end</span>
521
+ <span class='kw'>end</span></pre>
522
+ </td>
523
+ </tr>
524
+ </table>
525
+ </div>
526
+
527
+ </div>
528
+
529
+ <div id="instance_method_details" class="method_details_list">
530
+ <h2>Instance Method Details</h2>
531
+
532
+
533
+ <div class="method_details first">
534
+ <h3 class="signature first" id="_is_loaded-instance_method">
535
+
536
+ - (<tt>Boolean</tt>) <strong>_is_loaded</strong>(mod)
537
+
538
+
539
+
540
+
541
+
542
+ </h3><div class="docstring">
543
+ <div class="discussion">
544
+
545
+ <p>Is module(s) loaded?</p>
546
+
547
+
548
+ </div>
549
+ </div>
550
+ <div class="tags">
551
+ <p class="tag_title">Parameters:</p>
552
+ <ul class="param">
553
+
554
+ <li>
555
+
556
+ <span class='name'>mod</span>
557
+
558
+
559
+ <span class='type'>(<tt>String</tt>)</span>
560
+
561
+
562
+
563
+ &mdash;
564
+ <div class='inline'>
565
+ <p>Module name.</p>
566
+ </div>
567
+
568
+ </li>
569
+
570
+ </ul>
571
+
572
+ <p class="tag_title">Returns:</p>
573
+ <ul class="return">
574
+
575
+ <li>
576
+
577
+
578
+ <span class='type'>(<tt>Boolean</tt>)</span>
579
+
580
+
581
+
582
+ &mdash;
583
+ <div class='inline'>
584
+ <p>True if loaded.</p>
585
+ </div>
586
+
587
+ </li>
588
+
589
+ </ul>
590
+
591
+ </div><table class="source_code">
592
+ <tr>
593
+ <td>
594
+ <pre class="lines">
595
+
596
+
597
+ 703
598
+ 704
599
+ 705
600
+ 706
601
+ 707
602
+ 708
603
+ 709
604
+ 710
605
+ 711
606
+ 712
607
+ 713</pre>
608
+ </td>
609
+ <td>
610
+ <pre class="code"><span class="info file"># File 'bin/rumodule', line 703</span>
611
+
612
+ <span class='kw'>def</span> <span class='id identifier rubyid__is_loaded'>_is_loaded</span><span class='lparen'>(</span> <span class='id identifier rubyid_mod'>mod</span> <span class='rparen'>)</span>
613
+ <span class='id identifier rubyid_mod'>mod</span> <span class='op'>=</span> <span class='lbracket'>[</span> <span class='id identifier rubyid_mod'>mod</span> <span class='rbracket'>]</span> <span class='kw'>if</span> <span class='id identifier rubyid_mod'>mod</span><span class='period'>.</span><span class='id identifier rubyid_class'>class</span> <span class='op'>!=</span> <span class='const'>Array</span>
614
+
615
+ <span class='id identifier rubyid_mod'>mod</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_i'>i</span><span class='op'>|</span>
616
+ <span class='kw'>if</span> <span class='id identifier rubyid_all_loaded'>all_loaded</span><span class='period'>.</span><span class='id identifier rubyid_index'>index</span><span class='lparen'>(</span> <span class='id identifier rubyid_i'>i</span> <span class='rparen'>)</span>
617
+ <span class='kw'>return</span> <span class='kw'>true</span>
618
+ <span class='kw'>end</span>
619
+ <span class='kw'>end</span>
620
+
621
+ <span class='kw'>false</span>
622
+ <span class='kw'>end</span></pre>
623
+ </td>
624
+ </tr>
625
+ </table>
626
+ </div>
627
+
628
+ <div class="method_details ">
629
+ <h3 class="signature " id="_output-instance_method">
630
+
631
+ - (<tt>Object</tt>) <strong>_output</strong>(str)
632
+
633
+
634
+
635
+
636
+
637
+ </h3><div class="docstring">
638
+ <div class="discussion">
639
+
640
+ <p>Place str to output buffer (shell output).</p>
641
+
642
+
643
+ </div>
644
+ </div>
645
+ <div class="tags">
646
+ <p class="tag_title">Parameters:</p>
647
+ <ul class="param">
648
+
649
+ <li>
650
+
651
+ <span class='name'>str</span>
652
+
653
+
654
+ <span class='type'>(<tt>String</tt>)</span>
655
+
656
+
657
+
658
+ &mdash;
659
+ <div class='inline'>
660
+ <p>String for output.</p>
661
+ </div>
662
+
663
+ </li>
664
+
665
+ </ul>
666
+
667
+
668
+ </div><table class="source_code">
669
+ <tr>
670
+ <td>
671
+ <pre class="lines">
672
+
673
+
674
+ 719
675
+ 720
676
+ 721</pre>
677
+ </td>
678
+ <td>
679
+ <pre class="code"><span class="info file"># File 'bin/rumodule', line 719</span>
680
+
681
+ <span class='kw'>def</span> <span class='id identifier rubyid__output'>_output</span><span class='lparen'>(</span> <span class='id identifier rubyid_str'>str</span> <span class='rparen'>)</span>
682
+ <span class='cvar'>@@outputlist</span><span class='period'>.</span><span class='id identifier rubyid_push'>push</span> <span class='id identifier rubyid_str'>str</span>
683
+ <span class='kw'>end</span></pre>
684
+ </td>
685
+ </tr>
686
+ </table>
687
+ </div>
688
+
689
+ <div class="method_details ">
690
+ <h3 class="signature " id="getenvar-instance_method">
691
+
692
+ - (<tt>String</tt>) <strong>getenvar</strong>(var, create = false)
693
+
694
+
695
+
696
+
697
+
698
+ </h3><div class="docstring">
699
+ <div class="discussion">
700
+
701
+ <p>Fetch env varible from env. Conditionally create the env var.</p>
702
+
703
+
704
+ </div>
705
+ </div>
706
+ <div class="tags">
707
+ <p class="tag_title">Parameters:</p>
708
+ <ul class="param">
709
+
710
+ <li>
711
+
712
+ <span class='name'>var</span>
713
+
714
+
715
+ <span class='type'>(<tt>String</tt>)</span>
716
+
717
+
718
+
719
+ &mdash;
720
+ <div class='inline'>
721
+ <p>Env var name.</p>
722
+ </div>
723
+
724
+ </li>
725
+
726
+ <li>
727
+
728
+ <span class='name'>create</span>
729
+
730
+
731
+ <span class='type'>(<tt>Boolean</tt>)</span>
732
+
733
+
734
+ <em class="default">(defaults to: <tt>false</tt>)</em>
735
+
736
+
737
+ &mdash;
738
+ <div class='inline'>
739
+ <p>Create if not existing.</p>
740
+ </div>
741
+
742
+ </li>
743
+
744
+ </ul>
745
+
746
+ <p class="tag_title">Returns:</p>
747
+ <ul class="return">
748
+
749
+ <li>
750
+
751
+
752
+ <span class='type'>(<tt>String</tt>)</span>
753
+
754
+
755
+
756
+ &mdash;
757
+ <div class='inline'>
758
+ <p>Env var value.</p>
759
+ </div>
760
+
761
+ </li>
762
+
763
+ </ul>
764
+
765
+ </div><table class="source_code">
766
+ <tr>
767
+ <td>
768
+ <pre class="lines">
769
+
770
+
771
+ 672
772
+ 673
773
+ 674
774
+ 675
775
+ 676
776
+ 677
777
+ 678
778
+ 679
779
+ 680
780
+ 681
781
+ 682
782
+ 683
783
+ 684
784
+ 685
785
+ 686
786
+ 687
787
+ 688
788
+ 689
789
+ 690
790
+ 691
791
+ 692
792
+ 693
793
+ 694
794
+ 695
795
+ 696</pre>
796
+ </td>
797
+ <td>
798
+ <pre class="code"><span class="info file"># File 'bin/rumodule', line 672</span>
799
+
800
+ <span class='kw'>def</span> <span class='id identifier rubyid_getenvar'>getenvar</span><span class='lparen'>(</span> <span class='id identifier rubyid_var'>var</span><span class='comma'>,</span> <span class='id identifier rubyid_create'>create</span> <span class='op'>=</span> <span class='kw'>false</span> <span class='rparen'>)</span>
801
+
802
+ <span class='kw'>if</span> <span class='cvar'>@@varcache</span><span class='lbracket'>[</span> <span class='id identifier rubyid_var'>var</span> <span class='rbracket'>]</span>
803
+ <span class='comment'># In cache.
804
+ </span> <span class='cvar'>@@varcache</span><span class='lbracket'>[</span> <span class='id identifier rubyid_var'>var</span> <span class='rbracket'>]</span>
805
+ <span class='kw'>else</span>
806
+
807
+ <span class='comment'># Not in cache.
808
+ </span> <span class='kw'>if</span> <span class='const'>ENV</span><span class='lbracket'>[</span> <span class='id identifier rubyid_var'>var</span> <span class='rbracket'>]</span>
809
+
810
+ <span class='comment'># In env.
811
+ </span> <span class='id identifier rubyid_v'>v</span> <span class='op'>=</span> <span class='const'>EnvVar</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span> <span class='id identifier rubyid_var'>var</span> <span class='rparen'>)</span>
812
+ <span class='cvar'>@@varcache</span><span class='lbracket'>[</span> <span class='id identifier rubyid_var'>var</span> <span class='rbracket'>]</span> <span class='op'>=</span> <span class='id identifier rubyid_v'>v</span>
813
+
814
+ <span class='kw'>elsif</span> <span class='id identifier rubyid_create'>create</span>
815
+
816
+ <span class='comment'># Create as new.
817
+ </span> <span class='id identifier rubyid_v'>v</span> <span class='op'>=</span> <span class='const'>EnvVar</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span> <span class='id identifier rubyid_var'>var</span><span class='comma'>,</span> <span class='lbracket'>[</span><span class='rbracket'>]</span> <span class='rparen'>)</span>
818
+ <span class='cvar'>@@varcache</span><span class='lbracket'>[</span> <span class='id identifier rubyid_var'>var</span> <span class='rbracket'>]</span> <span class='op'>=</span> <span class='id identifier rubyid_v'>v</span>
819
+
820
+ <span class='kw'>else</span>
821
+ <span class='kw'>nil</span>
822
+ <span class='kw'>end</span>
823
+ <span class='kw'>end</span>
824
+ <span class='kw'>end</span></pre>
825
+ </td>
826
+ </tr>
827
+ </table>
828
+ </div>
829
+
830
+ </div>
831
+
832
+ </div>
833
+
834
+ <div id="footer">
835
+ Generated on Sat Mar 19 10:38:05 2016 by
836
+ <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
837
+ 0.8.7.6 (ruby-2.1.2).
838
+ </div>
839
+
840
+ </body>
841
+ </html>