bovem 3.0.5 → 4.0.0
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.
- checksums.yaml +4 -4
- data/.gitignore +4 -3
- data/.rubocop.yml +82 -0
- data/.travis-gemfile +4 -5
- data/.travis.yml +8 -6
- data/CHANGELOG.md +12 -0
- data/Gemfile +9 -8
- data/README.md +1 -1
- data/Rakefile +22 -6
- data/bovem.gemspec +5 -5
- data/doc/Bovem.html +10 -10
- data/doc/Bovem/Application.html +670 -318
- data/doc/Bovem/Command.html +1447 -1125
- data/doc/Bovem/CommandMethods.html +4 -4
- data/doc/Bovem/CommandMethods/Children.html +173 -179
- data/doc/Bovem/CommandMethods/Help.html +9 -9
- data/doc/Bovem/Configuration.html +239 -24
- data/doc/Bovem/Console.html +267 -128
- data/doc/Bovem/ConsoleMethods.html +4 -4
- data/doc/Bovem/ConsoleMethods/Interactions.html +57 -70
- data/doc/Bovem/ConsoleMethods/Interactions/ClassMethods.html +9 -9
- data/doc/Bovem/ConsoleMethods/Logging.html +258 -298
- data/doc/Bovem/ConsoleMethods/Logging/ClassMethods.html +8 -8
- data/doc/Bovem/ConsoleMethods/Output.html +96 -118
- data/doc/Bovem/ConsoleMethods/StyleHandling.html +8 -8
- data/doc/Bovem/ConsoleMethods/StyleHandling/ClassMethods.html +26 -39
- data/doc/Bovem/Errors.html +4 -4
- data/doc/Bovem/Errors/Error.html +4 -4
- data/doc/Bovem/Errors/InvalidConfiguration.html +4 -4
- data/doc/Bovem/Errors/InvalidLogger.html +4 -4
- data/doc/Bovem/I18n.html +175 -0
- data/doc/Bovem/Logger.html +95 -83
- data/doc/Bovem/Option.html +669 -862
- data/doc/Bovem/Parser.html +10 -10
- data/doc/Bovem/ParserMethods.html +4 -4
- data/doc/Bovem/ParserMethods/General.html +4 -4
- data/doc/Bovem/ParserMethods/General/ClassMethods.html +26 -38
- data/doc/Bovem/Shell.html +169 -48
- data/doc/Bovem/ShellMethods.html +4 -4
- data/doc/Bovem/ShellMethods/Directories.html +46 -62
- data/doc/Bovem/ShellMethods/Execute.html +51 -99
- data/doc/Bovem/ShellMethods/General.html +4 -445
- data/doc/Bovem/ShellMethods/Read.html +56 -61
- data/doc/Bovem/ShellMethods/Write.html +22 -242
- data/doc/Bovem/Version.html +6 -6
- data/doc/_index.html +18 -18
- data/doc/class_list.html +6 -2
- data/doc/css/style.css +1 -0
- data/doc/file.README.html +5 -5
- data/doc/file_list.html +5 -1
- data/doc/frames.html +1 -1
- data/doc/index.html +5 -5
- data/doc/js/full_list.js +4 -1
- data/doc/method_list.html +161 -157
- data/doc/top-level-namespace.html +4 -4
- data/lib/bovem.rb +3 -4
- data/lib/bovem/application.rb +47 -39
- data/lib/bovem/command.rb +175 -193
- data/lib/bovem/configuration.rb +28 -29
- data/lib/bovem/console.rb +244 -171
- data/lib/bovem/errors.rb +1 -1
- data/lib/bovem/i18n.rb +18 -0
- data/lib/bovem/logger.rb +26 -26
- data/lib/bovem/option.rb +49 -58
- data/lib/bovem/parser.rb +174 -222
- data/lib/bovem/shell.rb +272 -320
- data/lib/bovem/version.rb +2 -2
- data/locales/en.yml +39 -38
- data/locales/it.yml +39 -38
- data/spec/bovem/application_spec.rb +6 -5
- data/spec/bovem/command_spec.rb +23 -23
- data/spec/bovem/console_spec.rb +101 -102
- data/spec/bovem/i18n_spec.rb +21 -0
- data/spec/bovem/logger_spec.rb +4 -4
- data/spec/bovem/option_spec.rb +43 -43
- data/spec/bovem/parser_spec.rb +13 -13
- data/spec/bovem/shell_spec.rb +106 -115
- data/spec/spec_helper.rb +19 -6
- metadata +14 -13
- data/doc/Bovem/Localizer.html +0 -376
- data/lib/bovem/localizer.rb +0 -27
- data/spec/coverage_helper.rb +0 -20
@@ -6,7 +6,7 @@
|
|
6
6
|
<title>
|
7
7
|
Module: Bovem::ConsoleMethods
|
8
8
|
|
9
|
-
— Documentation by YARD 0.8.7.
|
9
|
+
— Documentation by YARD 0.8.7.6
|
10
10
|
|
11
11
|
</title>
|
12
12
|
|
@@ -17,7 +17,7 @@
|
|
17
17
|
<script type="text/javascript" charset="utf-8">
|
18
18
|
hasFrames = window.top.frames.main ? true : false;
|
19
19
|
relpath = '../';
|
20
|
-
framesUrl = "../frames.html#!"
|
20
|
+
framesUrl = "../frames.html#!Bovem/ConsoleMethods.html";
|
21
21
|
</script>
|
22
22
|
|
23
23
|
|
@@ -116,9 +116,9 @@
|
|
116
116
|
</div>
|
117
117
|
|
118
118
|
<div id="footer">
|
119
|
-
Generated on
|
119
|
+
Generated on Tue Mar 29 20:43:16 2016 by
|
120
120
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
121
|
-
0.8.7.
|
121
|
+
0.8.7.6 (ruby-2.3.0).
|
122
122
|
</div>
|
123
123
|
|
124
124
|
</body>
|
@@ -6,7 +6,7 @@
|
|
6
6
|
<title>
|
7
7
|
Module: Bovem::ConsoleMethods::Interactions
|
8
8
|
|
9
|
-
— Documentation by YARD 0.8.7.
|
9
|
+
— Documentation by YARD 0.8.7.6
|
10
10
|
|
11
11
|
</title>
|
12
12
|
|
@@ -17,7 +17,7 @@
|
|
17
17
|
<script type="text/javascript" charset="utf-8">
|
18
18
|
hasFrames = window.top.frames.main ? true : false;
|
19
19
|
relpath = '../../';
|
20
|
-
framesUrl = "../../frames.html#!"
|
20
|
+
framesUrl = "../../frames.html#!Bovem/ConsoleMethods/Interactions.html";
|
21
21
|
</script>
|
22
22
|
|
23
23
|
|
@@ -130,7 +130,7 @@
|
|
130
130
|
<li class="public ">
|
131
131
|
<span class="summary_signature">
|
132
132
|
|
133
|
-
<a href="#read-instance_method" title="#read (instance method)">- (Object) <strong>read</strong>(prompt
|
133
|
+
<a href="#read-instance_method" title="#read (instance method)">- (Object) <strong>read</strong>(prompt: true, default_value: nil, validator: nil, echo: true) </a>
|
134
134
|
|
135
135
|
|
136
136
|
|
@@ -153,7 +153,7 @@
|
|
153
153
|
<li class="public ">
|
154
154
|
<span class="summary_signature">
|
155
155
|
|
156
|
-
<a href="#task-instance_method" title="#task (instance method)">- (Symbol) <strong>task</strong>(message = nil, suffix
|
156
|
+
<a href="#task-instance_method" title="#task (instance method)">- (Symbol) <strong>task</strong>(message = nil, suffix: "\n", indented: true, wrap: false, plain: false, indented_banner: false, full_colored: false, block_indentation: 2, block_indentation_absolute: false) </a>
|
157
157
|
|
158
158
|
|
159
159
|
|
@@ -186,7 +186,7 @@
|
|
186
186
|
<div class="method_details first">
|
187
187
|
<h3 class="signature first" id="read-instance_method">
|
188
188
|
|
189
|
-
- (<tt>Object</tt>) <strong>read</strong>(prompt
|
189
|
+
- (<tt>Object</tt>) <strong>read</strong>(prompt: true, default_value: nil, validator: nil, echo: true)
|
190
190
|
|
191
191
|
|
192
192
|
|
@@ -211,8 +211,6 @@
|
|
211
211
|
<span class='type'>(<tt>String|Boolean</tt>)</span>
|
212
212
|
|
213
213
|
|
214
|
-
<em class="default">(defaults to: <tt>true</tt>)</em>
|
215
|
-
|
216
214
|
|
217
215
|
—
|
218
216
|
<div class='inline'><p>A prompt to show. If <code>true</code>, <code>Please insert a value:</code> will be used, if <code>nil</code> or <code>false</code> no prompt will be shown.</p>
|
@@ -228,8 +226,6 @@
|
|
228
226
|
<span class='type'>(<tt>String</tt>)</span>
|
229
227
|
|
230
228
|
|
231
|
-
<em class="default">(defaults to: <tt>nil</tt>)</em>
|
232
|
-
|
233
229
|
|
234
230
|
—
|
235
231
|
<div class='inline'><p>Default value if user simply pressed the enter key.</p>
|
@@ -245,8 +241,6 @@
|
|
245
241
|
<span class='type'>(<tt>Array|Regexp</tt>)</span>
|
246
242
|
|
247
243
|
|
248
|
-
<em class="default">(defaults to: <tt>nil</tt>)</em>
|
249
|
-
|
250
244
|
|
251
245
|
—
|
252
246
|
<div class='inline'><p>An array of values or a Regexp to match the submitted value against.</p>
|
@@ -262,8 +256,6 @@
|
|
262
256
|
<span class='type'>(<tt>Boolean</tt>)</span>
|
263
257
|
|
264
258
|
|
265
|
-
<em class="default">(defaults to: <tt>true</tt>)</em>
|
266
|
-
|
267
259
|
|
268
260
|
—
|
269
261
|
<div class='inline'><p>If to show submitted text to the user. <strong>Not supported and thus ignored on Rubinius.</strong></p>
|
@@ -280,32 +272,32 @@
|
|
280
272
|
<pre class="lines">
|
281
273
|
|
282
274
|
|
283
|
-
|
284
|
-
|
285
|
-
|
286
|
-
|
287
|
-
|
288
|
-
|
289
|
-
|
290
|
-
|
291
|
-
|
292
|
-
|
293
|
-
|
294
|
-
|
295
|
-
|
296
|
-
|
297
|
-
|
275
|
+
563
|
276
|
+
564
|
277
|
+
565
|
278
|
+
566
|
279
|
+
567
|
280
|
+
568
|
281
|
+
569
|
282
|
+
570
|
283
|
+
571
|
284
|
+
572
|
285
|
+
573
|
286
|
+
574
|
287
|
+
575
|
288
|
+
576
|
289
|
+
577</pre>
|
298
290
|
</td>
|
299
291
|
<td>
|
300
|
-
<pre class="code"><span class="info file"># File 'lib/bovem/console.rb', line
|
292
|
+
<pre class="code"><span class="info file"># File 'lib/bovem/console.rb', line 563</span>
|
301
293
|
|
302
|
-
<span class='kw'>def</span> <span class='id identifier rubyid_read'>read</span><span class='lparen'>(</span><span class='
|
294
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_read'>read</span><span class='lparen'>(</span><span class='label'>prompt:</span> <span class='kw'>true</span><span class='comma'>,</span> <span class='label'>default_value:</span> <span class='kw'>nil</span><span class='comma'>,</span> <span class='label'>validator:</span> <span class='kw'>nil</span><span class='comma'>,</span> <span class='label'>echo:</span> <span class='kw'>true</span><span class='rparen'>)</span>
|
303
295
|
<span class='id identifier rubyid_prompt'>prompt</span> <span class='op'>=</span> <span class='id identifier rubyid_sanitize_prompt'>sanitize_prompt</span><span class='lparen'>(</span><span class='id identifier rubyid_prompt'>prompt</span><span class='rparen'>)</span>
|
304
296
|
<span class='id identifier rubyid_validator'>validator</span> <span class='op'>=</span> <span class='id identifier rubyid_sanitize_validator'>sanitize_validator</span><span class='lparen'>(</span><span class='id identifier rubyid_validator'>validator</span><span class='rparen'>)</span>
|
305
297
|
|
306
298
|
<span class='kw'>begin</span>
|
307
299
|
<span class='id identifier rubyid_catch'>catch</span><span class='lparen'>(</span><span class='symbol'>:reply</span><span class='rparen'>)</span> <span class='kw'>do</span>
|
308
|
-
<span class='
|
300
|
+
<span class='id identifier rubyid_loop'>loop</span> <span class='kw'>do</span>
|
309
301
|
<span class='id identifier rubyid_reply'>reply</span> <span class='op'>=</span> <span class='id identifier rubyid_validate_input_value'>validate_input_value</span><span class='lparen'>(</span><span class='id identifier rubyid_read_input_value'>read_input_value</span><span class='lparen'>(</span><span class='id identifier rubyid_prompt'>prompt</span><span class='comma'>,</span> <span class='id identifier rubyid_echo'>echo</span><span class='comma'>,</span> <span class='id identifier rubyid_default_value'>default_value</span><span class='rparen'>)</span><span class='comma'>,</span> <span class='id identifier rubyid_validator'>validator</span><span class='rparen'>)</span>
|
310
302
|
<span class='id identifier rubyid_handle_reply'>handle_reply</span><span class='lparen'>(</span><span class='id identifier rubyid_reply'>reply</span><span class='rparen'>)</span>
|
311
303
|
<span class='kw'>end</span>
|
@@ -322,7 +314,7 @@
|
|
322
314
|
<div class="method_details ">
|
323
315
|
<h3 class="signature " id="task-instance_method">
|
324
316
|
|
325
|
-
- (<tt>Symbol</tt>) <strong>task</strong>(message = nil, suffix
|
317
|
+
- (<tt>Symbol</tt>) <strong>task</strong>(message = nil, suffix: "\n", indented: true, wrap: false, plain: false, indented_banner: false, full_colored: false, block_indentation: 2, block_indentation_absolute: false)
|
326
318
|
|
327
319
|
|
328
320
|
|
@@ -364,8 +356,6 @@
|
|
364
356
|
<span class='type'>(<tt>Object</tt>)</span>
|
365
357
|
|
366
358
|
|
367
|
-
<em class="default">(defaults to: <tt>"\n"</tt>)</em>
|
368
|
-
|
369
359
|
|
370
360
|
—
|
371
361
|
<div class='inline'><p>If not <code>nil</code> or <code>false</code>, a suffix to add to the message. <code>true</code> means to add <code>\n</code>.</p>
|
@@ -375,17 +365,16 @@
|
|
375
365
|
|
376
366
|
<li>
|
377
367
|
|
378
|
-
<span class='name'>
|
368
|
+
<span class='name'>indented</span>
|
379
369
|
|
380
370
|
|
381
371
|
<span class='type'>(<tt>Object</tt>)</span>
|
382
372
|
|
383
373
|
|
384
|
-
<em class="default">(defaults to: <tt>true</tt>)</em>
|
385
|
-
|
386
374
|
|
387
375
|
—
|
388
|
-
<div class='inline'><p>If not <code>nil</code> or <code>false</code>, the width to use for indentation. <code>true</code> means to use the current indentation,
|
376
|
+
<div class='inline'><p>If not <code>nil</code> or <code>false</code>, the width to use for indentation. <code>true</code> means to use the current indentation,
|
377
|
+
a negative value of <code>-x</code> will indent of <code>x</code> absolute spaces.</p>
|
389
378
|
</div>
|
390
379
|
|
391
380
|
</li>
|
@@ -398,8 +387,6 @@
|
|
398
387
|
<span class='type'>(<tt>Object</tt>)</span>
|
399
388
|
|
400
389
|
|
401
|
-
<em class="default">(defaults to: <tt>false</tt>)</em>
|
402
|
-
|
403
390
|
|
404
391
|
—
|
405
392
|
<div class='inline'><p>If not <code>nil</code> or <code>false</code>, the maximum length of a line for wrapped text. <code>true</code> means the current line width.</p>
|
@@ -415,8 +402,6 @@
|
|
415
402
|
<span class='type'>(<tt>Boolean</tt>)</span>
|
416
403
|
|
417
404
|
|
418
|
-
<em class="default">(defaults to: <tt>false</tt>)</em>
|
419
|
-
|
420
405
|
|
421
406
|
—
|
422
407
|
<div class='inline'><p>If ignore color markers into the message.</p>
|
@@ -432,8 +417,6 @@
|
|
432
417
|
<span class='type'>(<tt>Boolean</tt>)</span>
|
433
418
|
|
434
419
|
|
435
|
-
<em class="default">(defaults to: <tt>false</tt>)</em>
|
436
|
-
|
437
420
|
|
438
421
|
—
|
439
422
|
<div class='inline'><p>If also the banner should be indented.</p>
|
@@ -449,8 +432,6 @@
|
|
449
432
|
<span class='type'>(<tt>Boolean</tt>)</span>
|
450
433
|
|
451
434
|
|
452
|
-
<em class="default">(defaults to: <tt>false</tt>)</em>
|
453
|
-
|
454
435
|
|
455
436
|
—
|
456
437
|
<div class='inline'><p>If the banner should be fully colored.</p>
|
@@ -466,8 +447,6 @@
|
|
466
447
|
<span class='type'>(<tt>Fixnum</tt>)</span>
|
467
448
|
|
468
449
|
|
469
|
-
<em class="default">(defaults to: <tt>2</tt>)</em>
|
470
|
-
|
471
450
|
|
472
451
|
—
|
473
452
|
<div class='inline'><p>The new width for the indented region.</p>
|
@@ -483,8 +462,6 @@
|
|
483
462
|
<span class='type'>(<tt>Boolean</tt>)</span>
|
484
463
|
|
485
464
|
|
486
|
-
<em class="default">(defaults to: <tt>false</tt>)</em>
|
487
|
-
|
488
465
|
|
489
466
|
—
|
490
467
|
<div class='inline'><p>If the new width should not be added to the current one but rather replace it.</p>
|
@@ -518,33 +495,43 @@
|
|
518
495
|
<pre class="lines">
|
519
496
|
|
520
497
|
|
521
|
-
|
522
|
-
|
523
|
-
|
524
|
-
|
525
|
-
|
526
|
-
|
527
|
-
|
528
|
-
|
529
|
-
|
530
|
-
|
531
|
-
|
532
|
-
|
533
|
-
|
498
|
+
592
|
499
|
+
593
|
500
|
+
594
|
501
|
+
595
|
502
|
+
596
|
503
|
+
597
|
504
|
+
598
|
505
|
+
599
|
506
|
+
600
|
507
|
+
601
|
508
|
+
602
|
509
|
+
603
|
510
|
+
604
|
511
|
+
605
|
512
|
+
606
|
513
|
+
607
|
514
|
+
608
|
515
|
+
609</pre>
|
534
516
|
</td>
|
535
517
|
<td>
|
536
|
-
<pre class="code"><span class="info file"># File 'lib/bovem/console.rb', line
|
518
|
+
<pre class="code"><span class="info file"># File 'lib/bovem/console.rb', line 592</span>
|
537
519
|
|
538
|
-
<span class='kw'>def</span> <span class='id identifier rubyid_task'>task</span><span class='lparen'>(</span
|
520
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_task'>task</span><span class='lparen'>(</span>
|
521
|
+
<span class='id identifier rubyid_message'>message</span> <span class='op'>=</span> <span class='kw'>nil</span><span class='comma'>,</span> <span class='label'>suffix:</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>\n</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='label'>indented:</span> <span class='kw'>true</span><span class='comma'>,</span> <span class='label'>wrap:</span> <span class='kw'>false</span><span class='comma'>,</span> <span class='label'>plain:</span> <span class='kw'>false</span><span class='comma'>,</span> <span class='label'>indented_banner:</span> <span class='kw'>false</span><span class='comma'>,</span>
|
522
|
+
<span class='label'>full_colored:</span> <span class='kw'>false</span><span class='comma'>,</span> <span class='label'>block_indentation:</span> <span class='int'>2</span><span class='comma'>,</span> <span class='label'>block_indentation_absolute:</span> <span class='kw'>false</span>
|
523
|
+
<span class='rparen'>)</span>
|
539
524
|
<span class='id identifier rubyid_status'>status</span> <span class='op'>=</span> <span class='kw'>nil</span>
|
540
525
|
|
541
|
-
<span class='kw'>
|
526
|
+
<span class='kw'>if</span> <span class='id identifier rubyid_message'>message</span><span class='period'>.</span><span class='id identifier rubyid_present?'>present?</span>
|
527
|
+
<span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_begin'>begin</span><span class='lparen'>(</span><span class='id identifier rubyid_message'>message</span><span class='comma'>,</span> <span class='label'>suffix:</span> <span class='id identifier rubyid_suffix'>suffix</span><span class='comma'>,</span> <span class='label'>indented:</span> <span class='id identifier rubyid_indented'>indented</span><span class='comma'>,</span> <span class='label'>wrap:</span> <span class='id identifier rubyid_wrap'>wrap</span><span class='comma'>,</span> <span class='label'>plain:</span> <span class='id identifier rubyid_plain'>plain</span><span class='comma'>,</span> <span class='label'>indented_banner:</span> <span class='id identifier rubyid_indented_banner'>indented_banner</span><span class='comma'>,</span> <span class='label'>full_colored:</span> <span class='id identifier rubyid_full_colored'>full_colored</span><span class='rparen'>)</span>
|
528
|
+
<span class='kw'>end</span>
|
529
|
+
|
542
530
|
<span class='id identifier rubyid_with_indentation'>with_indentation</span><span class='lparen'>(</span><span class='id identifier rubyid_block_indentation'>block_indentation</span><span class='comma'>,</span> <span class='id identifier rubyid_block_indentation_absolute'>block_indentation_absolute</span><span class='rparen'>)</span> <span class='kw'>do</span>
|
543
531
|
<span class='id identifier rubyid_rv'>rv</span> <span class='op'>=</span> <span class='id identifier rubyid_block_given?'>block_given?</span> <span class='op'>?</span> <span class='kw'>yield</span><span class='period'>.</span><span class='id identifier rubyid_ensure_array'>ensure_array</span> <span class='op'>:</span> <span class='lbracket'>[</span><span class='symbol'>:ok</span><span class='rbracket'>]</span> <span class='comment'># Execute block
|
544
532
|
</span> <span class='id identifier rubyid_exit_task'>exit_task</span><span class='lparen'>(</span><span class='id identifier rubyid_message'>message</span><span class='comma'>,</span> <span class='id identifier rubyid_rv'>rv</span><span class='comma'>,</span> <span class='id identifier rubyid_plain'>plain</span><span class='rparen'>)</span> <span class='comment'># Handle task exit
|
545
533
|
</span> <span class='id identifier rubyid_status'>status</span> <span class='op'>=</span> <span class='id identifier rubyid_rv'>rv</span><span class='lbracket'>[</span><span class='int'>0</span><span class='rbracket'>]</span> <span class='comment'># Return value
|
546
|
-
</span>
|
547
|
-
<span class='kw'>end</span>
|
534
|
+
</span> <span class='kw'>end</span>
|
548
535
|
|
549
536
|
<span class='id identifier rubyid_status'>status</span>
|
550
537
|
<span class='kw'>end</span></pre>
|
@@ -558,9 +545,9 @@
|
|
558
545
|
</div>
|
559
546
|
|
560
547
|
<div id="footer">
|
561
|
-
Generated on
|
548
|
+
Generated on Tue Mar 29 20:43:17 2016 by
|
562
549
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
563
|
-
0.8.7.
|
550
|
+
0.8.7.6 (ruby-2.3.0).
|
564
551
|
</div>
|
565
552
|
|
566
553
|
</body>
|
@@ -6,7 +6,7 @@
|
|
6
6
|
<title>
|
7
7
|
Module: Bovem::ConsoleMethods::Interactions::ClassMethods
|
8
8
|
|
9
|
-
— Documentation by YARD 0.8.7.
|
9
|
+
— Documentation by YARD 0.8.7.6
|
10
10
|
|
11
11
|
</title>
|
12
12
|
|
@@ -17,7 +17,7 @@
|
|
17
17
|
<script type="text/javascript" charset="utf-8">
|
18
18
|
hasFrames = window.top.frames.main ? true : false;
|
19
19
|
relpath = '../../../';
|
20
|
-
framesUrl = "../../../frames.html#!"
|
20
|
+
framesUrl = "../../../frames.html#!Bovem/ConsoleMethods/Interactions/ClassMethods.html";
|
21
21
|
</script>
|
22
22
|
|
23
23
|
|
@@ -202,15 +202,15 @@
|
|
202
202
|
<pre class="lines">
|
203
203
|
|
204
204
|
|
205
|
-
|
206
|
-
|
207
|
-
|
205
|
+
552
|
206
|
+
553
|
207
|
+
554</pre>
|
208
208
|
</td>
|
209
209
|
<td>
|
210
|
-
<pre class="code"><span class="info file"># File 'lib/bovem/console.rb', line
|
210
|
+
<pre class="code"><span class="info file"># File 'lib/bovem/console.rb', line 552</span>
|
211
211
|
|
212
212
|
<span class='kw'>def</span> <span class='id identifier rubyid_execute'>execute</span><span class='lparen'>(</span><span class='id identifier rubyid_command'>command</span><span class='rparen'>)</span>
|
213
|
-
<span class='backtick'
|
213
|
+
<span class='backtick'>`</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_command'>command</span><span class='embexpr_end'>}</span><span class='tstring_end'>`</span></span>
|
214
214
|
<span class='kw'>end</span></pre>
|
215
215
|
</td>
|
216
216
|
</tr>
|
@@ -222,9 +222,9 @@
|
|
222
222
|
</div>
|
223
223
|
|
224
224
|
<div id="footer">
|
225
|
-
Generated on
|
225
|
+
Generated on Tue Mar 29 20:43:17 2016 by
|
226
226
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
227
|
-
0.8.7.
|
227
|
+
0.8.7.6 (ruby-2.3.0).
|
228
228
|
</div>
|
229
229
|
|
230
230
|
</body>
|
@@ -6,7 +6,7 @@
|
|
6
6
|
<title>
|
7
7
|
Module: Bovem::ConsoleMethods::Logging
|
8
8
|
|
9
|
-
— Documentation by YARD 0.8.7.
|
9
|
+
— Documentation by YARD 0.8.7.6
|
10
10
|
|
11
11
|
</title>
|
12
12
|
|
@@ -17,7 +17,7 @@
|
|
17
17
|
<script type="text/javascript" charset="utf-8">
|
18
18
|
hasFrames = window.top.frames.main ? true : false;
|
19
19
|
relpath = '../../';
|
20
|
-
framesUrl = "../../frames.html#!"
|
20
|
+
framesUrl = "../../frames.html#!Bovem/ConsoleMethods/Logging.html";
|
21
21
|
</script>
|
22
22
|
|
23
23
|
|
@@ -113,6 +113,24 @@
|
|
113
113
|
|
114
114
|
</p>
|
115
115
|
|
116
|
+
<h2>Constant Summary</h2>
|
117
|
+
|
118
|
+
<dl class="constants">
|
119
|
+
|
120
|
+
<dt id="DEFAULT_STATUSES-constant" class="">DEFAULT_STATUSES =
|
121
|
+
|
122
|
+
</dt>
|
123
|
+
<dd><pre class="code"><span class='lbrace'>{</span>
|
124
|
+
<span class='label'>ok:</span> <span class='lbrace'>{</span><span class='label'>label:</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'> OK </span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='label'>color:</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>bright green</span><span class='tstring_end'>"</span></span><span class='rbrace'>}</span><span class='comma'>,</span>
|
125
|
+
<span class='label'>pass:</span> <span class='lbrace'>{</span><span class='label'>label:</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>PASS</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='label'>color:</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>bright cyan</span><span class='tstring_end'>"</span></span><span class='rbrace'>}</span><span class='comma'>,</span>
|
126
|
+
<span class='label'>warn:</span> <span class='lbrace'>{</span><span class='label'>label:</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>WARN</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='label'>color:</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>bright yellow</span><span class='tstring_end'>"</span></span><span class='rbrace'>}</span><span class='comma'>,</span>
|
127
|
+
<span class='label'>fail:</span> <span class='lbrace'>{</span><span class='label'>label:</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>FAIL</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='label'>color:</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>bright red</span><span class='tstring_end'>"</span></span><span class='rbrace'>}</span><span class='comma'>,</span>
|
128
|
+
<span class='label'>skip:</span> <span class='lbrace'>{</span><span class='label'>label:</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>SKIP</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='label'>color:</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>gray</span><span class='tstring_end'>"</span></span><span class='rbrace'>}</span>
|
129
|
+
<span class='rbrace'>}</span><span class='period'>.</span><span class='id identifier rubyid_freeze'>freeze</span></pre></dd>
|
130
|
+
|
131
|
+
</dl>
|
132
|
+
|
133
|
+
|
116
134
|
|
117
135
|
|
118
136
|
|
@@ -130,7 +148,7 @@
|
|
130
148
|
<li class="public ">
|
131
149
|
<span class="summary_signature">
|
132
150
|
|
133
|
-
<a href="#begin-instance_method" title="#begin (instance method)">- (Object) <strong>begin</strong>(message, suffix
|
151
|
+
<a href="#begin-instance_method" title="#begin (instance method)">- (Object) <strong>begin</strong>(message, suffix: "\n", indented: true, wrap: false, plain: false, indented_banner: false, full_colored: false, print: true) </a>
|
134
152
|
|
135
153
|
|
136
154
|
|
@@ -153,7 +171,7 @@
|
|
153
171
|
<li class="public ">
|
154
172
|
<span class="summary_signature">
|
155
173
|
|
156
|
-
<a href="#debug-instance_method" title="#debug (instance method)">- (Object) <strong>debug</strong>(message, suffix
|
174
|
+
<a href="#debug-instance_method" title="#debug (instance method)">- (Object) <strong>debug</strong>(message, suffix: "\n", indented: true, wrap: false, plain: false, indented_banner: false, full_colored: false, print: true) </a>
|
157
175
|
|
158
176
|
|
159
177
|
|
@@ -176,7 +194,7 @@
|
|
176
194
|
<li class="public ">
|
177
195
|
<span class="summary_signature">
|
178
196
|
|
179
|
-
<a href="#error-instance_method" title="#error (instance method)">- (Object) <strong>error</strong>(message, suffix
|
197
|
+
<a href="#error-instance_method" title="#error (instance method)">- (Object) <strong>error</strong>(message, suffix: "\n", indented: true, wrap: false, plain: false, indented_banner: false, full_colored: false, print: true) </a>
|
180
198
|
|
181
199
|
|
182
200
|
|
@@ -199,7 +217,7 @@
|
|
199
217
|
<li class="public ">
|
200
218
|
<span class="summary_signature">
|
201
219
|
|
202
|
-
<a href="#fatal-instance_method" title="#fatal (instance method)">- (Object) <strong>fatal</strong>(message, suffix
|
220
|
+
<a href="#fatal-instance_method" title="#fatal (instance method)">- (Object) <strong>fatal</strong>(message, suffix: "\n", indented: true, wrap: false, plain: false, indented_banner: false, full_colored: false, return_code: -1,, print: true) </a>
|
203
221
|
|
204
222
|
|
205
223
|
|
@@ -222,7 +240,7 @@
|
|
222
240
|
<li class="public ">
|
223
241
|
<span class="summary_signature">
|
224
242
|
|
225
|
-
<a href="#get_banner-instance_method" title="#get_banner (instance method)">- (String) <strong>get_banner</strong>(label, base_color, full_colored
|
243
|
+
<a href="#get_banner-instance_method" title="#get_banner (instance method)">- (String) <strong>get_banner</strong>(label, base_color, full_colored: false, bracket_color: "blue", brackets: ["[", "]"]) </a>
|
226
244
|
|
227
245
|
|
228
246
|
|
@@ -245,7 +263,7 @@
|
|
245
263
|
<li class="public ">
|
246
264
|
<span class="summary_signature">
|
247
265
|
|
248
|
-
<a href="#info-instance_method" title="#info (instance method)">- (Object) <strong>info</strong>(message, suffix
|
266
|
+
<a href="#info-instance_method" title="#info (instance method)">- (Object) <strong>info</strong>(message, suffix: "\n", indented: true, wrap: false, plain: false, indented_banner: false, full_colored: false, print: true, banner: []) </a>
|
249
267
|
|
250
268
|
|
251
269
|
|
@@ -268,7 +286,7 @@
|
|
268
286
|
<li class="public ">
|
269
287
|
<span class="summary_signature">
|
270
288
|
|
271
|
-
<a href="#progress-instance_method" title="#progress (instance method)">- (String) <strong>progress</strong>(current, total, type
|
289
|
+
<a href="#progress-instance_method" title="#progress (instance method)">- (String) <strong>progress</strong>(current, total, type: :list, precision: 0) </a>
|
272
290
|
|
273
291
|
|
274
292
|
|
@@ -291,7 +309,7 @@
|
|
291
309
|
<li class="public ">
|
292
310
|
<span class="summary_signature">
|
293
311
|
|
294
|
-
<a href="#status-instance_method" title="#status (instance method)">- (Array) <strong>status</strong>(status, plain
|
312
|
+
<a href="#status-instance_method" title="#status (instance method)">- (Array) <strong>status</strong>(status, plain: false, go_up: true, right: true, print: true) </a>
|
295
313
|
|
296
314
|
|
297
315
|
|
@@ -314,7 +332,7 @@
|
|
314
332
|
<li class="public ">
|
315
333
|
<span class="summary_signature">
|
316
334
|
|
317
|
-
<a href="#warn-instance_method" title="#warn (instance method)">- (Object) <strong>warn</strong>(message, suffix
|
335
|
+
<a href="#warn-instance_method" title="#warn (instance method)">- (Object) <strong>warn</strong>(message, suffix: "\n", indented: true, wrap: false, plain: false, indented_banner: false, full_colored: false, print: true) </a>
|
318
336
|
|
319
337
|
|
320
338
|
|
@@ -337,7 +355,7 @@
|
|
337
355
|
<li class="public ">
|
338
356
|
<span class="summary_signature">
|
339
357
|
|
340
|
-
<a href="#write-instance_method" title="#write (instance method)">- (String) <strong>write</strong>(message, suffix
|
358
|
+
<a href="#write-instance_method" title="#write (instance method)">- (String) <strong>write</strong>(message, suffix: "\n", indented: true, wrap: false, plain: false, print: true) </a>
|
341
359
|
|
342
360
|
|
343
361
|
|
@@ -360,7 +378,7 @@
|
|
360
378
|
<li class="public ">
|
361
379
|
<span class="summary_signature">
|
362
380
|
|
363
|
-
<a href="#write_banner_aligned-instance_method" title="#write_banner_aligned (instance method)">- (String) <strong>write_banner_aligned</strong>(message, suffix
|
381
|
+
<a href="#write_banner_aligned-instance_method" title="#write_banner_aligned (instance method)">- (String) <strong>write_banner_aligned</strong>(message, suffix: "\n", indented: true, wrap: false, plain: false, print: true) </a>
|
364
382
|
|
365
383
|
|
366
384
|
|
@@ -393,7 +411,7 @@
|
|
393
411
|
<div class="method_details first">
|
394
412
|
<h3 class="signature first" id="begin-instance_method">
|
395
413
|
|
396
|
-
- (<tt>Object</tt>) <strong>begin</strong>(message, suffix
|
414
|
+
- (<tt>Object</tt>) <strong>begin</strong>(message, suffix: "\n", indented: true, wrap: false, plain: false, indented_banner: false, full_colored: false, print: true)
|
397
415
|
|
398
416
|
|
399
417
|
|
@@ -433,8 +451,6 @@
|
|
433
451
|
<span class='type'>(<tt>Object</tt>)</span>
|
434
452
|
|
435
453
|
|
436
|
-
<em class="default">(defaults to: <tt>"\n"</tt>)</em>
|
437
|
-
|
438
454
|
|
439
455
|
—
|
440
456
|
<div class='inline'><p>If not <code>nil</code> or <code>false</code>, a suffix to add to the message. <code>true</code> means to add <code>\n</code>.</p>
|
@@ -444,17 +460,16 @@
|
|
444
460
|
|
445
461
|
<li>
|
446
462
|
|
447
|
-
<span class='name'>
|
463
|
+
<span class='name'>indented</span>
|
448
464
|
|
449
465
|
|
450
466
|
<span class='type'>(<tt>Object</tt>)</span>
|
451
467
|
|
452
468
|
|
453
|
-
<em class="default">(defaults to: <tt>true</tt>)</em>
|
454
|
-
|
455
469
|
|
456
470
|
—
|
457
|
-
<div class='inline'><p>If not <code>nil</code> or <code>false</code>, the width to use for indentation. <code>true</code> means to use the current indentation,
|
471
|
+
<div class='inline'><p>If not <code>nil</code> or <code>false</code>, the width to use for indentation. <code>true</code> means to use the current indentation,
|
472
|
+
a negative value of <code>-x</code> will indent of <code>x</code> absolute spaces.</p>
|
458
473
|
</div>
|
459
474
|
|
460
475
|
</li>
|
@@ -467,8 +482,6 @@
|
|
467
482
|
<span class='type'>(<tt>Object</tt>)</span>
|
468
483
|
|
469
484
|
|
470
|
-
<em class="default">(defaults to: <tt>false</tt>)</em>
|
471
|
-
|
472
485
|
|
473
486
|
—
|
474
487
|
<div class='inline'><p>If not <code>nil</code> or <code>false</code>, the maximum length of a line for wrapped text. <code>true</code> means the current line width.</p>
|
@@ -484,8 +497,6 @@
|
|
484
497
|
<span class='type'>(<tt>Boolean</tt>)</span>
|
485
498
|
|
486
499
|
|
487
|
-
<em class="default">(defaults to: <tt>false</tt>)</em>
|
488
|
-
|
489
500
|
|
490
501
|
—
|
491
502
|
<div class='inline'><p>If ignore color markers into the message.</p>
|
@@ -501,8 +512,6 @@
|
|
501
512
|
<span class='type'>(<tt>Boolean</tt>)</span>
|
502
513
|
|
503
514
|
|
504
|
-
<em class="default">(defaults to: <tt>false</tt>)</em>
|
505
|
-
|
506
515
|
|
507
516
|
—
|
508
517
|
<div class='inline'><p>If also the banner should be indented.</p>
|
@@ -518,8 +527,6 @@
|
|
518
527
|
<span class='type'>(<tt>Boolean</tt>)</span>
|
519
528
|
|
520
529
|
|
521
|
-
<em class="default">(defaults to: <tt>false</tt>)</em>
|
522
|
-
|
523
530
|
|
524
531
|
—
|
525
532
|
<div class='inline'><p>If the banner should be fully colored.</p>
|
@@ -535,8 +542,6 @@
|
|
535
542
|
<span class='type'>(<tt>Boolean</tt>)</span>
|
536
543
|
|
537
544
|
|
538
|
-
<em class="default">(defaults to: <tt>true</tt>)</em>
|
539
|
-
|
540
545
|
|
541
546
|
—
|
542
547
|
<div class='inline'><p>If <code>false</code>, the result will be returned instead of be printed.</p>
|
@@ -560,19 +565,19 @@
|
|
560
565
|
<pre class="lines">
|
561
566
|
|
562
567
|
|
563
|
-
|
564
|
-
|
565
|
-
|
566
|
-
|
567
|
-
|
568
|
+
404
|
569
|
+
405
|
570
|
+
406
|
571
|
+
407
|
572
|
+
408</pre>
|
568
573
|
</td>
|
569
574
|
<td>
|
570
|
-
<pre class="code"><span class="info file"># File 'lib/bovem/console.rb', line
|
575
|
+
<pre class="code"><span class="info file"># File 'lib/bovem/console.rb', line 404</span>
|
571
576
|
|
572
|
-
<span class='kw'>def</span> <span class='kw'>begin</span><span class='lparen'>(</span><span class='id identifier rubyid_message'>message</span><span class='comma'>,</span> <span class='
|
573
|
-
<span class='id identifier rubyid_banner'>banner</span> <span class='op'>=</span> <span class='id identifier rubyid_get_banner'>get_banner</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>*</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>bright green</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='id identifier rubyid_full_colored'>full_colored</span><span class='rparen'>)</span>
|
574
|
-
<span class='id identifier rubyid_message'>message</span> <span class='op'>=</span> <span class='id identifier rubyid_indent'>indent</span><span class='lparen'>(</span><span class='id identifier rubyid_message'>message</span><span class='comma'>,</span> <span class='id identifier rubyid_indented_banner'>indented_banner</span> <span class='op'>?</span> <span class='int'>0</span> <span class='op'>:</span> <span class='id identifier
|
575
|
-
<span class='id identifier rubyid_write'>write</span><span class='lparen'>(</span><span class='id identifier rubyid_banner'>banner</span> <span class='op'>+</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'> </span><span class='tstring_end'>"</span></span> <span class='op'>+</span> <span class='id identifier rubyid_message'>message</span><span class='comma'>,</span> <span class='id identifier rubyid_suffix'>suffix</span><span class='comma'>,</span> <span class='id identifier rubyid_indented_banner'>indented_banner</span> <span class='op'>?</span> <span class='id identifier
|
577
|
+
<span class='kw'>def</span> <span class='kw'>begin</span><span class='lparen'>(</span><span class='id identifier rubyid_message'>message</span><span class='comma'>,</span> <span class='label'>suffix:</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>\n</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='label'>indented:</span> <span class='kw'>true</span><span class='comma'>,</span> <span class='label'>wrap:</span> <span class='kw'>false</span><span class='comma'>,</span> <span class='label'>plain:</span> <span class='kw'>false</span><span class='comma'>,</span> <span class='label'>indented_banner:</span> <span class='kw'>false</span><span class='comma'>,</span> <span class='label'>full_colored:</span> <span class='kw'>false</span><span class='comma'>,</span> <span class='label'>print:</span> <span class='kw'>true</span><span class='rparen'>)</span>
|
578
|
+
<span class='id identifier rubyid_banner'>banner</span> <span class='op'>=</span> <span class='id identifier rubyid_get_banner'>get_banner</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>*</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>bright green</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='label'>full_colored:</span> <span class='id identifier rubyid_full_colored'>full_colored</span><span class='rparen'>)</span>
|
579
|
+
<span class='id identifier rubyid_message'>message</span> <span class='op'>=</span> <span class='id identifier rubyid_indent'>indent</span><span class='lparen'>(</span><span class='id identifier rubyid_message'>message</span><span class='comma'>,</span> <span class='id identifier rubyid_indented_banner'>indented_banner</span> <span class='op'>?</span> <span class='int'>0</span> <span class='op'>:</span> <span class='id identifier rubyid_indented'>indented</span><span class='rparen'>)</span>
|
580
|
+
<span class='id identifier rubyid_write'>write</span><span class='lparen'>(</span><span class='id identifier rubyid_banner'>banner</span> <span class='op'>+</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'> </span><span class='tstring_end'>"</span></span> <span class='op'>+</span> <span class='id identifier rubyid_message'>message</span><span class='comma'>,</span> <span class='label'>suffix:</span> <span class='id identifier rubyid_suffix'>suffix</span><span class='comma'>,</span> <span class='label'>indented:</span> <span class='id identifier rubyid_indented_banner'>indented_banner</span> <span class='op'>?</span> <span class='id identifier rubyid_indented'>indented</span> <span class='op'>:</span> <span class='int'>0</span><span class='comma'>,</span> <span class='label'>wrap:</span> <span class='id identifier rubyid_wrap'>wrap</span><span class='comma'>,</span> <span class='label'>plain:</span> <span class='id identifier rubyid_plain'>plain</span><span class='comma'>,</span> <span class='label'>print:</span> <span class='id identifier rubyid_print'>print</span><span class='rparen'>)</span>
|
576
581
|
<span class='kw'>end</span></pre>
|
577
582
|
</td>
|
578
583
|
</tr>
|
@@ -582,7 +587,7 @@
|
|
582
587
|
<div class="method_details ">
|
583
588
|
<h3 class="signature " id="debug-instance_method">
|
584
589
|
|
585
|
-
- (<tt>Object</tt>) <strong>debug</strong>(message, suffix
|
590
|
+
- (<tt>Object</tt>) <strong>debug</strong>(message, suffix: "\n", indented: true, wrap: false, plain: false, indented_banner: false, full_colored: false, print: true)
|
586
591
|
|
587
592
|
|
588
593
|
|
@@ -622,8 +627,6 @@
|
|
622
627
|
<span class='type'>(<tt>Object</tt>)</span>
|
623
628
|
|
624
629
|
|
625
|
-
<em class="default">(defaults to: <tt>"\n"</tt>)</em>
|
626
|
-
|
627
630
|
|
628
631
|
—
|
629
632
|
<div class='inline'><p>If not <code>nil</code> or <code>false</code>, a suffix to add to the message. <code>true</code> means to add <code>\n</code>.</p>
|
@@ -633,17 +636,16 @@
|
|
633
636
|
|
634
637
|
<li>
|
635
638
|
|
636
|
-
<span class='name'>
|
639
|
+
<span class='name'>indented</span>
|
637
640
|
|
638
641
|
|
639
642
|
<span class='type'>(<tt>Object</tt>)</span>
|
640
643
|
|
641
644
|
|
642
|
-
<em class="default">(defaults to: <tt>true</tt>)</em>
|
643
|
-
|
644
645
|
|
645
646
|
—
|
646
|
-
<div class='inline'><p>If not <code>nil</code> or <code>false</code>, the width to use for indentation. <code>true</code> means to use the current indentation,
|
647
|
+
<div class='inline'><p>If not <code>nil</code> or <code>false</code>, the width to use for indentation. <code>true</code> means to use the current indentation,
|
648
|
+
a negative value of <code>-x</code> will indent of <code>x</code> absolute spaces.</p>
|
647
649
|
</div>
|
648
650
|
|
649
651
|
</li>
|
@@ -656,8 +658,6 @@
|
|
656
658
|
<span class='type'>(<tt>Object</tt>)</span>
|
657
659
|
|
658
660
|
|
659
|
-
<em class="default">(defaults to: <tt>false</tt>)</em>
|
660
|
-
|
661
661
|
|
662
662
|
—
|
663
663
|
<div class='inline'><p>If not <code>nil</code> or <code>false</code>, the maximum length of a line for wrapped text. <code>true</code> means the current line width.</p>
|
@@ -673,8 +673,6 @@
|
|
673
673
|
<span class='type'>(<tt>Boolean</tt>)</span>
|
674
674
|
|
675
675
|
|
676
|
-
<em class="default">(defaults to: <tt>false</tt>)</em>
|
677
|
-
|
678
676
|
|
679
677
|
—
|
680
678
|
<div class='inline'><p>If ignore color markers into the message.</p>
|
@@ -690,8 +688,6 @@
|
|
690
688
|
<span class='type'>(<tt>Boolean</tt>)</span>
|
691
689
|
|
692
690
|
|
693
|
-
<em class="default">(defaults to: <tt>false</tt>)</em>
|
694
|
-
|
695
691
|
|
696
692
|
—
|
697
693
|
<div class='inline'><p>If also the banner should be indented.</p>
|
@@ -707,8 +703,6 @@
|
|
707
703
|
<span class='type'>(<tt>Boolean</tt>)</span>
|
708
704
|
|
709
705
|
|
710
|
-
<em class="default">(defaults to: <tt>false</tt>)</em>
|
711
|
-
|
712
706
|
|
713
707
|
—
|
714
708
|
<div class='inline'><p>If the banner should be fully colored.</p>
|
@@ -724,8 +718,6 @@
|
|
724
718
|
<span class='type'>(<tt>Boolean</tt>)</span>
|
725
719
|
|
726
720
|
|
727
|
-
<em class="default">(defaults to: <tt>true</tt>)</em>
|
728
|
-
|
729
721
|
|
730
722
|
—
|
731
723
|
<div class='inline'><p>If <code>false</code>, the result will be returned instead of be printed.</p>
|
@@ -749,15 +741,35 @@
|
|
749
741
|
<pre class="lines">
|
750
742
|
|
751
743
|
|
752
|
-
|
753
|
-
|
754
|
-
|
744
|
+
464
|
745
|
+
465
|
746
|
+
466
|
747
|
+
467
|
748
|
+
468
|
749
|
+
469
|
750
|
+
470
|
751
|
+
471
|
752
|
+
472
|
753
|
+
473
|
754
|
+
474
|
755
|
+
475
|
756
|
+
476</pre>
|
755
757
|
</td>
|
756
758
|
<td>
|
757
|
-
<pre class="code"><span class="info file"># File 'lib/bovem/console.rb', line
|
758
|
-
|
759
|
-
<span class='kw'>def</span> <span class='id identifier rubyid_debug'>debug</span><span class='lparen'>(</span><span class='id identifier rubyid_message'>message</span><span class='comma'>,</span> <span class='
|
760
|
-
<span class='id identifier rubyid_info'>info</span><span class='lparen'>(</span
|
759
|
+
<pre class="code"><span class="info file"># File 'lib/bovem/console.rb', line 464</span>
|
760
|
+
|
761
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_debug'>debug</span><span class='lparen'>(</span><span class='id identifier rubyid_message'>message</span><span class='comma'>,</span> <span class='label'>suffix:</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>\n</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='label'>indented:</span> <span class='kw'>true</span><span class='comma'>,</span> <span class='label'>wrap:</span> <span class='kw'>false</span><span class='comma'>,</span> <span class='label'>plain:</span> <span class='kw'>false</span><span class='comma'>,</span> <span class='label'>indented_banner:</span> <span class='kw'>false</span><span class='comma'>,</span> <span class='label'>full_colored:</span> <span class='kw'>false</span><span class='comma'>,</span> <span class='label'>print:</span> <span class='kw'>true</span><span class='rparen'>)</span>
|
762
|
+
<span class='id identifier rubyid_info'>info</span><span class='lparen'>(</span>
|
763
|
+
<span class='id identifier rubyid_message'>message</span><span class='comma'>,</span>
|
764
|
+
<span class='label'>suffix:</span> <span class='id identifier rubyid_suffix'>suffix</span><span class='comma'>,</span>
|
765
|
+
<span class='label'>indented:</span> <span class='id identifier rubyid_indented'>indented</span><span class='comma'>,</span>
|
766
|
+
<span class='label'>wrap:</span> <span class='id identifier rubyid_wrap'>wrap</span><span class='comma'>,</span>
|
767
|
+
<span class='label'>plain:</span> <span class='id identifier rubyid_plain'>plain</span><span class='comma'>,</span>
|
768
|
+
<span class='label'>indented_banner:</span> <span class='id identifier rubyid_indented_banner'>indented_banner</span><span class='comma'>,</span>
|
769
|
+
<span class='label'>full_colored:</span> <span class='id identifier rubyid_full_colored'>full_colored</span><span class='comma'>,</span>
|
770
|
+
<span class='label'>print:</span> <span class='id identifier rubyid_print'>print</span><span class='comma'>,</span>
|
771
|
+
<span class='label'>banner:</span> <span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>D</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>bright magenta</span><span class='tstring_end'>"</span></span><span class='rbracket'>]</span>
|
772
|
+
<span class='rparen'>)</span>
|
761
773
|
<span class='kw'>end</span></pre>
|
762
774
|
</td>
|
763
775
|
</tr>
|
@@ -767,7 +779,7 @@
|
|
767
779
|
<div class="method_details ">
|
768
780
|
<h3 class="signature " id="error-instance_method">
|
769
781
|
|
770
|
-
- (<tt>Object</tt>) <strong>error</strong>(message, suffix
|
782
|
+
- (<tt>Object</tt>) <strong>error</strong>(message, suffix: "\n", indented: true, wrap: false, plain: false, indented_banner: false, full_colored: false, print: true)
|
771
783
|
|
772
784
|
|
773
785
|
|
@@ -807,8 +819,6 @@
|
|
807
819
|
<span class='type'>(<tt>Object</tt>)</span>
|
808
820
|
|
809
821
|
|
810
|
-
<em class="default">(defaults to: <tt>"\n"</tt>)</em>
|
811
|
-
|
812
822
|
|
813
823
|
—
|
814
824
|
<div class='inline'><p>If not <code>nil</code> or <code>false</code>, a suffix to add to the message. <code>true</code> means to add <code>\n</code>.</p>
|
@@ -818,17 +828,16 @@
|
|
818
828
|
|
819
829
|
<li>
|
820
830
|
|
821
|
-
<span class='name'>
|
831
|
+
<span class='name'>indented</span>
|
822
832
|
|
823
833
|
|
824
834
|
<span class='type'>(<tt>Object</tt>)</span>
|
825
835
|
|
826
836
|
|
827
|
-
<em class="default">(defaults to: <tt>true</tt>)</em>
|
828
|
-
|
829
837
|
|
830
838
|
—
|
831
|
-
<div class='inline'><p>If not <code>nil</code> or <code>false</code>, the width to use for indentation. <code>true</code> means to use the current indentation,
|
839
|
+
<div class='inline'><p>If not <code>nil</code> or <code>false</code>, the width to use for indentation. <code>true</code> means to use the current indentation,
|
840
|
+
a negative value of <code>-x</code> will indent of <code>x</code> absolute spaces.</p>
|
832
841
|
</div>
|
833
842
|
|
834
843
|
</li>
|
@@ -841,8 +850,6 @@
|
|
841
850
|
<span class='type'>(<tt>Object</tt>)</span>
|
842
851
|
|
843
852
|
|
844
|
-
<em class="default">(defaults to: <tt>false</tt>)</em>
|
845
|
-
|
846
853
|
|
847
854
|
—
|
848
855
|
<div class='inline'><p>If not <code>nil</code> or <code>false</code>, the maximum length of a line for wrapped text. <code>true</code> means the current line width.</p>
|
@@ -858,8 +865,6 @@
|
|
858
865
|
<span class='type'>(<tt>Boolean</tt>)</span>
|
859
866
|
|
860
867
|
|
861
|
-
<em class="default">(defaults to: <tt>false</tt>)</em>
|
862
|
-
|
863
868
|
|
864
869
|
—
|
865
870
|
<div class='inline'><p>If ignore color markers into the message.</p>
|
@@ -875,8 +880,6 @@
|
|
875
880
|
<span class='type'>(<tt>Boolean</tt>)</span>
|
876
881
|
|
877
882
|
|
878
|
-
<em class="default">(defaults to: <tt>false</tt>)</em>
|
879
|
-
|
880
883
|
|
881
884
|
—
|
882
885
|
<div class='inline'><p>If also the banner should be indented.</p>
|
@@ -892,8 +895,6 @@
|
|
892
895
|
<span class='type'>(<tt>Boolean</tt>)</span>
|
893
896
|
|
894
897
|
|
895
|
-
<em class="default">(defaults to: <tt>false</tt>)</em>
|
896
|
-
|
897
898
|
|
898
899
|
—
|
899
900
|
<div class='inline'><p>If the banner should be fully colored.</p>
|
@@ -909,8 +910,6 @@
|
|
909
910
|
<span class='type'>(<tt>Boolean</tt>)</span>
|
910
911
|
|
911
912
|
|
912
|
-
<em class="default">(defaults to: <tt>true</tt>)</em>
|
913
|
-
|
914
913
|
|
915
914
|
—
|
916
915
|
<div class='inline'><p>If <code>false</code>, the result will be returned instead of be printed.</p>
|
@@ -934,15 +933,35 @@
|
|
934
933
|
<pre class="lines">
|
935
934
|
|
936
935
|
|
937
|
-
|
938
|
-
|
939
|
-
|
936
|
+
518
|
937
|
+
519
|
938
|
+
520
|
939
|
+
521
|
940
|
+
522
|
941
|
+
523
|
942
|
+
524
|
943
|
+
525
|
944
|
+
526
|
945
|
+
527
|
946
|
+
528
|
947
|
+
529
|
948
|
+
530</pre>
|
940
949
|
</td>
|
941
950
|
<td>
|
942
|
-
<pre class="code"><span class="info file"># File 'lib/bovem/console.rb', line
|
943
|
-
|
944
|
-
<span class='kw'>def</span> <span class='id identifier rubyid_error'>error</span><span class='lparen'>(</span><span class='id identifier rubyid_message'>message</span><span class='comma'>,</span> <span class='
|
945
|
-
<span class='id identifier rubyid_info'>info</span><span class='lparen'>(</span
|
951
|
+
<pre class="code"><span class="info file"># File 'lib/bovem/console.rb', line 518</span>
|
952
|
+
|
953
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_error'>error</span><span class='lparen'>(</span><span class='id identifier rubyid_message'>message</span><span class='comma'>,</span> <span class='label'>suffix:</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>\n</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='label'>indented:</span> <span class='kw'>true</span><span class='comma'>,</span> <span class='label'>wrap:</span> <span class='kw'>false</span><span class='comma'>,</span> <span class='label'>plain:</span> <span class='kw'>false</span><span class='comma'>,</span> <span class='label'>indented_banner:</span> <span class='kw'>false</span><span class='comma'>,</span> <span class='label'>full_colored:</span> <span class='kw'>false</span><span class='comma'>,</span> <span class='label'>print:</span> <span class='kw'>true</span><span class='rparen'>)</span>
|
954
|
+
<span class='id identifier rubyid_info'>info</span><span class='lparen'>(</span>
|
955
|
+
<span class='id identifier rubyid_message'>message</span><span class='comma'>,</span>
|
956
|
+
<span class='label'>suffix:</span> <span class='id identifier rubyid_suffix'>suffix</span><span class='comma'>,</span>
|
957
|
+
<span class='label'>indented:</span> <span class='id identifier rubyid_indented'>indented</span><span class='comma'>,</span>
|
958
|
+
<span class='label'>wrap:</span> <span class='id identifier rubyid_wrap'>wrap</span><span class='comma'>,</span>
|
959
|
+
<span class='label'>plain:</span> <span class='id identifier rubyid_plain'>plain</span><span class='comma'>,</span>
|
960
|
+
<span class='label'>indented_banner:</span> <span class='id identifier rubyid_indented_banner'>indented_banner</span><span class='comma'>,</span>
|
961
|
+
<span class='label'>full_colored:</span> <span class='id identifier rubyid_full_colored'>full_colored</span><span class='comma'>,</span>
|
962
|
+
<span class='label'>print:</span> <span class='id identifier rubyid_print'>print</span><span class='comma'>,</span>
|
963
|
+
<span class='label'>banner:</span> <span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>E</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>bright red</span><span class='tstring_end'>"</span></span><span class='rbracket'>]</span>
|
964
|
+
<span class='rparen'>)</span>
|
946
965
|
<span class='kw'>end</span></pre>
|
947
966
|
</td>
|
948
967
|
</tr>
|
@@ -952,7 +971,7 @@
|
|
952
971
|
<div class="method_details ">
|
953
972
|
<h3 class="signature " id="fatal-instance_method">
|
954
973
|
|
955
|
-
- (<tt>Object</tt>) <strong>fatal</strong>(message, suffix
|
974
|
+
- (<tt>Object</tt>) <strong>fatal</strong>(message, suffix: "\n", indented: true, wrap: false, plain: false, indented_banner: false, full_colored: false, return_code: -1,, print: true)
|
956
975
|
|
957
976
|
|
958
977
|
|
@@ -992,8 +1011,6 @@
|
|
992
1011
|
<span class='type'>(<tt>Object</tt>)</span>
|
993
1012
|
|
994
1013
|
|
995
|
-
<em class="default">(defaults to: <tt>"\n"</tt>)</em>
|
996
|
-
|
997
1014
|
|
998
1015
|
—
|
999
1016
|
<div class='inline'><p>If not <code>nil</code> or <code>false</code>, a suffix to add to the message. <code>true</code> means to add <code>\n</code>.</p>
|
@@ -1003,17 +1020,16 @@
|
|
1003
1020
|
|
1004
1021
|
<li>
|
1005
1022
|
|
1006
|
-
<span class='name'>
|
1023
|
+
<span class='name'>indented</span>
|
1007
1024
|
|
1008
1025
|
|
1009
1026
|
<span class='type'>(<tt>Object</tt>)</span>
|
1010
1027
|
|
1011
1028
|
|
1012
|
-
<em class="default">(defaults to: <tt>true</tt>)</em>
|
1013
|
-
|
1014
1029
|
|
1015
1030
|
—
|
1016
|
-
<div class='inline'><p>If not <code>nil</code> or <code>false</code>, the width to use for indentation. <code>true</code> means to use the current indentation,
|
1031
|
+
<div class='inline'><p>If not <code>nil</code> or <code>false</code>, the width to use for indentation. <code>true</code> means to use the current indentation,
|
1032
|
+
a negative value of <code>-x</code> will indent of <code>x</code> absolute spaces.</p>
|
1017
1033
|
</div>
|
1018
1034
|
|
1019
1035
|
</li>
|
@@ -1026,8 +1042,6 @@
|
|
1026
1042
|
<span class='type'>(<tt>Object</tt>)</span>
|
1027
1043
|
|
1028
1044
|
|
1029
|
-
<em class="default">(defaults to: <tt>false</tt>)</em>
|
1030
|
-
|
1031
1045
|
|
1032
1046
|
—
|
1033
1047
|
<div class='inline'><p>If not <code>nil</code> or <code>false</code>, the maximum length of a line for wrapped text. <code>true</code> means the current line width.</p>
|
@@ -1043,8 +1057,6 @@
|
|
1043
1057
|
<span class='type'>(<tt>Boolean</tt>)</span>
|
1044
1058
|
|
1045
1059
|
|
1046
|
-
<em class="default">(defaults to: <tt>false</tt>)</em>
|
1047
|
-
|
1048
1060
|
|
1049
1061
|
—
|
1050
1062
|
<div class='inline'><p>If ignore color markers into the message.</p>
|
@@ -1060,8 +1072,6 @@
|
|
1060
1072
|
<span class='type'>(<tt>Boolean</tt>)</span>
|
1061
1073
|
|
1062
1074
|
|
1063
|
-
<em class="default">(defaults to: <tt>false</tt>)</em>
|
1064
|
-
|
1065
1075
|
|
1066
1076
|
—
|
1067
1077
|
<div class='inline'><p>If also the banner should be indented.</p>
|
@@ -1077,8 +1087,6 @@
|
|
1077
1087
|
<span class='type'>(<tt>Boolean</tt>)</span>
|
1078
1088
|
|
1079
1089
|
|
1080
|
-
<em class="default">(defaults to: <tt>false</tt>)</em>
|
1081
|
-
|
1082
1090
|
|
1083
1091
|
—
|
1084
1092
|
<div class='inline'><p>If the banner should be fully colored.</p>
|
@@ -1094,8 +1102,6 @@
|
|
1094
1102
|
<span class='type'>(<tt>Fixnum</tt>)</span>
|
1095
1103
|
|
1096
1104
|
|
1097
|
-
<em class="default">(defaults to: <tt>-1,</tt>)</em>
|
1098
|
-
|
1099
1105
|
|
1100
1106
|
—
|
1101
1107
|
<div class='inline'><p>The code to return to the shell.</p>
|
@@ -1111,8 +1117,6 @@
|
|
1111
1117
|
<span class='type'>(<tt>Boolean</tt>)</span>
|
1112
1118
|
|
1113
1119
|
|
1114
|
-
<em class="default">(defaults to: <tt>true</tt>)</em>
|
1115
|
-
|
1116
1120
|
|
1117
1121
|
—
|
1118
1122
|
<div class='inline'><p>If <code>false</code>, the result will be returned instead of be printed.</p>
|
@@ -1136,16 +1140,16 @@
|
|
1136
1140
|
<pre class="lines">
|
1137
1141
|
|
1138
1142
|
|
1139
|
-
|
1140
|
-
|
1141
|
-
|
1142
|
-
|
1143
|
+
424
|
1144
|
+
425
|
1145
|
+
426
|
1146
|
+
427</pre>
|
1143
1147
|
</td>
|
1144
1148
|
<td>
|
1145
|
-
<pre class="code"><span class="info file"># File 'lib/bovem/console.rb', line
|
1149
|
+
<pre class="code"><span class="info file"># File 'lib/bovem/console.rb', line 424</span>
|
1146
1150
|
|
1147
|
-
<span class='kw'>def</span> <span class='id identifier rubyid_fatal'>fatal</span><span class='lparen'>(</span><span class='id identifier rubyid_message'>message</span><span class='comma'>,</span> <span class='
|
1148
|
-
<span class='id identifier rubyid_error'>error</span><span class='lparen'>(</span><span class='id identifier rubyid_message'>message</span><span class='comma'>,</span> <span class='id identifier rubyid_suffix'>suffix</span><span class='comma'>,</span> <span class='id identifier
|
1151
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_fatal'>fatal</span><span class='lparen'>(</span><span class='id identifier rubyid_message'>message</span><span class='comma'>,</span> <span class='label'>suffix:</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>\n</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='label'>indented:</span> <span class='kw'>true</span><span class='comma'>,</span> <span class='label'>wrap:</span> <span class='kw'>false</span><span class='comma'>,</span> <span class='label'>plain:</span> <span class='kw'>false</span><span class='comma'>,</span> <span class='label'>indented_banner:</span> <span class='kw'>false</span><span class='comma'>,</span> <span class='label'>full_colored:</span> <span class='kw'>false</span><span class='comma'>,</span> <span class='label'>return_code:</span> <span class='op'>-</span><span class='int'>1</span><span class='comma'>,</span> <span class='label'>print:</span> <span class='kw'>true</span><span class='rparen'>)</span>
|
1152
|
+
<span class='id identifier rubyid_error'>error</span><span class='lparen'>(</span><span class='id identifier rubyid_message'>message</span><span class='comma'>,</span> <span class='label'>suffix:</span> <span class='id identifier rubyid_suffix'>suffix</span><span class='comma'>,</span> <span class='label'>indented:</span> <span class='id identifier rubyid_indented'>indented</span><span class='comma'>,</span> <span class='label'>wrap:</span> <span class='id identifier rubyid_wrap'>wrap</span><span class='comma'>,</span> <span class='label'>plain:</span> <span class='id identifier rubyid_plain'>plain</span><span class='comma'>,</span> <span class='label'>indented_banner:</span> <span class='id identifier rubyid_indented_banner'>indented_banner</span><span class='comma'>,</span> <span class='label'>full_colored:</span> <span class='id identifier rubyid_full_colored'>full_colored</span><span class='comma'>,</span> <span class='label'>print:</span> <span class='id identifier rubyid_print'>print</span><span class='rparen'>)</span>
|
1149
1153
|
<span class='const'>Kernel</span><span class='period'>.</span><span class='id identifier rubyid_exit'>exit</span><span class='lparen'>(</span><span class='id identifier rubyid_return_code'>return_code</span><span class='period'>.</span><span class='id identifier rubyid_to_integer'>to_integer</span><span class='lparen'>(</span><span class='op'>-</span><span class='int'>1</span><span class='rparen'>)</span><span class='rparen'>)</span>
|
1150
1154
|
<span class='kw'>end</span></pre>
|
1151
1155
|
</td>
|
@@ -1156,7 +1160,7 @@
|
|
1156
1160
|
<div class="method_details ">
|
1157
1161
|
<h3 class="signature " id="get_banner-instance_method">
|
1158
1162
|
|
1159
|
-
- (<tt>String</tt>) <strong>get_banner</strong>(label, base_color, full_colored
|
1163
|
+
- (<tt>String</tt>) <strong>get_banner</strong>(label, base_color, full_colored: false, bracket_color: "blue", brackets: ["[", "]"])
|
1160
1164
|
|
1161
1165
|
|
1162
1166
|
|
@@ -1211,8 +1215,6 @@
|
|
1211
1215
|
<span class='type'>(<tt>String</tt>)</span>
|
1212
1216
|
|
1213
1217
|
|
1214
|
-
<em class="default">(defaults to: <tt>false</tt>)</em>
|
1215
|
-
|
1216
1218
|
|
1217
1219
|
—
|
1218
1220
|
<div class='inline'><p>If all the message should be of the label color.</p>
|
@@ -1228,8 +1230,6 @@
|
|
1228
1230
|
<span class='type'>(<tt>String</tt>)</span>
|
1229
1231
|
|
1230
1232
|
|
1231
|
-
<em class="default">(defaults to: <tt>"blue"</tt>)</em>
|
1232
|
-
|
1233
1233
|
|
1234
1234
|
—
|
1235
1235
|
<div class='inline'><p>The color of the brackets.</p>
|
@@ -1245,8 +1245,6 @@
|
|
1245
1245
|
<span class='type'>(<tt>Array</tt>)</span>
|
1246
1246
|
|
1247
1247
|
|
1248
|
-
<em class="default">(defaults to: <tt>["[", "]"]</tt>)</em>
|
1249
|
-
|
1250
1248
|
|
1251
1249
|
—
|
1252
1250
|
<div class='inline'><p>An array of dimension 2 to use for brackets.</p>
|
@@ -1287,21 +1285,21 @@
|
|
1287
1285
|
<pre class="lines">
|
1288
1286
|
|
1289
1287
|
|
1290
|
-
|
1291
|
-
|
1292
|
-
|
1293
|
-
|
1294
|
-
|
1295
|
-
|
1288
|
+
367
|
1289
|
+
368
|
1290
|
+
369
|
1291
|
+
370
|
1292
|
+
371
|
1293
|
+
372</pre>
|
1296
1294
|
</td>
|
1297
1295
|
<td>
|
1298
|
-
<pre class="code"><span class="info file"># File 'lib/bovem/console.rb', line
|
1296
|
+
<pre class="code"><span class="info file"># File 'lib/bovem/console.rb', line 367</span>
|
1299
1297
|
|
1300
|
-
<span class='kw'>def</span> <span class='id identifier rubyid_get_banner'>get_banner</span><span class='lparen'>(</span><span class='id identifier rubyid_label'>label</span><span class='comma'>,</span> <span class='id identifier rubyid_base_color'>base_color</span><span class='comma'>,</span> <span class='
|
1298
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_get_banner'>get_banner</span><span class='lparen'>(</span><span class='id identifier rubyid_label'>label</span><span class='comma'>,</span> <span class='id identifier rubyid_base_color'>base_color</span><span class='comma'>,</span> <span class='label'>full_colored:</span> <span class='kw'>false</span><span class='comma'>,</span> <span class='label'>bracket_color:</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>blue</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='label'>brackets:</span> <span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>[</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>]</span><span class='tstring_end'>"</span></span><span class='rbracket'>]</span><span class='rparen'>)</span>
|
1301
1299
|
<span class='id identifier rubyid_label'>label</span> <span class='op'>=</span> <span class='id identifier rubyid_label'>label</span><span class='period'>.</span><span class='id identifier rubyid_rjust'>rjust</span><span class='lparen'>(</span><span class='const'>Bovem</span><span class='op'>::</span><span class='const'>Console</span><span class='period'>.</span><span class='id identifier rubyid_min_banner_length'>min_banner_length</span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'> </span><span class='tstring_end'>"</span></span><span class='rparen'>)</span>
|
1302
1300
|
<span class='id identifier rubyid_brackets'>brackets</span> <span class='op'>=</span> <span class='id identifier rubyid_brackets'>brackets</span><span class='period'>.</span><span class='id identifier rubyid_ensure_array'>ensure_array</span>
|
1303
1301
|
<span class='id identifier rubyid_bracket_color'>bracket_color</span> <span class='op'>=</span> <span class='id identifier rubyid_base_color'>base_color</span> <span class='kw'>if</span> <span class='id identifier rubyid_full_colored'>full_colored</span>
|
1304
|
-
<span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>{mark=%s}%s{mark=%s}%s{/mark}%s{/mark}</span><span class='tstring_end'>"</span></span
|
1302
|
+
<span class='id identifier rubyid_sprintf'>sprintf</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>{mark=%s}%s{mark=%s}%s{/mark}%s{/mark}</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='id identifier rubyid_bracket_color'>bracket_color</span><span class='period'>.</span><span class='id identifier rubyid_parameterize'>parameterize</span><span class='comma'>,</span> <span class='id identifier rubyid_brackets'>brackets</span><span class='lbracket'>[</span><span class='int'>0</span><span class='rbracket'>]</span><span class='comma'>,</span> <span class='id identifier rubyid_base_color'>base_color</span><span class='period'>.</span><span class='id identifier rubyid_parameterize'>parameterize</span><span class='comma'>,</span> <span class='id identifier rubyid_label'>label</span><span class='comma'>,</span> <span class='id identifier rubyid_brackets'>brackets</span><span class='lbracket'>[</span><span class='int'>1</span><span class='rbracket'>]</span><span class='rparen'>)</span>
|
1305
1303
|
<span class='kw'>end</span></pre>
|
1306
1304
|
</td>
|
1307
1305
|
</tr>
|
@@ -1311,7 +1309,7 @@
|
|
1311
1309
|
<div class="method_details ">
|
1312
1310
|
<h3 class="signature " id="info-instance_method">
|
1313
1311
|
|
1314
|
-
- (<tt>Object</tt>) <strong>info</strong>(message, suffix
|
1312
|
+
- (<tt>Object</tt>) <strong>info</strong>(message, suffix: "\n", indented: true, wrap: false, plain: false, indented_banner: false, full_colored: false, print: true, banner: [])
|
1315
1313
|
|
1316
1314
|
|
1317
1315
|
|
@@ -1351,8 +1349,6 @@
|
|
1351
1349
|
<span class='type'>(<tt>Object</tt>)</span>
|
1352
1350
|
|
1353
1351
|
|
1354
|
-
<em class="default">(defaults to: <tt>"\n"</tt>)</em>
|
1355
|
-
|
1356
1352
|
|
1357
1353
|
—
|
1358
1354
|
<div class='inline'><p>If not <code>nil</code> or <code>false</code>, a suffix to add to the message. <code>true</code> means to add <code>\n</code>.</p>
|
@@ -1362,17 +1358,16 @@
|
|
1362
1358
|
|
1363
1359
|
<li>
|
1364
1360
|
|
1365
|
-
<span class='name'>
|
1361
|
+
<span class='name'>indented</span>
|
1366
1362
|
|
1367
1363
|
|
1368
1364
|
<span class='type'>(<tt>Object</tt>)</span>
|
1369
1365
|
|
1370
1366
|
|
1371
|
-
<em class="default">(defaults to: <tt>true</tt>)</em>
|
1372
|
-
|
1373
1367
|
|
1374
1368
|
—
|
1375
|
-
<div class='inline'><p>If not <code>nil</code> or <code>false</code>, the width to use for indentation. <code>true</code> means to use the current indentation,
|
1369
|
+
<div class='inline'><p>If not <code>nil</code> or <code>false</code>, the width to use for indentation. <code>true</code> means to use the current indentation,
|
1370
|
+
a negative value of <code>-x</code> will indent of <code>x</code> absolute spaces.</p>
|
1376
1371
|
</div>
|
1377
1372
|
|
1378
1373
|
</li>
|
@@ -1385,8 +1380,6 @@
|
|
1385
1380
|
<span class='type'>(<tt>Object</tt>)</span>
|
1386
1381
|
|
1387
1382
|
|
1388
|
-
<em class="default">(defaults to: <tt>false</tt>)</em>
|
1389
|
-
|
1390
1383
|
|
1391
1384
|
—
|
1392
1385
|
<div class='inline'><p>If not <code>nil</code> or <code>false</code>, the maximum length of a line for wrapped text. <code>true</code> means the current line width.</p>
|
@@ -1402,8 +1395,6 @@
|
|
1402
1395
|
<span class='type'>(<tt>Boolean</tt>)</span>
|
1403
1396
|
|
1404
1397
|
|
1405
|
-
<em class="default">(defaults to: <tt>false</tt>)</em>
|
1406
|
-
|
1407
1398
|
|
1408
1399
|
—
|
1409
1400
|
<div class='inline'><p>If ignore color markers into the message.</p>
|
@@ -1419,8 +1410,6 @@
|
|
1419
1410
|
<span class='type'>(<tt>Boolean</tt>)</span>
|
1420
1411
|
|
1421
1412
|
|
1422
|
-
<em class="default">(defaults to: <tt>false</tt>)</em>
|
1423
|
-
|
1424
1413
|
|
1425
1414
|
—
|
1426
1415
|
<div class='inline'><p>If also the banner should be indented.</p>
|
@@ -1436,8 +1425,6 @@
|
|
1436
1425
|
<span class='type'>(<tt>Boolean</tt>)</span>
|
1437
1426
|
|
1438
1427
|
|
1439
|
-
<em class="default">(defaults to: <tt>false</tt>)</em>
|
1440
|
-
|
1441
1428
|
|
1442
1429
|
—
|
1443
1430
|
<div class='inline'><p>If the banner should be fully colored.</p>
|
@@ -1453,8 +1440,6 @@
|
|
1453
1440
|
<span class='type'>(<tt>Boolean</tt>)</span>
|
1454
1441
|
|
1455
1442
|
|
1456
|
-
<em class="default">(defaults to: <tt>true</tt>)</em>
|
1457
|
-
|
1458
1443
|
|
1459
1444
|
—
|
1460
1445
|
<div class='inline'><p>If <code>false</code>, the result will be returned instead of be printed.</p>
|
@@ -1493,23 +1478,23 @@
|
|
1493
1478
|
<pre class="lines">
|
1494
1479
|
|
1495
1480
|
|
1496
|
-
|
1497
|
-
|
1498
|
-
|
1499
|
-
|
1500
|
-
|
1501
|
-
|
1502
|
-
|
1481
|
+
443
|
1482
|
+
444
|
1483
|
+
445
|
1484
|
+
446
|
1485
|
+
447
|
1486
|
+
448
|
1487
|
+
449</pre>
|
1503
1488
|
</td>
|
1504
1489
|
<td>
|
1505
|
-
<pre class="code"><span class="info file"># File 'lib/bovem/console.rb', line
|
1490
|
+
<pre class="code"><span class="info file"># File 'lib/bovem/console.rb', line 443</span>
|
1506
1491
|
|
1507
|
-
<span class='kw'>def</span> <span class='id identifier rubyid_info'>info</span><span class='lparen'>(</span><span class='id identifier rubyid_message'>message</span><span class='comma'>,</span> <span class='
|
1508
|
-
<span class='id identifier rubyid_banner'>banner</span> <span class='op'>=</span> <span class='id identifier rubyid_banner'>banner</span><span class='period'>.</span><span class='id identifier rubyid_ensure_array'>ensure_array</span><span class='lparen'>(</span><span class='
|
1492
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_info'>info</span><span class='lparen'>(</span><span class='id identifier rubyid_message'>message</span><span class='comma'>,</span> <span class='label'>suffix:</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>\n</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='label'>indented:</span> <span class='kw'>true</span><span class='comma'>,</span> <span class='label'>wrap:</span> <span class='kw'>false</span><span class='comma'>,</span> <span class='label'>plain:</span> <span class='kw'>false</span><span class='comma'>,</span> <span class='label'>indented_banner:</span> <span class='kw'>false</span><span class='comma'>,</span> <span class='label'>full_colored:</span> <span class='kw'>false</span><span class='comma'>,</span> <span class='label'>print:</span> <span class='kw'>true</span><span class='comma'>,</span> <span class='label'>banner:</span> <span class='lbracket'>[</span><span class='rbracket'>]</span><span class='rparen'>)</span>
|
1493
|
+
<span class='id identifier rubyid_banner'>banner</span> <span class='op'>=</span> <span class='id identifier rubyid_banner'>banner</span><span class='period'>.</span><span class='id identifier rubyid_ensure_array'>ensure_array</span><span class='lparen'>(</span><span class='label'>no_duplicates:</span> <span class='kw'>true</span><span class='comma'>,</span> <span class='label'>compact:</span> <span class='kw'>true</span><span class='comma'>,</span> <span class='label'>flatten:</span> <span class='kw'>true</span><span class='rparen'>)</span>
|
1509
1494
|
<span class='id identifier rubyid_banner'>banner</span> <span class='op'>=</span> <span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>I</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>bright cyan</span><span class='tstring_end'>"</span></span><span class='rbracket'>]</span> <span class='kw'>if</span> <span class='id identifier rubyid_banner'>banner</span><span class='period'>.</span><span class='id identifier rubyid_blank?'>blank?</span>
|
1510
|
-
<span class='id identifier rubyid_banner'>banner</span> <span class='op'>=</span> <span class='id identifier rubyid_get_banner'>get_banner</span><span class='lparen'>(</span><span class='id identifier rubyid_banner'>banner</span><span class='lbracket'>[</span><span class='int'>0</span><span class='rbracket'>]</span><span class='comma'>,</span> <span class='id identifier rubyid_banner'>banner</span><span class='lbracket'>[</span><span class='int'>1</span><span class='rbracket'>]</span><span class='comma'>,</span> <span class='id identifier rubyid_full_colored'>full_colored</span><span class='rparen'>)</span>
|
1511
|
-
<span class='id identifier rubyid_message'>message</span> <span class='op'>=</span> <span class='id identifier rubyid_indent'>indent</span><span class='lparen'>(</span><span class='id identifier rubyid_message'>message</span><span class='comma'>,</span> <span class='id identifier rubyid_indented_banner'>indented_banner</span> <span class='op'>?</span> <span class='int'>0</span> <span class='op'>:</span> <span class='id identifier
|
1512
|
-
<span class='id identifier rubyid_write'>write</span><span class='lparen'>(</span><span class='id identifier rubyid_banner'>banner</span> <span class='op'>+</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'> </span><span class='tstring_end'>"</span></span> <span class='op'>+</span> <span class='id identifier rubyid_message'>message</span><span class='comma'>,</span> <span class='id identifier rubyid_suffix'>suffix</span><span class='comma'>,</span> <span class='id identifier rubyid_indented_banner'>indented_banner</span> <span class='op'>?</span> <span class='id identifier
|
1495
|
+
<span class='id identifier rubyid_banner'>banner</span> <span class='op'>=</span> <span class='id identifier rubyid_get_banner'>get_banner</span><span class='lparen'>(</span><span class='id identifier rubyid_banner'>banner</span><span class='lbracket'>[</span><span class='int'>0</span><span class='rbracket'>]</span><span class='comma'>,</span> <span class='id identifier rubyid_banner'>banner</span><span class='lbracket'>[</span><span class='int'>1</span><span class='rbracket'>]</span><span class='comma'>,</span> <span class='label'>full_colored:</span> <span class='id identifier rubyid_full_colored'>full_colored</span><span class='rparen'>)</span>
|
1496
|
+
<span class='id identifier rubyid_message'>message</span> <span class='op'>=</span> <span class='id identifier rubyid_indent'>indent</span><span class='lparen'>(</span><span class='id identifier rubyid_message'>message</span><span class='comma'>,</span> <span class='id identifier rubyid_indented_banner'>indented_banner</span> <span class='op'>?</span> <span class='int'>0</span> <span class='op'>:</span> <span class='id identifier rubyid_indented'>indented</span><span class='rparen'>)</span>
|
1497
|
+
<span class='id identifier rubyid_write'>write</span><span class='lparen'>(</span><span class='id identifier rubyid_banner'>banner</span> <span class='op'>+</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'> </span><span class='tstring_end'>"</span></span> <span class='op'>+</span> <span class='id identifier rubyid_message'>message</span><span class='comma'>,</span> <span class='label'>suffix:</span> <span class='id identifier rubyid_suffix'>suffix</span><span class='comma'>,</span> <span class='label'>indented:</span> <span class='id identifier rubyid_indented_banner'>indented_banner</span> <span class='op'>?</span> <span class='id identifier rubyid_indented'>indented</span> <span class='op'>:</span> <span class='int'>0</span><span class='comma'>,</span> <span class='label'>wrap:</span> <span class='id identifier rubyid_wrap'>wrap</span><span class='comma'>,</span> <span class='label'>plain:</span> <span class='id identifier rubyid_plain'>plain</span><span class='comma'>,</span> <span class='label'>print:</span> <span class='id identifier rubyid_print'>print</span><span class='rparen'>)</span>
|
1513
1498
|
<span class='kw'>end</span></pre>
|
1514
1499
|
</td>
|
1515
1500
|
</tr>
|
@@ -1519,7 +1504,7 @@
|
|
1519
1504
|
<div class="method_details ">
|
1520
1505
|
<h3 class="signature " id="progress-instance_method">
|
1521
1506
|
|
1522
|
-
- (<tt>String</tt>) <strong>progress</strong>(current, total, type
|
1507
|
+
- (<tt>String</tt>) <strong>progress</strong>(current, total, type: :list, precision: 0)
|
1523
1508
|
|
1524
1509
|
|
1525
1510
|
|
@@ -1574,8 +1559,6 @@
|
|
1574
1559
|
<span class='type'>(<tt>Symbol</tt>)</span>
|
1575
1560
|
|
1576
1561
|
|
1577
|
-
<em class="default">(defaults to: <tt>:list</tt>)</em>
|
1578
|
-
|
1579
1562
|
|
1580
1563
|
—
|
1581
1564
|
<div class='inline'><p>The progress type. Can be <code>:list</code> (e.g. 01/15) or <code>:percentage</code> (e.g. 99.56%).</p>
|
@@ -1591,8 +1574,6 @@
|
|
1591
1574
|
<span class='type'>(<tt>Fixnum</tt>)</span>
|
1592
1575
|
|
1593
1576
|
|
1594
|
-
<em class="default">(defaults to: <tt>0</tt>)</em>
|
1595
|
-
|
1596
1577
|
|
1597
1578
|
—
|
1598
1579
|
<div class='inline'><p>The precision of the percentage to return. <em>Ignored for list progress.</em></p>
|
@@ -1626,30 +1607,26 @@
|
|
1626
1607
|
<pre class="lines">
|
1627
1608
|
|
1628
1609
|
|
1629
|
-
|
1630
|
-
|
1631
|
-
|
1632
|
-
|
1633
|
-
|
1634
|
-
|
1635
|
-
|
1636
|
-
|
1637
|
-
|
1638
|
-
351
|
1639
|
-
352</pre>
|
1610
|
+
381
|
1611
|
+
382
|
1612
|
+
383
|
1613
|
+
384
|
1614
|
+
385
|
1615
|
+
386
|
1616
|
+
387
|
1617
|
+
388
|
1618
|
+
389</pre>
|
1640
1619
|
</td>
|
1641
1620
|
<td>
|
1642
|
-
<pre class="code"><span class="info file"># File 'lib/bovem/console.rb', line
|
1621
|
+
<pre class="code"><span class="info file"># File 'lib/bovem/console.rb', line 381</span>
|
1643
1622
|
|
1644
|
-
<span class='kw'>def</span> <span class='id identifier rubyid_progress'>progress</span><span class='lparen'>(</span><span class='id identifier rubyid_current'>current</span><span class='comma'>,</span> <span class='id identifier rubyid_total'>total</span><span class='comma'>,</span> <span class='
|
1645
|
-
<span class='kw'>if</span> <span class='id identifier rubyid_type'>type</span> <span class='op'>==</span> <span class='symbol'>:list</span>
|
1646
|
-
<span class='
|
1647
|
-
<span class='ivar'>@progress_list_widths</span><span class='lbracket'>[</span><span class='id identifier rubyid_total'>total</span><span class='rbracket'>]</span> <span class='op'>||=</span> <span class='id identifier rubyid_total'>total</span><span class='period'>.</span><span class='id identifier rubyid_to_s'>to_s</span><span class='period'>.</span><span class='id identifier rubyid_length'>length</span>
|
1648
|
-
<span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>%0</span><span class='embexpr_beg'>#{</span><span class='ivar'>@progress_list_widths</span><span class='lbracket'>[</span><span class='id identifier rubyid_total'>total</span><span class='rbracket'>]</span><span class='embexpr_end'>}</span><span class='tstring_content'>d/%d</span><span class='tstring_end'>"</span></span> <span class='op'>%</span> <span class='lbracket'>[</span><span class='id identifier rubyid_current'>current</span><span class='comma'>,</span> <span class='id identifier rubyid_total'>total</span><span class='rbracket'>]</span>
|
1623
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_progress'>progress</span><span class='lparen'>(</span><span class='id identifier rubyid_current'>current</span><span class='comma'>,</span> <span class='id identifier rubyid_total'>total</span><span class='comma'>,</span> <span class='label'>type:</span> <span class='symbol'>:list</span><span class='comma'>,</span> <span class='label'>precision:</span> <span class='int'>0</span><span class='rparen'>)</span>
|
1624
|
+
<span class='kw'>if</span> <span class='id identifier rubyid_type'>type</span> <span class='op'>==</span> <span class='symbol'>:list</span>
|
1625
|
+
<span class='id identifier rubyid_compute_list_progress'>compute_list_progress</span><span class='lparen'>(</span><span class='id identifier rubyid_current'>current</span><span class='comma'>,</span> <span class='id identifier rubyid_total'>total</span><span class='rparen'>)</span>
|
1649
1626
|
<span class='kw'>else</span>
|
1650
1627
|
<span class='id identifier rubyid_precision'>precision</span> <span class='op'>=</span> <span class='lbracket'>[</span><span class='int'>0</span><span class='comma'>,</span> <span class='id identifier rubyid_precision'>precision</span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_max'>max</span>
|
1651
1628
|
<span class='id identifier rubyid_result'>result</span> <span class='op'>=</span> <span class='id identifier rubyid_total'>total</span> <span class='op'>==</span> <span class='int'>0</span> <span class='op'>?</span> <span class='int'>100</span> <span class='op'>:</span> <span class='lparen'>(</span><span class='int'>100</span> <span class='op'>*</span> <span class='lparen'>(</span><span class='id identifier rubyid_current'>current</span><span class='period'>.</span><span class='id identifier rubyid_to_f'>to_f</span> <span class='op'>/</span> <span class='id identifier rubyid_total'>total</span><span class='rparen'>)</span><span class='rparen'>)</span>
|
1652
|
-
<span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>%0.</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_precision'>precision</span><span class='embexpr_end'>}</span><span class='tstring_content'>f %%</span><span class='tstring_end'>"</span></span
|
1629
|
+
<span class='id identifier rubyid_sprintf'>sprintf</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>%0.</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_precision'>precision</span><span class='embexpr_end'>}</span><span class='tstring_content'>f %%</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='id identifier rubyid_result'>result</span><span class='period'>.</span><span class='id identifier rubyid_round'>round</span><span class='lparen'>(</span><span class='id identifier rubyid_precision'>precision</span><span class='rparen'>)</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_rjust'>rjust</span><span class='lparen'>(</span><span class='int'>5</span> <span class='op'>+</span> <span class='lparen'>(</span><span class='id identifier rubyid_precision'>precision</span> <span class='op'>></span> <span class='int'>0</span> <span class='op'>?</span> <span class='id identifier rubyid_precision'>precision</span> <span class='op'>+</span> <span class='int'>1</span> <span class='op'>:</span> <span class='int'>0</span><span class='rparen'>)</span><span class='rparen'>)</span>
|
1653
1630
|
<span class='kw'>end</span>
|
1654
1631
|
<span class='kw'>end</span></pre>
|
1655
1632
|
</td>
|
@@ -1660,7 +1637,7 @@
|
|
1660
1637
|
<div class="method_details ">
|
1661
1638
|
<h3 class="signature " id="status-instance_method">
|
1662
1639
|
|
1663
|
-
- (<tt>Array</tt>) <strong>status</strong>(status, plain
|
1640
|
+
- (<tt>Array</tt>) <strong>status</strong>(status, plain: false, go_up: true, right: true, print: true)
|
1664
1641
|
|
1665
1642
|
|
1666
1643
|
|
@@ -1668,7 +1645,7 @@
|
|
1668
1645
|
|
1669
1646
|
</h3><div class="docstring">
|
1670
1647
|
<div class="discussion">
|
1671
|
-
<p>Writes a status to the output. Valid values are <code>:ok</code>, <code>:pass</code>, <code>:fail</code>, <code>:warn</code>.</p>
|
1648
|
+
<p>Writes a status to the output. Valid values are <code>:ok</code>, <code>:pass</code>, <code>:fail</code>, <code>:warn</code>, <code>skip</code>.</p>
|
1672
1649
|
|
1673
1650
|
|
1674
1651
|
</div>
|
@@ -1700,8 +1677,6 @@
|
|
1700
1677
|
<span class='type'>(<tt>Boolean</tt>)</span>
|
1701
1678
|
|
1702
1679
|
|
1703
|
-
<em class="default">(defaults to: <tt>false</tt>)</em>
|
1704
|
-
|
1705
1680
|
|
1706
1681
|
—
|
1707
1682
|
<div class='inline'><p>If not use colors.</p>
|
@@ -1717,8 +1692,6 @@
|
|
1717
1692
|
<span class='type'>(<tt>Boolean</tt>)</span>
|
1718
1693
|
|
1719
1694
|
|
1720
|
-
<em class="default">(defaults to: <tt>true</tt>)</em>
|
1721
|
-
|
1722
1695
|
|
1723
1696
|
—
|
1724
1697
|
<div class='inline'><p>If go up one line before formatting.</p>
|
@@ -1734,8 +1707,6 @@
|
|
1734
1707
|
<span class='type'>(<tt>Boolean</tt>)</span>
|
1735
1708
|
|
1736
1709
|
|
1737
|
-
<em class="default">(defaults to: <tt>true</tt>)</em>
|
1738
|
-
|
1739
1710
|
|
1740
1711
|
—
|
1741
1712
|
<div class='inline'><p>If to print results on the right.</p>
|
@@ -1751,8 +1722,6 @@
|
|
1751
1722
|
<span class='type'>(<tt>Boolean</tt>)</span>
|
1752
1723
|
|
1753
1724
|
|
1754
|
-
<em class="default">(defaults to: <tt>true</tt>)</em>
|
1755
|
-
|
1756
1725
|
|
1757
1726
|
—
|
1758
1727
|
<div class='inline'><p>If <code>false</code>, the result will be returned instead of be printed.</p>
|
@@ -1786,51 +1755,41 @@
|
|
1786
1755
|
<pre class="lines">
|
1787
1756
|
|
1788
1757
|
|
1789
|
-
|
1790
|
-
|
1791
|
-
|
1792
|
-
|
1793
|
-
|
1794
|
-
|
1795
|
-
|
1796
|
-
|
1797
|
-
|
1798
|
-
|
1799
|
-
|
1800
|
-
|
1801
|
-
|
1802
|
-
|
1803
|
-
|
1804
|
-
|
1805
|
-
|
1806
|
-
|
1807
|
-
313
|
1808
|
-
314
|
1809
|
-
315
|
1810
|
-
316
|
1811
|
-
317</pre>
|
1758
|
+
339
|
1759
|
+
340
|
1760
|
+
341
|
1761
|
+
342
|
1762
|
+
343
|
1763
|
+
344
|
1764
|
+
345
|
1765
|
+
346
|
1766
|
+
347
|
1767
|
+
348
|
1768
|
+
349
|
1769
|
+
350
|
1770
|
+
351
|
1771
|
+
352
|
1772
|
+
353
|
1773
|
+
354
|
1774
|
+
355
|
1775
|
+
356</pre>
|
1812
1776
|
</td>
|
1813
1777
|
<td>
|
1814
|
-
<pre class="code"><span class="info file"># File 'lib/bovem/console.rb', line
|
1815
|
-
|
1816
|
-
<span class='kw'>def</span> <span class='id identifier rubyid_status'>status</span><span class='lparen'>(</span><span class='id identifier rubyid_status'>status</span><span class='comma'>,</span> <span class='
|
1817
|
-
<span class='id identifier rubyid_statuses'>statuses</span> <span class='op'>=</span> <span class='
|
1818
|
-
<span class='label'>ok:</span> <span class='lbrace'>{</span><span class='label'>label:</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'> OK </span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='label'>color:</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>bright green</span><span class='tstring_end'>"</span></span><span class='rbrace'>}</span><span class='comma'>,</span>
|
1819
|
-
<span class='label'>pass:</span> <span class='lbrace'>{</span><span class='label'>label:</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>PASS</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='label'>color:</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>bright cyan</span><span class='tstring_end'>"</span></span><span class='rbrace'>}</span><span class='comma'>,</span>
|
1820
|
-
<span class='label'>warn:</span> <span class='lbrace'>{</span><span class='label'>label:</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>WARN</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='label'>color:</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>bright yellow</span><span class='tstring_end'>"</span></span><span class='rbrace'>}</span><span class='comma'>,</span>
|
1821
|
-
<span class='label'>fail:</span> <span class='lbrace'>{</span><span class='label'>label:</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>FAIL</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='label'>color:</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>bright red</span><span class='tstring_end'>"</span></span><span class='rbrace'>}</span>
|
1822
|
-
<span class='rbrace'>}</span>
|
1778
|
+
<pre class="code"><span class="info file"># File 'lib/bovem/console.rb', line 339</span>
|
1779
|
+
|
1780
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_status'>status</span><span class='lparen'>(</span><span class='id identifier rubyid_status'>status</span><span class='comma'>,</span> <span class='label'>plain:</span> <span class='kw'>false</span><span class='comma'>,</span> <span class='label'>go_up:</span> <span class='kw'>true</span><span class='comma'>,</span> <span class='label'>right:</span> <span class='kw'>true</span><span class='comma'>,</span> <span class='label'>print:</span> <span class='kw'>true</span><span class='rparen'>)</span>
|
1781
|
+
<span class='id identifier rubyid_statuses'>statuses</span> <span class='op'>=</span> <span class='const'>DEFAULT_STATUSES</span><span class='period'>.</span><span class='id identifier rubyid_dup'>dup</span>
|
1823
1782
|
<span class='id identifier rubyid_statuses'>statuses</span><span class='period'>.</span><span class='id identifier rubyid_default'>default</span> <span class='op'>=</span> <span class='id identifier rubyid_statuses'>statuses</span><span class='lbracket'>[</span><span class='symbol'>:ok</span><span class='rbracket'>]</span>
|
1824
1783
|
|
1825
1784
|
<span class='id identifier rubyid_rv'>rv</span> <span class='op'>=</span> <span class='id identifier rubyid_statuses'>statuses</span><span class='lbracket'>[</span><span class='id identifier rubyid_status'>status</span><span class='rbracket'>]</span>
|
1826
1785
|
|
1827
|
-
<span class='kw'>if</span> <span class='id identifier rubyid_print'>print</span>
|
1786
|
+
<span class='kw'>if</span> <span class='id identifier rubyid_print'>print</span>
|
1828
1787
|
<span class='id identifier rubyid_banner'>banner</span> <span class='op'>=</span> <span class='id identifier rubyid_get_banner'>get_banner</span><span class='lparen'>(</span><span class='id identifier rubyid_rv'>rv</span><span class='lbracket'>[</span><span class='symbol'>:label</span><span class='rbracket'>]</span><span class='comma'>,</span> <span class='id identifier rubyid_rv'>rv</span><span class='lbracket'>[</span><span class='symbol'>:color</span><span class='rbracket'>]</span><span class='rparen'>)</span>
|
1829
1788
|
|
1830
|
-
<span class='kw'>if</span> <span class='id identifier rubyid_right'>right</span>
|
1831
|
-
<span class='const'>Kernel</span><span class='period'>.</span><span class='id identifier rubyid_puts'>puts</span><span class='lparen'>(</span><span class='id identifier rubyid_format_right'>format_right</span><span class='lparen'>(</span><span class='id identifier rubyid_banner'>banner</span> <span class='op'>+</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'> </span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='kw'>true</span><span class='comma'>,</span> <span class='id identifier rubyid_go_up'>go_up</span><span class='comma'>,</span> <span class='id identifier rubyid_plain'>plain</span><span class='rparen'>)</span><span class='rparen'>)</span>
|
1789
|
+
<span class='kw'>if</span> <span class='id identifier rubyid_right'>right</span>
|
1790
|
+
<span class='const'>Kernel</span><span class='period'>.</span><span class='id identifier rubyid_puts'>puts</span><span class='lparen'>(</span><span class='id identifier rubyid_format_right'>format_right</span><span class='lparen'>(</span><span class='id identifier rubyid_banner'>banner</span> <span class='op'>+</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'> </span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='label'>width:</span> <span class='kw'>true</span><span class='comma'>,</span> <span class='label'>go_up:</span> <span class='id identifier rubyid_go_up'>go_up</span><span class='comma'>,</span> <span class='label'>plain:</span> <span class='id identifier rubyid_plain'>plain</span><span class='rparen'>)</span><span class='rparen'>)</span>
|
1832
1791
|
<span class='kw'>else</span>
|
1833
|
-
<span class='const'>Kernel</span><span class='period'>.</span><span class='id identifier rubyid_puts'>puts</span><span class='lparen'>(</span><span class='id identifier rubyid_format'>format</span><span class='lparen'>(</span><span class='id identifier rubyid_banner'>banner</span> <span class='op'>+</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'> </span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>\n</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='kw'>true</span><span class='comma'>,</span> <span class='kw'>true</span><span class='comma'>,</span> <span class='id identifier rubyid_plain'>plain</span><span class='rparen'>)</span><span class='rparen'>)</span>
|
1792
|
+
<span class='const'>Kernel</span><span class='period'>.</span><span class='id identifier rubyid_puts'>puts</span><span class='lparen'>(</span><span class='id identifier rubyid_format'>format</span><span class='lparen'>(</span><span class='id identifier rubyid_banner'>banner</span> <span class='op'>+</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'> </span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='label'>suffix:</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>\n</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='label'>indent:</span> <span class='kw'>true</span><span class='comma'>,</span> <span class='label'>wrap:</span> <span class='kw'>true</span><span class='comma'>,</span> <span class='label'>plain:</span> <span class='id identifier rubyid_plain'>plain</span><span class='rparen'>)</span><span class='rparen'>)</span>
|
1834
1793
|
<span class='kw'>end</span>
|
1835
1794
|
<span class='kw'>end</span>
|
1836
1795
|
|
@@ -1844,7 +1803,7 @@
|
|
1844
1803
|
<div class="method_details ">
|
1845
1804
|
<h3 class="signature " id="warn-instance_method">
|
1846
1805
|
|
1847
|
-
- (<tt>Object</tt>) <strong>warn</strong>(message, suffix
|
1806
|
+
- (<tt>Object</tt>) <strong>warn</strong>(message, suffix: "\n", indented: true, wrap: false, plain: false, indented_banner: false, full_colored: false, print: true)
|
1848
1807
|
|
1849
1808
|
|
1850
1809
|
|
@@ -1884,8 +1843,6 @@
|
|
1884
1843
|
<span class='type'>(<tt>Object</tt>)</span>
|
1885
1844
|
|
1886
1845
|
|
1887
|
-
<em class="default">(defaults to: <tt>"\n"</tt>)</em>
|
1888
|
-
|
1889
1846
|
|
1890
1847
|
—
|
1891
1848
|
<div class='inline'><p>If not <code>nil</code> or <code>false</code>, a suffix to add to the message. <code>true</code> means to add <code>\n</code>.</p>
|
@@ -1895,17 +1852,16 @@
|
|
1895
1852
|
|
1896
1853
|
<li>
|
1897
1854
|
|
1898
|
-
<span class='name'>
|
1855
|
+
<span class='name'>indented</span>
|
1899
1856
|
|
1900
1857
|
|
1901
1858
|
<span class='type'>(<tt>Object</tt>)</span>
|
1902
1859
|
|
1903
1860
|
|
1904
|
-
<em class="default">(defaults to: <tt>true</tt>)</em>
|
1905
|
-
|
1906
1861
|
|
1907
1862
|
—
|
1908
|
-
<div class='inline'><p>If not <code>nil</code> or <code>false</code>, the width to use for indentation. <code>true</code> means to use the current indentation,
|
1863
|
+
<div class='inline'><p>If not <code>nil</code> or <code>false</code>, the width to use for indentation. <code>true</code> means to use the current indentation,
|
1864
|
+
a negative value of <code>-x</code> will indent of <code>x</code> absolute spaces.</p>
|
1909
1865
|
</div>
|
1910
1866
|
|
1911
1867
|
</li>
|
@@ -1918,8 +1874,6 @@
|
|
1918
1874
|
<span class='type'>(<tt>Object</tt>)</span>
|
1919
1875
|
|
1920
1876
|
|
1921
|
-
<em class="default">(defaults to: <tt>false</tt>)</em>
|
1922
|
-
|
1923
1877
|
|
1924
1878
|
—
|
1925
1879
|
<div class='inline'><p>If not <code>nil</code> or <code>false</code>, the maximum length of a line for wrapped text. <code>true</code> means the current line width.</p>
|
@@ -1935,8 +1889,6 @@
|
|
1935
1889
|
<span class='type'>(<tt>Boolean</tt>)</span>
|
1936
1890
|
|
1937
1891
|
|
1938
|
-
<em class="default">(defaults to: <tt>false</tt>)</em>
|
1939
|
-
|
1940
1892
|
|
1941
1893
|
—
|
1942
1894
|
<div class='inline'><p>If ignore color markers into the message.</p>
|
@@ -1952,8 +1904,6 @@
|
|
1952
1904
|
<span class='type'>(<tt>Boolean</tt>)</span>
|
1953
1905
|
|
1954
1906
|
|
1955
|
-
<em class="default">(defaults to: <tt>false</tt>)</em>
|
1956
|
-
|
1957
1907
|
|
1958
1908
|
—
|
1959
1909
|
<div class='inline'><p>If also the banner should be indented.</p>
|
@@ -1969,8 +1919,6 @@
|
|
1969
1919
|
<span class='type'>(<tt>Boolean</tt>)</span>
|
1970
1920
|
|
1971
1921
|
|
1972
|
-
<em class="default">(defaults to: <tt>false</tt>)</em>
|
1973
|
-
|
1974
1922
|
|
1975
1923
|
—
|
1976
1924
|
<div class='inline'><p>If the banner should be fully colored.</p>
|
@@ -1986,8 +1934,6 @@
|
|
1986
1934
|
<span class='type'>(<tt>Boolean</tt>)</span>
|
1987
1935
|
|
1988
1936
|
|
1989
|
-
<em class="default">(defaults to: <tt>true</tt>)</em>
|
1990
|
-
|
1991
1937
|
|
1992
1938
|
—
|
1993
1939
|
<div class='inline'><p>If <code>false</code>, the result will be returned instead of be printed.</p>
|
@@ -2011,17 +1957,35 @@
|
|
2011
1957
|
<pre class="lines">
|
2012
1958
|
|
2013
1959
|
|
2014
|
-
|
2015
|
-
|
2016
|
-
|
2017
|
-
|
1960
|
+
491
|
1961
|
+
492
|
1962
|
+
493
|
1963
|
+
494
|
1964
|
+
495
|
1965
|
+
496
|
1966
|
+
497
|
1967
|
+
498
|
1968
|
+
499
|
1969
|
+
500
|
1970
|
+
501
|
1971
|
+
502
|
1972
|
+
503</pre>
|
2018
1973
|
</td>
|
2019
1974
|
<td>
|
2020
|
-
<pre class="code"><span class="info file"># File 'lib/bovem/console.rb', line
|
2021
|
-
|
2022
|
-
<span class='kw'>def</span> <span class='id identifier rubyid_warn'>warn</span><span class='lparen'>(</span><span class='id identifier rubyid_message'>message</span><span class='comma'>,</span> <span class='
|
2023
|
-
<span class='id identifier
|
2024
|
-
|
1975
|
+
<pre class="code"><span class="info file"># File 'lib/bovem/console.rb', line 491</span>
|
1976
|
+
|
1977
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_warn'>warn</span><span class='lparen'>(</span><span class='id identifier rubyid_message'>message</span><span class='comma'>,</span> <span class='label'>suffix:</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>\n</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='label'>indented:</span> <span class='kw'>true</span><span class='comma'>,</span> <span class='label'>wrap:</span> <span class='kw'>false</span><span class='comma'>,</span> <span class='label'>plain:</span> <span class='kw'>false</span><span class='comma'>,</span> <span class='label'>indented_banner:</span> <span class='kw'>false</span><span class='comma'>,</span> <span class='label'>full_colored:</span> <span class='kw'>false</span><span class='comma'>,</span> <span class='label'>print:</span> <span class='kw'>true</span><span class='rparen'>)</span>
|
1978
|
+
<span class='id identifier rubyid_info'>info</span><span class='lparen'>(</span>
|
1979
|
+
<span class='id identifier rubyid_message'>message</span><span class='comma'>,</span>
|
1980
|
+
<span class='label'>suffix:</span> <span class='id identifier rubyid_suffix'>suffix</span><span class='comma'>,</span>
|
1981
|
+
<span class='label'>indented:</span> <span class='id identifier rubyid_indented'>indented</span><span class='comma'>,</span>
|
1982
|
+
<span class='label'>wrap:</span> <span class='id identifier rubyid_wrap'>wrap</span><span class='comma'>,</span>
|
1983
|
+
<span class='label'>plain:</span> <span class='id identifier rubyid_plain'>plain</span><span class='comma'>,</span>
|
1984
|
+
<span class='label'>indented_banner:</span> <span class='id identifier rubyid_indented_banner'>indented_banner</span><span class='comma'>,</span>
|
1985
|
+
<span class='label'>full_colored:</span> <span class='id identifier rubyid_full_colored'>full_colored</span><span class='comma'>,</span>
|
1986
|
+
<span class='label'>print:</span> <span class='id identifier rubyid_print'>print</span><span class='comma'>,</span>
|
1987
|
+
<span class='label'>banner:</span> <span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>W</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>bright yellow</span><span class='tstring_end'>"</span></span><span class='rbracket'>]</span>
|
1988
|
+
<span class='rparen'>)</span>
|
2025
1989
|
<span class='kw'>end</span></pre>
|
2026
1990
|
</td>
|
2027
1991
|
</tr>
|
@@ -2031,7 +1995,7 @@
|
|
2031
1995
|
<div class="method_details ">
|
2032
1996
|
<h3 class="signature " id="write-instance_method">
|
2033
1997
|
|
2034
|
-
- (<tt>String</tt>) <strong>write</strong>(message, suffix
|
1998
|
+
- (<tt>String</tt>) <strong>write</strong>(message, suffix: "\n", indented: true, wrap: false, plain: false, print: true)
|
2035
1999
|
|
2036
2000
|
|
2037
2001
|
|
@@ -2071,8 +2035,6 @@
|
|
2071
2035
|
<span class='type'>(<tt>Object</tt>)</span>
|
2072
2036
|
|
2073
2037
|
|
2074
|
-
<em class="default">(defaults to: <tt>"\n"</tt>)</em>
|
2075
|
-
|
2076
2038
|
|
2077
2039
|
—
|
2078
2040
|
<div class='inline'><p>If not <code>nil</code> or <code>false</code>, a suffix to add to the message. <code>true</code> means to add <code>\n</code>.</p>
|
@@ -2082,17 +2044,16 @@
|
|
2082
2044
|
|
2083
2045
|
<li>
|
2084
2046
|
|
2085
|
-
<span class='name'>
|
2047
|
+
<span class='name'>indented</span>
|
2086
2048
|
|
2087
2049
|
|
2088
2050
|
<span class='type'>(<tt>Object</tt>)</span>
|
2089
2051
|
|
2090
2052
|
|
2091
|
-
<em class="default">(defaults to: <tt>true</tt>)</em>
|
2092
|
-
|
2093
2053
|
|
2094
2054
|
—
|
2095
|
-
<div class='inline'><p>If not <code>nil</code> or <code>false</code>, the width to use for indentation. <code>true</code> means to use the current indentation,
|
2055
|
+
<div class='inline'><p>If not <code>nil</code> or <code>false</code>, the width to use for indentation. <code>true</code> means to use the current indentation,
|
2056
|
+
a negative value of <code>-x</code> will indent of <code>x</code> absolute spaces.</p>
|
2096
2057
|
</div>
|
2097
2058
|
|
2098
2059
|
</li>
|
@@ -2105,8 +2066,6 @@
|
|
2105
2066
|
<span class='type'>(<tt>Object</tt>)</span>
|
2106
2067
|
|
2107
2068
|
|
2108
|
-
<em class="default">(defaults to: <tt>false</tt>)</em>
|
2109
|
-
|
2110
2069
|
|
2111
2070
|
—
|
2112
2071
|
<div class='inline'><p>If not <code>nil</code> or <code>false</code>, the maximum length of a line for wrapped text. <code>true</code> means the current line width.</p>
|
@@ -2122,8 +2081,6 @@
|
|
2122
2081
|
<span class='type'>(<tt>Boolean</tt>)</span>
|
2123
2082
|
|
2124
2083
|
|
2125
|
-
<em class="default">(defaults to: <tt>false</tt>)</em>
|
2126
|
-
|
2127
2084
|
|
2128
2085
|
—
|
2129
2086
|
<div class='inline'><p>If ignore color markers into the message.</p>
|
@@ -2139,8 +2096,6 @@
|
|
2139
2096
|
<span class='type'>(<tt>Boolean</tt>)</span>
|
2140
2097
|
|
2141
2098
|
|
2142
|
-
<em class="default">(defaults to: <tt>true</tt>)</em>
|
2143
|
-
|
2144
2099
|
|
2145
2100
|
—
|
2146
2101
|
<div class='inline'><p>If <code>false</code>, the result will be returned instead of be printed.</p>
|
@@ -2181,17 +2136,17 @@
|
|
2181
2136
|
<pre class="lines">
|
2182
2137
|
|
2183
2138
|
|
2184
|
-
|
2185
|
-
|
2186
|
-
|
2187
|
-
|
2188
|
-
|
2139
|
+
302
|
2140
|
+
303
|
2141
|
+
304
|
2142
|
+
305
|
2143
|
+
306</pre>
|
2189
2144
|
</td>
|
2190
2145
|
<td>
|
2191
|
-
<pre class="code"><span class="info file"># File 'lib/bovem/console.rb', line
|
2146
|
+
<pre class="code"><span class="info file"># File 'lib/bovem/console.rb', line 302</span>
|
2192
2147
|
|
2193
|
-
<span class='kw'>def</span> <span class='id identifier rubyid_write'>write</span><span class='lparen'>(</span><span class='id identifier rubyid_message'>message</span><span class='comma'>,</span> <span class='
|
2194
|
-
<span class='id identifier rubyid_rv'>rv</span> <span class='op'>=</span> <span class='id identifier rubyid_format'>format</span><span class='lparen'>(</span><span class='id identifier rubyid_message'>message</span><span class='comma'>,</span> <span class='id identifier rubyid_suffix'>suffix</span><span class='comma'>,</span> <span class='id identifier
|
2148
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_write'>write</span><span class='lparen'>(</span><span class='id identifier rubyid_message'>message</span><span class='comma'>,</span> <span class='label'>suffix:</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>\n</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='label'>indented:</span> <span class='kw'>true</span><span class='comma'>,</span> <span class='label'>wrap:</span> <span class='kw'>false</span><span class='comma'>,</span> <span class='label'>plain:</span> <span class='kw'>false</span><span class='comma'>,</span> <span class='label'>print:</span> <span class='kw'>true</span><span class='rparen'>)</span>
|
2149
|
+
<span class='id identifier rubyid_rv'>rv</span> <span class='op'>=</span> <span class='id identifier rubyid_format'>format</span><span class='lparen'>(</span><span class='id identifier rubyid_message'>message</span><span class='comma'>,</span> <span class='label'>suffix:</span> <span class='id identifier rubyid_suffix'>suffix</span><span class='comma'>,</span> <span class='label'>indented:</span> <span class='id identifier rubyid_indented'>indented</span><span class='comma'>,</span> <span class='label'>wrap:</span> <span class='id identifier rubyid_wrap'>wrap</span><span class='comma'>,</span> <span class='label'>plain:</span> <span class='id identifier rubyid_plain'>plain</span><span class='rparen'>)</span>
|
2195
2150
|
<span class='const'>Kernel</span><span class='period'>.</span><span class='id identifier rubyid_puts'>puts</span><span class='lparen'>(</span><span class='id identifier rubyid_rv'>rv</span><span class='rparen'>)</span> <span class='kw'>if</span> <span class='id identifier rubyid_print'>print</span>
|
2196
2151
|
<span class='id identifier rubyid_rv'>rv</span>
|
2197
2152
|
<span class='kw'>end</span></pre>
|
@@ -2203,7 +2158,7 @@
|
|
2203
2158
|
<div class="method_details ">
|
2204
2159
|
<h3 class="signature " id="write_banner_aligned-instance_method">
|
2205
2160
|
|
2206
|
-
- (<tt>String</tt>) <strong>write_banner_aligned</strong>(message, suffix
|
2161
|
+
- (<tt>String</tt>) <strong>write_banner_aligned</strong>(message, suffix: "\n", indented: true, wrap: false, plain: false, print: true)
|
2207
2162
|
|
2208
2163
|
|
2209
2164
|
|
@@ -2243,8 +2198,6 @@
|
|
2243
2198
|
<span class='type'>(<tt>Object</tt>)</span>
|
2244
2199
|
|
2245
2200
|
|
2246
|
-
<em class="default">(defaults to: <tt>"\n"</tt>)</em>
|
2247
|
-
|
2248
2201
|
|
2249
2202
|
—
|
2250
2203
|
<div class='inline'><p>If not <code>nil</code> or <code>false</code>, a suffix to add to the message. <code>true</code> means to add <code>\n</code>.</p>
|
@@ -2254,17 +2207,16 @@
|
|
2254
2207
|
|
2255
2208
|
<li>
|
2256
2209
|
|
2257
|
-
<span class='name'>
|
2210
|
+
<span class='name'>indented</span>
|
2258
2211
|
|
2259
2212
|
|
2260
2213
|
<span class='type'>(<tt>Object</tt>)</span>
|
2261
2214
|
|
2262
2215
|
|
2263
|
-
<em class="default">(defaults to: <tt>true</tt>)</em>
|
2264
|
-
|
2265
2216
|
|
2266
2217
|
—
|
2267
|
-
<div class='inline'><p>If not <code>nil</code> or <code>false</code>, the width to use for indentation. <code>true</code> means to use the current indentation,
|
2218
|
+
<div class='inline'><p>If not <code>nil</code> or <code>false</code>, the width to use for indentation. <code>true</code> means to use the current indentation,
|
2219
|
+
a negative value of <code>-x</code> will indent of <code>x</code> absolute spaces.</p>
|
2268
2220
|
</div>
|
2269
2221
|
|
2270
2222
|
</li>
|
@@ -2277,8 +2229,6 @@
|
|
2277
2229
|
<span class='type'>(<tt>Object</tt>)</span>
|
2278
2230
|
|
2279
2231
|
|
2280
|
-
<em class="default">(defaults to: <tt>false</tt>)</em>
|
2281
|
-
|
2282
2232
|
|
2283
2233
|
—
|
2284
2234
|
<div class='inline'><p>If not <code>nil</code> or <code>false</code>, the maximum length of a line for wrapped text. <code>true</code> means the current line width.</p>
|
@@ -2294,8 +2244,6 @@
|
|
2294
2244
|
<span class='type'>(<tt>Boolean</tt>)</span>
|
2295
2245
|
|
2296
2246
|
|
2297
|
-
<em class="default">(defaults to: <tt>false</tt>)</em>
|
2298
|
-
|
2299
2247
|
|
2300
2248
|
—
|
2301
2249
|
<div class='inline'><p>If ignore color markers into the message.</p>
|
@@ -2311,8 +2259,6 @@
|
|
2311
2259
|
<span class='type'>(<tt>Boolean</tt>)</span>
|
2312
2260
|
|
2313
2261
|
|
2314
|
-
<em class="default">(defaults to: <tt>true</tt>)</em>
|
2315
|
-
|
2316
2262
|
|
2317
2263
|
—
|
2318
2264
|
<div class='inline'><p>If <code>false</code>, the result will be returned instead of be printed.</p>
|
@@ -2353,15 +2299,29 @@
|
|
2353
2299
|
<pre class="lines">
|
2354
2300
|
|
2355
2301
|
|
2356
|
-
|
2357
|
-
|
2358
|
-
|
2302
|
+
320
|
2303
|
+
321
|
2304
|
+
322
|
2305
|
+
323
|
2306
|
+
324
|
2307
|
+
325
|
2308
|
+
326
|
2309
|
+
327
|
2310
|
+
328
|
2311
|
+
329</pre>
|
2359
2312
|
</td>
|
2360
2313
|
<td>
|
2361
|
-
<pre class="code"><span class="info file"># File 'lib/bovem/console.rb', line
|
2362
|
-
|
2363
|
-
<span class='kw'>def</span> <span class='id identifier rubyid_write_banner_aligned'>write_banner_aligned</span><span class='lparen'>(</span><span class='id identifier rubyid_message'>message</span><span class='comma'>,</span> <span class='
|
2364
|
-
<span class='id identifier rubyid_write'>write</span><span class='lparen'>(</span
|
2314
|
+
<pre class="code"><span class="info file"># File 'lib/bovem/console.rb', line 320</span>
|
2315
|
+
|
2316
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_write_banner_aligned'>write_banner_aligned</span><span class='lparen'>(</span><span class='id identifier rubyid_message'>message</span><span class='comma'>,</span> <span class='label'>suffix:</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>\n</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='label'>indented:</span> <span class='kw'>true</span><span class='comma'>,</span> <span class='label'>wrap:</span> <span class='kw'>false</span><span class='comma'>,</span> <span class='label'>plain:</span> <span class='kw'>false</span><span class='comma'>,</span> <span class='label'>print:</span> <span class='kw'>true</span><span class='rparen'>)</span>
|
2317
|
+
<span class='id identifier rubyid_write'>write</span><span class='lparen'>(</span>
|
2318
|
+
<span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'> </span><span class='tstring_end'>"</span></span> <span class='op'>*</span> <span class='lparen'>(</span><span class='const'>Bovem</span><span class='op'>::</span><span class='const'>Console</span><span class='period'>.</span><span class='id identifier rubyid_min_banner_length'>min_banner_length</span> <span class='op'>+</span> <span class='int'>3</span><span class='rparen'>)</span><span class='rparen'>)</span> <span class='op'>+</span> <span class='id identifier rubyid_message'>message</span><span class='period'>.</span><span class='id identifier rubyid_ensure_string'>ensure_string</span><span class='comma'>,</span>
|
2319
|
+
<span class='label'>suffix:</span> <span class='id identifier rubyid_suffix'>suffix</span><span class='comma'>,</span>
|
2320
|
+
<span class='label'>indented:</span> <span class='id identifier rubyid_indented'>indented</span><span class='comma'>,</span>
|
2321
|
+
<span class='label'>wrap:</span> <span class='id identifier rubyid_wrap'>wrap</span><span class='comma'>,</span>
|
2322
|
+
<span class='label'>plain:</span> <span class='id identifier rubyid_plain'>plain</span><span class='comma'>,</span>
|
2323
|
+
<span class='label'>print:</span> <span class='id identifier rubyid_print'>print</span>
|
2324
|
+
<span class='rparen'>)</span>
|
2365
2325
|
<span class='kw'>end</span></pre>
|
2366
2326
|
</td>
|
2367
2327
|
</tr>
|
@@ -2373,9 +2333,9 @@
|
|
2373
2333
|
</div>
|
2374
2334
|
|
2375
2335
|
<div id="footer">
|
2376
|
-
Generated on
|
2336
|
+
Generated on Tue Mar 29 20:43:16 2016 by
|
2377
2337
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
2378
|
-
0.8.7.
|
2338
|
+
0.8.7.6 (ruby-2.3.0).
|
2379
2339
|
</div>
|
2380
2340
|
|
2381
2341
|
</body>
|