bovem 1.2.6 → 2.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (50) hide show
  1. data/.travis.yml +1 -1
  2. data/Gemfile +1 -1
  3. data/README.md +5 -2
  4. data/bovem.gemspec +11 -9
  5. data/doc/Bovem.html +7 -25
  6. data/doc/Bovem/Configuration.html +30 -43
  7. data/doc/Bovem/Console.html +225 -4360
  8. data/doc/Bovem/ConsoleMethods.html +125 -0
  9. data/doc/Bovem/ConsoleMethods/Interactions.html +575 -0
  10. data/doc/Bovem/ConsoleMethods/Interactions/ClassMethods.html +231 -0
  11. data/doc/Bovem/ConsoleMethods/Logging.html +2218 -0
  12. data/doc/Bovem/ConsoleMethods/Logging/ClassMethods.html +212 -0
  13. data/doc/Bovem/ConsoleMethods/Output.html +1213 -0
  14. data/doc/Bovem/ConsoleMethods/StyleHandling.html +274 -0
  15. data/doc/Bovem/ConsoleMethods/StyleHandling/ClassMethods.html +653 -0
  16. data/doc/Bovem/Errors.html +3 -3
  17. data/doc/Bovem/Errors/InvalidConfiguration.html +3 -3
  18. data/doc/Bovem/Errors/InvalidLogger.html +3 -3
  19. data/doc/Bovem/Logger.html +112 -12
  20. data/doc/Bovem/Shell.html +58 -1888
  21. data/doc/Bovem/ShellMethods.html +125 -0
  22. data/doc/Bovem/ShellMethods/Directories.html +484 -0
  23. data/doc/Bovem/ShellMethods/Execute.html +565 -0
  24. data/doc/Bovem/ShellMethods/General.html +450 -0
  25. data/doc/Bovem/ShellMethods/Read.html +451 -0
  26. data/doc/Bovem/ShellMethods/Write.html +676 -0
  27. data/doc/Bovem/Version.html +6 -6
  28. data/doc/_index.html +145 -4
  29. data/doc/class_list.html +1 -1
  30. data/doc/file.README.html +10 -7
  31. data/doc/frames.html +1 -1
  32. data/doc/index.html +10 -7
  33. data/doc/method_list.html +119 -79
  34. data/doc/top-level-namespace.html +3 -3
  35. data/lib/bovem.rb +1 -1
  36. data/lib/bovem/configuration.rb +24 -13
  37. data/lib/bovem/console.rb +566 -497
  38. data/lib/bovem/errors.rb +1 -1
  39. data/lib/bovem/logger.rb +4 -4
  40. data/lib/bovem/shell.rb +482 -305
  41. data/lib/bovem/version.rb +4 -4
  42. data/locales/en.yml +43 -0
  43. data/locales/it.yml +43 -0
  44. data/spec/bovem/configuration_spec.rb +3 -3
  45. data/spec/bovem/console_spec.rb +17 -10
  46. data/spec/bovem/logger_spec.rb +1 -1
  47. data/spec/bovem/shell_spec.rb +9 -5
  48. data/spec/coverage_helper.rb +1 -1
  49. data/spec/spec_helper.rb +1 -1
  50. metadata +32 -22
@@ -0,0 +1,231 @@
1
+ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
2
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3
+ <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
4
+ <head>
5
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
6
+ <title>
7
+ Module: Bovem::ConsoleMethods::Interactions::ClassMethods
8
+
9
+ &mdash; Documentation by YARD 0.8.3
10
+
11
+ </title>
12
+
13
+ <link rel="stylesheet" href="../../../css/style.css" type="text/css" media="screen" charset="utf-8" />
14
+
15
+ <link rel="stylesheet" href="../../../css/common.css" type="text/css" media="screen" charset="utf-8" />
16
+
17
+ <script type="text/javascript" charset="utf-8">
18
+ hasFrames = window.top.frames.main ? true : false;
19
+ relpath = '../../../';
20
+ framesUrl = "../../../frames.html#!" + escape(window.location.href);
21
+ </script>
22
+
23
+
24
+ <script type="text/javascript" charset="utf-8" src="../../../js/jquery.js"></script>
25
+
26
+ <script type="text/javascript" charset="utf-8" src="../../../js/app.js"></script>
27
+
28
+
29
+ </head>
30
+ <body>
31
+ <div id="header">
32
+ <div id="menu">
33
+
34
+ <a href="../../../_index.html">Index (C)</a> &raquo;
35
+ <span class='title'><span class='object_link'><a href="../../../Bovem.html" title="Bovem (module)">Bovem</a></span></span> &raquo; <span class='title'><span class='object_link'><a href="../../ConsoleMethods.html" title="Bovem::ConsoleMethods (module)">ConsoleMethods</a></span></span> &raquo; <span class='title'><span class='object_link'><a href="../Interactions.html" title="Bovem::ConsoleMethods::Interactions (module)">Interactions</a></span></span>
36
+ &raquo;
37
+ <span class="title">ClassMethods</span>
38
+
39
+
40
+ <div class="noframes"><span class="title">(</span><a href="." target="_top">no frames</a><span class="title">)</span></div>
41
+ </div>
42
+
43
+ <div id="search">
44
+
45
+ <a class="full_list_link" id="class_list_link"
46
+ href="../../../class_list.html">
47
+ Class List
48
+ </a>
49
+
50
+ <a class="full_list_link" id="method_list_link"
51
+ href="../../../method_list.html">
52
+ Method List
53
+ </a>
54
+
55
+ <a class="full_list_link" id="file_list_link"
56
+ href="../../../file_list.html">
57
+ File List
58
+ </a>
59
+
60
+ </div>
61
+ <div class="clear"></div>
62
+ </div>
63
+
64
+ <iframe id="search_frame"></iframe>
65
+
66
+ <div id="content"><h1>Module: Bovem::ConsoleMethods::Interactions::ClassMethods
67
+
68
+
69
+
70
+ </h1>
71
+
72
+ <dl class="box">
73
+
74
+
75
+
76
+
77
+
78
+
79
+
80
+
81
+ <dt class="r1 last">Defined in:</dt>
82
+ <dd class="r1 last">lib/bovem/console.rb</dd>
83
+
84
+ </dl>
85
+ <div class="clear"></div>
86
+
87
+ <h2>Overview</h2><div class="docstring">
88
+ <div class="discussion">
89
+ <p>Class methods to interact with the user and other processes.</p>
90
+
91
+
92
+ </div>
93
+ </div>
94
+ <div class="tags">
95
+
96
+
97
+ </div>
98
+
99
+
100
+
101
+
102
+
103
+
104
+
105
+ <h2>
106
+ Instance Method Summary
107
+ <small>(<a href="#" class="summary_toggle">collapse</a>)</small>
108
+ </h2>
109
+
110
+ <ul class="summary">
111
+
112
+ <li class="public ">
113
+ <span class="summary_signature">
114
+
115
+ <a href="#execute-instance_method" title="#execute (instance method)">- (String) <strong>execute</strong>(command) </a>
116
+
117
+
118
+
119
+ </span>
120
+
121
+
122
+
123
+
124
+
125
+
126
+
127
+
128
+
129
+ <span class="summary_desc"><div class='inline'><p>Executes a command and returns its output.</p>
130
+ </div></span>
131
+
132
+ </li>
133
+
134
+
135
+ </ul>
136
+
137
+
138
+
139
+
140
+ <div id="instance_method_details" class="method_details_list">
141
+ <h2>Instance Method Details</h2>
142
+
143
+
144
+ <div class="method_details first">
145
+ <h3 class="signature first" id="execute-instance_method">
146
+
147
+ - (<tt>String</tt>) <strong>execute</strong>(command)
148
+
149
+
150
+
151
+
152
+
153
+ </h3><div class="docstring">
154
+ <div class="discussion">
155
+ <p>Executes a command and returns its output.</p>
156
+
157
+
158
+ </div>
159
+ </div>
160
+ <div class="tags">
161
+ <p class="tag_title">Parameters:</p>
162
+ <ul class="param">
163
+
164
+ <li>
165
+
166
+ <span class='name'>command</span>
167
+
168
+
169
+ <span class='type'>(<tt>String</tt>)</span>
170
+
171
+
172
+
173
+ &mdash;
174
+ <div class='inline'><p>The command to execute.</p>
175
+ </div>
176
+
177
+ </li>
178
+
179
+ </ul>
180
+
181
+ <p class="tag_title">Returns:</p>
182
+ <ul class="return">
183
+
184
+ <li>
185
+
186
+
187
+ <span class='type'>(<tt>String</tt>)</span>
188
+
189
+
190
+
191
+ &mdash;
192
+ <div class='inline'><p>The command&#39;s output.</p>
193
+ </div>
194
+
195
+ </li>
196
+
197
+ </ul>
198
+
199
+ </div><table class="source_code">
200
+ <tr>
201
+ <td>
202
+ <pre class="lines">
203
+
204
+
205
+ 458
206
+ 459
207
+ 460</pre>
208
+ </td>
209
+ <td>
210
+ <pre class="code"><span class="info file"># File 'lib/bovem/console.rb', line 458</span>
211
+
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'>%x{</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_command'>command</span><span class='rbrace'>}</span><span class='tstring_end'>}</span></span>
214
+ <span class='kw'>end</span></pre>
215
+ </td>
216
+ </tr>
217
+ </table>
218
+ </div>
219
+
220
+ </div>
221
+
222
+ </div>
223
+
224
+ <div id="footer">
225
+ Generated on Fri Feb 1 23:40:18 2013 by
226
+ <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
227
+ 0.8.3 (ruby-1.9.3).
228
+ </div>
229
+
230
+ </body>
231
+ </html>
@@ -0,0 +1,2218 @@
1
+ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
2
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3
+ <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
4
+ <head>
5
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
6
+ <title>
7
+ Module: Bovem::ConsoleMethods::Logging
8
+
9
+ &mdash; Documentation by YARD 0.8.3
10
+
11
+ </title>
12
+
13
+ <link rel="stylesheet" href="../../css/style.css" type="text/css" media="screen" charset="utf-8" />
14
+
15
+ <link rel="stylesheet" href="../../css/common.css" type="text/css" media="screen" charset="utf-8" />
16
+
17
+ <script type="text/javascript" charset="utf-8">
18
+ hasFrames = window.top.frames.main ? true : false;
19
+ relpath = '../../';
20
+ framesUrl = "../../frames.html#!" + escape(window.location.href);
21
+ </script>
22
+
23
+
24
+ <script type="text/javascript" charset="utf-8" src="../../js/jquery.js"></script>
25
+
26
+ <script type="text/javascript" charset="utf-8" src="../../js/app.js"></script>
27
+
28
+
29
+ </head>
30
+ <body>
31
+ <div id="header">
32
+ <div id="menu">
33
+
34
+ <a href="../../_index.html">Index (L)</a> &raquo;
35
+ <span class='title'><span class='object_link'><a href="../../Bovem.html" title="Bovem (module)">Bovem</a></span></span> &raquo; <span class='title'><span class='object_link'><a href="../ConsoleMethods.html" title="Bovem::ConsoleMethods (module)">ConsoleMethods</a></span></span>
36
+ &raquo;
37
+ <span class="title">Logging</span>
38
+
39
+
40
+ <div class="noframes"><span class="title">(</span><a href="." target="_top">no frames</a><span class="title">)</span></div>
41
+ </div>
42
+
43
+ <div id="search">
44
+
45
+ <a class="full_list_link" id="class_list_link"
46
+ href="../../class_list.html">
47
+ Class List
48
+ </a>
49
+
50
+ <a class="full_list_link" id="method_list_link"
51
+ href="../../method_list.html">
52
+ Method List
53
+ </a>
54
+
55
+ <a class="full_list_link" id="file_list_link"
56
+ href="../../file_list.html">
57
+ File List
58
+ </a>
59
+
60
+ </div>
61
+ <div class="clear"></div>
62
+ </div>
63
+
64
+ <iframe id="search_frame"></iframe>
65
+
66
+ <div id="content"><h1>Module: Bovem::ConsoleMethods::Logging
67
+
68
+
69
+
70
+ </h1>
71
+
72
+ <dl class="box">
73
+
74
+
75
+
76
+ <dt class="r1">Extended by:</dt>
77
+ <dd class="r1">ActiveSupport::Concern</dd>
78
+
79
+
80
+
81
+
82
+
83
+
84
+ <dt class="r2">Included in:</dt>
85
+ <dd class="r2"><span class='object_link'><a href="../Console.html" title="Bovem::Console (class)">Bovem::Console</a></span></dd>
86
+
87
+
88
+
89
+ <dt class="r1 last">Defined in:</dt>
90
+ <dd class="r1 last">lib/bovem/console.rb</dd>
91
+
92
+ </dl>
93
+ <div class="clear"></div>
94
+
95
+ <h2>Overview</h2><div class="docstring">
96
+ <div class="discussion">
97
+ <p>Methods for logging activities to the user.</p>
98
+
99
+
100
+ </div>
101
+ </div>
102
+ <div class="tags">
103
+
104
+
105
+ </div><h2>Defined Under Namespace</h2>
106
+ <p class="children">
107
+
108
+
109
+ <strong class="modules">Modules:</strong> <span class='object_link'><a href="Logging/ClassMethods.html" title="Bovem::ConsoleMethods::Logging::ClassMethods (module)">ClassMethods</a></span>
110
+
111
+
112
+
113
+
114
+ </p>
115
+
116
+
117
+
118
+
119
+
120
+
121
+
122
+
123
+ <h2>
124
+ Instance Method Summary
125
+ <small>(<a href="#" class="summary_toggle">collapse</a>)</small>
126
+ </h2>
127
+
128
+ <ul class="summary">
129
+
130
+ <li class="public ">
131
+ <span class="summary_signature">
132
+
133
+ <a href="#begin-instance_method" title="#begin (instance method)">- (Object) <strong>begin</strong>(message, suffix = &quot;\n&quot;, indent = true, wrap = false, plain = false, indented_banner = false, full_colored = false, print = true) </a>
134
+
135
+
136
+
137
+ </span>
138
+
139
+
140
+
141
+
142
+
143
+
144
+
145
+
146
+
147
+ <span class="summary_desc"><div class='inline'><p>Writes a message prepending a green banner.</p>
148
+ </div></span>
149
+
150
+ </li>
151
+
152
+
153
+ <li class="public ">
154
+ <span class="summary_signature">
155
+
156
+ <a href="#debug-instance_method" title="#debug (instance method)">- (Object) <strong>debug</strong>(message, suffix = &quot;\n&quot;, indent = true, wrap = false, plain = false, indented_banner = false, full_colored = false, print = true) </a>
157
+
158
+
159
+
160
+ </span>
161
+
162
+
163
+
164
+
165
+
166
+
167
+
168
+
169
+
170
+ <span class="summary_desc"><div class='inline'><p>Writes a message prepending a magenta banner.</p>
171
+ </div></span>
172
+
173
+ </li>
174
+
175
+
176
+ <li class="public ">
177
+ <span class="summary_signature">
178
+
179
+ <a href="#error-instance_method" title="#error (instance method)">- (Object) <strong>error</strong>(message, suffix = &quot;\n&quot;, indent = true, wrap = false, plain = false, indented_banner = false, full_colored = false, print = true) </a>
180
+
181
+
182
+
183
+ </span>
184
+
185
+
186
+
187
+
188
+
189
+
190
+
191
+
192
+
193
+ <span class="summary_desc"><div class='inline'><p>Writes a message prepending a red banner.</p>
194
+ </div></span>
195
+
196
+ </li>
197
+
198
+
199
+ <li class="public ">
200
+ <span class="summary_signature">
201
+
202
+ <a href="#fatal-instance_method" title="#fatal (instance method)">- (Object) <strong>fatal</strong>(message, suffix = &quot;\n&quot;, indent = true, wrap = false, plain = false, indented_banner = false, full_colored = false, return_code = -1,, print = true) </a>
203
+
204
+
205
+
206
+ </span>
207
+
208
+
209
+
210
+
211
+
212
+
213
+
214
+
215
+
216
+ <span class="summary_desc"><div class='inline'><p>Writes a message prepending a red banner and then quits the application.</p>
217
+ </div></span>
218
+
219
+ </li>
220
+
221
+
222
+ <li class="public ">
223
+ <span class="summary_signature">
224
+
225
+ <a href="#get_banner-instance_method" title="#get_banner (instance method)">- (String) <strong>get_banner</strong>(label, base_color, full_colored = false, bracket_color = &quot;blue&quot;, brackets = [&quot;[&quot;, &quot;]&quot;]) </a>
226
+
227
+
228
+
229
+ </span>
230
+
231
+
232
+
233
+
234
+
235
+
236
+
237
+
238
+
239
+ <span class="summary_desc"><div class='inline'><p>Gets a banner for the messages.</p>
240
+ </div></span>
241
+
242
+ </li>
243
+
244
+
245
+ <li class="public ">
246
+ <span class="summary_signature">
247
+
248
+ <a href="#info-instance_method" title="#info (instance method)">- (Object) <strong>info</strong>(message, suffix = &quot;\n&quot;, indent = true, wrap = false, plain = false, indented_banner = false, full_colored = false, print = true, *banner) </a>
249
+
250
+
251
+
252
+ </span>
253
+
254
+
255
+
256
+
257
+
258
+
259
+
260
+
261
+
262
+ <span class="summary_desc"><div class='inline'><p>Writes a message prepending a cyan banner.</p>
263
+ </div></span>
264
+
265
+ </li>
266
+
267
+
268
+ <li class="public ">
269
+ <span class="summary_signature">
270
+
271
+ <a href="#status-instance_method" title="#status (instance method)">- (Array) <strong>status</strong>(status, plain = false, go_up = true, right = true, print = true) </a>
272
+
273
+
274
+
275
+ </span>
276
+
277
+
278
+
279
+
280
+
281
+
282
+
283
+
284
+
285
+ <span class="summary_desc"><div class='inline'><p>Writes a status to the output.</p>
286
+ </div></span>
287
+
288
+ </li>
289
+
290
+
291
+ <li class="public ">
292
+ <span class="summary_signature">
293
+
294
+ <a href="#warn-instance_method" title="#warn (instance method)">- (Object) <strong>warn</strong>(message, suffix = &quot;\n&quot;, indent = true, wrap = false, plain = false, indented_banner = false, full_colored = false, print = true) </a>
295
+
296
+
297
+
298
+ </span>
299
+
300
+
301
+
302
+
303
+
304
+
305
+
306
+
307
+
308
+ <span class="summary_desc"><div class='inline'><p>Writes a message prepending a yellow banner.</p>
309
+ </div></span>
310
+
311
+ </li>
312
+
313
+
314
+ <li class="public ">
315
+ <span class="summary_signature">
316
+
317
+ <a href="#write-instance_method" title="#write (instance method)">- (String) <strong>write</strong>(message, suffix = &quot;\n&quot;, indent = true, wrap = false, plain = false, print = true) </a>
318
+
319
+
320
+
321
+ </span>
322
+
323
+
324
+
325
+
326
+
327
+
328
+
329
+
330
+
331
+ <span class="summary_desc"><div class='inline'><p>Writes a message.</p>
332
+ </div></span>
333
+
334
+ </li>
335
+
336
+
337
+ <li class="public ">
338
+ <span class="summary_signature">
339
+
340
+ <a href="#write_banner_aligned-instance_method" title="#write_banner_aligned (instance method)">- (String) <strong>write_banner_aligned</strong>(message, suffix = &quot;\n&quot;, indent = true, wrap = false, plain = false, print = true) </a>
341
+
342
+
343
+
344
+ </span>
345
+
346
+
347
+
348
+
349
+
350
+
351
+
352
+
353
+
354
+ <span class="summary_desc"><div class='inline'><p>Writes a message, aligning to a call with an empty banner.</p>
355
+ </div></span>
356
+
357
+ </li>
358
+
359
+
360
+ </ul>
361
+
362
+
363
+
364
+
365
+
366
+ <div id="instance_method_details" class="method_details_list">
367
+ <h2>Instance Method Details</h2>
368
+
369
+
370
+ <div class="method_details first">
371
+ <h3 class="signature first" id="begin-instance_method">
372
+
373
+ - (<tt>Object</tt>) <strong>begin</strong>(message, suffix = &quot;\n&quot;, indent = true, wrap = false, plain = false, indented_banner = false, full_colored = false, print = true)
374
+
375
+
376
+
377
+
378
+
379
+ </h3><div class="docstring">
380
+ <div class="discussion">
381
+ <p>Writes a message prepending a green banner.</p>
382
+
383
+
384
+ </div>
385
+ </div>
386
+ <div class="tags">
387
+ <p class="tag_title">Parameters:</p>
388
+ <ul class="param">
389
+
390
+ <li>
391
+
392
+ <span class='name'>message</span>
393
+
394
+
395
+ <span class='type'>(<tt>String</tt>)</span>
396
+
397
+
398
+
399
+ &mdash;
400
+ <div class='inline'><p>The message to format.</p>
401
+ </div>
402
+
403
+ </li>
404
+
405
+ <li>
406
+
407
+ <span class='name'>suffix</span>
408
+
409
+
410
+ <span class='type'>(<tt>Object</tt>)</span>
411
+
412
+
413
+ <em class="default">(defaults to: <tt>&quot;\n&quot;</tt>)</em>
414
+
415
+
416
+ &mdash;
417
+ <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>
418
+ </div>
419
+
420
+ </li>
421
+
422
+ <li>
423
+
424
+ <span class='name'>indent</span>
425
+
426
+
427
+ <span class='type'>(<tt>Object</tt>)</span>
428
+
429
+
430
+ <em class="default">(defaults to: <tt>true</tt>)</em>
431
+
432
+
433
+ &mdash;
434
+ <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, a negative value of <code>-x</code> will indent of <code>x</code> absolute spaces.</p>
435
+ </div>
436
+
437
+ </li>
438
+
439
+ <li>
440
+
441
+ <span class='name'>wrap</span>
442
+
443
+
444
+ <span class='type'>(<tt>Object</tt>)</span>
445
+
446
+
447
+ <em class="default">(defaults to: <tt>false</tt>)</em>
448
+
449
+
450
+ &mdash;
451
+ <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>
452
+ </div>
453
+
454
+ </li>
455
+
456
+ <li>
457
+
458
+ <span class='name'>plain</span>
459
+
460
+
461
+ <span class='type'>(<tt>Boolean</tt>)</span>
462
+
463
+
464
+ <em class="default">(defaults to: <tt>false</tt>)</em>
465
+
466
+
467
+ &mdash;
468
+ <div class='inline'><p>If ignore color markers into the message.</p>
469
+ </div>
470
+
471
+ </li>
472
+
473
+ <li>
474
+
475
+ <span class='name'>indented_banner</span>
476
+
477
+
478
+ <span class='type'>(<tt>Boolean</tt>)</span>
479
+
480
+
481
+ <em class="default">(defaults to: <tt>false</tt>)</em>
482
+
483
+
484
+ &mdash;
485
+ <div class='inline'><p>If also the banner should be indented.</p>
486
+ </div>
487
+
488
+ </li>
489
+
490
+ <li>
491
+
492
+ <span class='name'>full_colored</span>
493
+
494
+
495
+ <span class='type'>(<tt>Boolean</tt>)</span>
496
+
497
+
498
+ <em class="default">(defaults to: <tt>false</tt>)</em>
499
+
500
+
501
+ &mdash;
502
+ <div class='inline'><p>If the banner should be fully colored.</p>
503
+ </div>
504
+
505
+ </li>
506
+
507
+ <li>
508
+
509
+ <span class='name'>print</span>
510
+
511
+
512
+ <span class='type'>(<tt>Boolean</tt>)</span>
513
+
514
+
515
+ <em class="default">(defaults to: <tt>true</tt>)</em>
516
+
517
+
518
+ &mdash;
519
+ <div class='inline'><p>If <code>false</code>, the result will be returned instead of be printed.</p>
520
+ </div>
521
+
522
+ </li>
523
+
524
+ </ul>
525
+
526
+
527
+ <p class="tag_title">See Also:</p>
528
+ <ul class="see">
529
+
530
+ <li>#format</li>
531
+
532
+ </ul>
533
+
534
+ </div><table class="source_code">
535
+ <tr>
536
+ <td>
537
+ <pre class="lines">
538
+
539
+
540
+ 353
541
+ 354
542
+ 355
543
+ 356
544
+ 357</pre>
545
+ </td>
546
+ <td>
547
+ <pre class="code"><span class="info file"># File 'lib/bovem/console.rb', line 353</span>
548
+
549
+ <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='id identifier rubyid_suffix'>suffix</span> <span class='op'>=</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>\n</span><span class='tstring_end'>&quot;</span></span><span class='comma'>,</span> <span class='id identifier rubyid_indent'>indent</span> <span class='op'>=</span> <span class='kw'>true</span><span class='comma'>,</span> <span class='id identifier rubyid_wrap'>wrap</span> <span class='op'>=</span> <span class='kw'>false</span><span class='comma'>,</span> <span class='id identifier rubyid_plain'>plain</span> <span class='op'>=</span> <span class='kw'>false</span><span class='comma'>,</span> <span class='id identifier rubyid_indented_banner'>indented_banner</span> <span class='op'>=</span> <span class='kw'>false</span><span class='comma'>,</span> <span class='id identifier rubyid_full_colored'>full_colored</span> <span class='op'>=</span> <span class='kw'>false</span><span class='comma'>,</span> <span class='id identifier rubyid_print'>print</span> <span class='op'>=</span> <span class='kw'>true</span><span class='rparen'>)</span>
550
+ <span class='id identifier rubyid_banner'>banner</span> <span class='op'>=</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_get_banner'>get_banner</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>*</span><span class='tstring_end'>&quot;</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>bright green</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span>
551
+ <span class='id identifier rubyid_message'>message</span> <span class='op'>=</span> <span class='kw'>self</span><span class='period'>.</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_indent'>indent</span><span class='rparen'>)</span>
552
+ <span class='kw'>self</span><span class='period'>.</span><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'>&quot;</span><span class='tstring_content'> </span><span class='tstring_end'>&quot;</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 rubyid_indent'>indent</span> <span class='op'>:</span> <span class='int'>0</span><span class='comma'>,</span> <span class='id identifier rubyid_wrap'>wrap</span><span class='comma'>,</span> <span class='id identifier rubyid_plain'>plain</span><span class='comma'>,</span> <span class='id identifier rubyid_print'>print</span><span class='rparen'>)</span>
553
+ <span class='kw'>end</span></pre>
554
+ </td>
555
+ </tr>
556
+ </table>
557
+ </div>
558
+
559
+ <div class="method_details ">
560
+ <h3 class="signature " id="debug-instance_method">
561
+
562
+ - (<tt>Object</tt>) <strong>debug</strong>(message, suffix = &quot;\n&quot;, indent = true, wrap = false, plain = false, indented_banner = false, full_colored = false, print = true)
563
+
564
+
565
+
566
+
567
+
568
+ </h3><div class="docstring">
569
+ <div class="discussion">
570
+ <p>Writes a message prepending a magenta banner.</p>
571
+
572
+
573
+ </div>
574
+ </div>
575
+ <div class="tags">
576
+ <p class="tag_title">Parameters:</p>
577
+ <ul class="param">
578
+
579
+ <li>
580
+
581
+ <span class='name'>message</span>
582
+
583
+
584
+ <span class='type'>(<tt>String</tt>)</span>
585
+
586
+
587
+
588
+ &mdash;
589
+ <div class='inline'><p>The message to format.</p>
590
+ </div>
591
+
592
+ </li>
593
+
594
+ <li>
595
+
596
+ <span class='name'>suffix</span>
597
+
598
+
599
+ <span class='type'>(<tt>Object</tt>)</span>
600
+
601
+
602
+ <em class="default">(defaults to: <tt>&quot;\n&quot;</tt>)</em>
603
+
604
+
605
+ &mdash;
606
+ <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>
607
+ </div>
608
+
609
+ </li>
610
+
611
+ <li>
612
+
613
+ <span class='name'>indent</span>
614
+
615
+
616
+ <span class='type'>(<tt>Object</tt>)</span>
617
+
618
+
619
+ <em class="default">(defaults to: <tt>true</tt>)</em>
620
+
621
+
622
+ &mdash;
623
+ <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, a negative value of <code>-x</code> will indent of <code>x</code> absolute spaces.</p>
624
+ </div>
625
+
626
+ </li>
627
+
628
+ <li>
629
+
630
+ <span class='name'>wrap</span>
631
+
632
+
633
+ <span class='type'>(<tt>Object</tt>)</span>
634
+
635
+
636
+ <em class="default">(defaults to: <tt>false</tt>)</em>
637
+
638
+
639
+ &mdash;
640
+ <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>
641
+ </div>
642
+
643
+ </li>
644
+
645
+ <li>
646
+
647
+ <span class='name'>plain</span>
648
+
649
+
650
+ <span class='type'>(<tt>Boolean</tt>)</span>
651
+
652
+
653
+ <em class="default">(defaults to: <tt>false</tt>)</em>
654
+
655
+
656
+ &mdash;
657
+ <div class='inline'><p>If ignore color markers into the message.</p>
658
+ </div>
659
+
660
+ </li>
661
+
662
+ <li>
663
+
664
+ <span class='name'>indented_banner</span>
665
+
666
+
667
+ <span class='type'>(<tt>Boolean</tt>)</span>
668
+
669
+
670
+ <em class="default">(defaults to: <tt>false</tt>)</em>
671
+
672
+
673
+ &mdash;
674
+ <div class='inline'><p>If also the banner should be indented.</p>
675
+ </div>
676
+
677
+ </li>
678
+
679
+ <li>
680
+
681
+ <span class='name'>full_colored</span>
682
+
683
+
684
+ <span class='type'>(<tt>Boolean</tt>)</span>
685
+
686
+
687
+ <em class="default">(defaults to: <tt>false</tt>)</em>
688
+
689
+
690
+ &mdash;
691
+ <div class='inline'><p>If the banner should be fully colored.</p>
692
+ </div>
693
+
694
+ </li>
695
+
696
+ <li>
697
+
698
+ <span class='name'>print</span>
699
+
700
+
701
+ <span class='type'>(<tt>Boolean</tt>)</span>
702
+
703
+
704
+ <em class="default">(defaults to: <tt>true</tt>)</em>
705
+
706
+
707
+ &mdash;
708
+ <div class='inline'><p>If <code>false</code>, the result will be returned instead of be printed.</p>
709
+ </div>
710
+
711
+ </li>
712
+
713
+ </ul>
714
+
715
+
716
+ <p class="tag_title">See Also:</p>
717
+ <ul class="see">
718
+
719
+ <li>#format</li>
720
+
721
+ </ul>
722
+
723
+ </div><table class="source_code">
724
+ <tr>
725
+ <td>
726
+ <pre class="lines">
727
+
728
+
729
+ 410
730
+ 411
731
+ 412</pre>
732
+ </td>
733
+ <td>
734
+ <pre class="code"><span class="info file"># File 'lib/bovem/console.rb', line 410</span>
735
+
736
+ <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='id identifier rubyid_suffix'>suffix</span> <span class='op'>=</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>\n</span><span class='tstring_end'>&quot;</span></span><span class='comma'>,</span> <span class='id identifier rubyid_indent'>indent</span> <span class='op'>=</span> <span class='kw'>true</span><span class='comma'>,</span> <span class='id identifier rubyid_wrap'>wrap</span> <span class='op'>=</span> <span class='kw'>false</span><span class='comma'>,</span> <span class='id identifier rubyid_plain'>plain</span> <span class='op'>=</span> <span class='kw'>false</span><span class='comma'>,</span> <span class='id identifier rubyid_indented_banner'>indented_banner</span> <span class='op'>=</span> <span class='kw'>false</span><span class='comma'>,</span> <span class='id identifier rubyid_full_colored'>full_colored</span> <span class='op'>=</span> <span class='kw'>false</span><span class='comma'>,</span> <span class='id identifier rubyid_print'>print</span> <span class='op'>=</span> <span class='kw'>true</span><span class='rparen'>)</span>
737
+ <span class='kw'>self</span><span class='period'>.</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='id identifier rubyid_suffix'>suffix</span><span class='comma'>,</span> <span class='id identifier rubyid_indent'>indent</span><span class='comma'>,</span> <span class='id identifier rubyid_wrap'>wrap</span><span class='comma'>,</span> <span class='id identifier rubyid_plain'>plain</span><span class='comma'>,</span> <span class='id identifier rubyid_indented_banner'>indented_banner</span><span class='comma'>,</span> <span class='id identifier rubyid_full_colored'>full_colored</span><span class='comma'>,</span> <span class='id identifier rubyid_print'>print</span><span class='comma'>,</span> <span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>D</span><span class='tstring_end'>&quot;</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>bright magenta</span><span class='tstring_end'>&quot;</span></span><span class='rbracket'>]</span><span class='rparen'>)</span>
738
+ <span class='kw'>end</span></pre>
739
+ </td>
740
+ </tr>
741
+ </table>
742
+ </div>
743
+
744
+ <div class="method_details ">
745
+ <h3 class="signature " id="error-instance_method">
746
+
747
+ - (<tt>Object</tt>) <strong>error</strong>(message, suffix = &quot;\n&quot;, indent = true, wrap = false, plain = false, indented_banner = false, full_colored = false, print = true)
748
+
749
+
750
+
751
+
752
+
753
+ </h3><div class="docstring">
754
+ <div class="discussion">
755
+ <p>Writes a message prepending a red banner.</p>
756
+
757
+
758
+ </div>
759
+ </div>
760
+ <div class="tags">
761
+ <p class="tag_title">Parameters:</p>
762
+ <ul class="param">
763
+
764
+ <li>
765
+
766
+ <span class='name'>message</span>
767
+
768
+
769
+ <span class='type'>(<tt>String</tt>)</span>
770
+
771
+
772
+
773
+ &mdash;
774
+ <div class='inline'><p>The message to format.</p>
775
+ </div>
776
+
777
+ </li>
778
+
779
+ <li>
780
+
781
+ <span class='name'>suffix</span>
782
+
783
+
784
+ <span class='type'>(<tt>Object</tt>)</span>
785
+
786
+
787
+ <em class="default">(defaults to: <tt>&quot;\n&quot;</tt>)</em>
788
+
789
+
790
+ &mdash;
791
+ <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>
792
+ </div>
793
+
794
+ </li>
795
+
796
+ <li>
797
+
798
+ <span class='name'>indent</span>
799
+
800
+
801
+ <span class='type'>(<tt>Object</tt>)</span>
802
+
803
+
804
+ <em class="default">(defaults to: <tt>true</tt>)</em>
805
+
806
+
807
+ &mdash;
808
+ <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, a negative value of <code>-x</code> will indent of <code>x</code> absolute spaces.</p>
809
+ </div>
810
+
811
+ </li>
812
+
813
+ <li>
814
+
815
+ <span class='name'>wrap</span>
816
+
817
+
818
+ <span class='type'>(<tt>Object</tt>)</span>
819
+
820
+
821
+ <em class="default">(defaults to: <tt>false</tt>)</em>
822
+
823
+
824
+ &mdash;
825
+ <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>
826
+ </div>
827
+
828
+ </li>
829
+
830
+ <li>
831
+
832
+ <span class='name'>plain</span>
833
+
834
+
835
+ <span class='type'>(<tt>Boolean</tt>)</span>
836
+
837
+
838
+ <em class="default">(defaults to: <tt>false</tt>)</em>
839
+
840
+
841
+ &mdash;
842
+ <div class='inline'><p>If ignore color markers into the message.</p>
843
+ </div>
844
+
845
+ </li>
846
+
847
+ <li>
848
+
849
+ <span class='name'>indented_banner</span>
850
+
851
+
852
+ <span class='type'>(<tt>Boolean</tt>)</span>
853
+
854
+
855
+ <em class="default">(defaults to: <tt>false</tt>)</em>
856
+
857
+
858
+ &mdash;
859
+ <div class='inline'><p>If also the banner should be indented.</p>
860
+ </div>
861
+
862
+ </li>
863
+
864
+ <li>
865
+
866
+ <span class='name'>full_colored</span>
867
+
868
+
869
+ <span class='type'>(<tt>Boolean</tt>)</span>
870
+
871
+
872
+ <em class="default">(defaults to: <tt>false</tt>)</em>
873
+
874
+
875
+ &mdash;
876
+ <div class='inline'><p>If the banner should be fully colored.</p>
877
+ </div>
878
+
879
+ </li>
880
+
881
+ <li>
882
+
883
+ <span class='name'>print</span>
884
+
885
+
886
+ <span class='type'>(<tt>Boolean</tt>)</span>
887
+
888
+
889
+ <em class="default">(defaults to: <tt>true</tt>)</em>
890
+
891
+
892
+ &mdash;
893
+ <div class='inline'><p>If <code>false</code>, the result will be returned instead of be printed.</p>
894
+ </div>
895
+
896
+ </li>
897
+
898
+ </ul>
899
+
900
+
901
+ <p class="tag_title">See Also:</p>
902
+ <ul class="see">
903
+
904
+ <li>#format</li>
905
+
906
+ </ul>
907
+
908
+ </div><table class="source_code">
909
+ <tr>
910
+ <td>
911
+ <pre class="lines">
912
+
913
+
914
+ 443
915
+ 444
916
+ 445</pre>
917
+ </td>
918
+ <td>
919
+ <pre class="code"><span class="info file"># File 'lib/bovem/console.rb', line 443</span>
920
+
921
+ <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='id identifier rubyid_suffix'>suffix</span> <span class='op'>=</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>\n</span><span class='tstring_end'>&quot;</span></span><span class='comma'>,</span> <span class='id identifier rubyid_indent'>indent</span> <span class='op'>=</span> <span class='kw'>true</span><span class='comma'>,</span> <span class='id identifier rubyid_wrap'>wrap</span> <span class='op'>=</span> <span class='kw'>false</span><span class='comma'>,</span> <span class='id identifier rubyid_plain'>plain</span> <span class='op'>=</span> <span class='kw'>false</span><span class='comma'>,</span> <span class='id identifier rubyid_indented_banner'>indented_banner</span> <span class='op'>=</span> <span class='kw'>false</span><span class='comma'>,</span> <span class='id identifier rubyid_full_colored'>full_colored</span> <span class='op'>=</span> <span class='kw'>false</span><span class='comma'>,</span> <span class='id identifier rubyid_print'>print</span> <span class='op'>=</span> <span class='kw'>true</span><span class='rparen'>)</span>
922
+ <span class='kw'>self</span><span class='period'>.</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='id identifier rubyid_suffix'>suffix</span><span class='comma'>,</span> <span class='id identifier rubyid_indent'>indent</span><span class='comma'>,</span> <span class='id identifier rubyid_wrap'>wrap</span><span class='comma'>,</span> <span class='id identifier rubyid_plain'>plain</span><span class='comma'>,</span> <span class='id identifier rubyid_indented_banner'>indented_banner</span><span class='comma'>,</span> <span class='id identifier rubyid_full_colored'>full_colored</span><span class='comma'>,</span> <span class='id identifier rubyid_print'>print</span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>E</span><span class='tstring_end'>&quot;</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>bright red</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span>
923
+ <span class='kw'>end</span></pre>
924
+ </td>
925
+ </tr>
926
+ </table>
927
+ </div>
928
+
929
+ <div class="method_details ">
930
+ <h3 class="signature " id="fatal-instance_method">
931
+
932
+ - (<tt>Object</tt>) <strong>fatal</strong>(message, suffix = &quot;\n&quot;, indent = true, wrap = false, plain = false, indented_banner = false, full_colored = false, return_code = -1,, print = true)
933
+
934
+
935
+
936
+
937
+
938
+ </h3><div class="docstring">
939
+ <div class="discussion">
940
+ <p>Writes a message prepending a red banner and then quits the application.</p>
941
+
942
+
943
+ </div>
944
+ </div>
945
+ <div class="tags">
946
+ <p class="tag_title">Parameters:</p>
947
+ <ul class="param">
948
+
949
+ <li>
950
+
951
+ <span class='name'>message</span>
952
+
953
+
954
+ <span class='type'>(<tt>String</tt>)</span>
955
+
956
+
957
+
958
+ &mdash;
959
+ <div class='inline'><p>The message to format.</p>
960
+ </div>
961
+
962
+ </li>
963
+
964
+ <li>
965
+
966
+ <span class='name'>suffix</span>
967
+
968
+
969
+ <span class='type'>(<tt>Object</tt>)</span>
970
+
971
+
972
+ <em class="default">(defaults to: <tt>&quot;\n&quot;</tt>)</em>
973
+
974
+
975
+ &mdash;
976
+ <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>
977
+ </div>
978
+
979
+ </li>
980
+
981
+ <li>
982
+
983
+ <span class='name'>indent</span>
984
+
985
+
986
+ <span class='type'>(<tt>Object</tt>)</span>
987
+
988
+
989
+ <em class="default">(defaults to: <tt>true</tt>)</em>
990
+
991
+
992
+ &mdash;
993
+ <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, a negative value of <code>-x</code> will indent of <code>x</code> absolute spaces.</p>
994
+ </div>
995
+
996
+ </li>
997
+
998
+ <li>
999
+
1000
+ <span class='name'>wrap</span>
1001
+
1002
+
1003
+ <span class='type'>(<tt>Object</tt>)</span>
1004
+
1005
+
1006
+ <em class="default">(defaults to: <tt>false</tt>)</em>
1007
+
1008
+
1009
+ &mdash;
1010
+ <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>
1011
+ </div>
1012
+
1013
+ </li>
1014
+
1015
+ <li>
1016
+
1017
+ <span class='name'>plain</span>
1018
+
1019
+
1020
+ <span class='type'>(<tt>Boolean</tt>)</span>
1021
+
1022
+
1023
+ <em class="default">(defaults to: <tt>false</tt>)</em>
1024
+
1025
+
1026
+ &mdash;
1027
+ <div class='inline'><p>If ignore color markers into the message.</p>
1028
+ </div>
1029
+
1030
+ </li>
1031
+
1032
+ <li>
1033
+
1034
+ <span class='name'>indented_banner</span>
1035
+
1036
+
1037
+ <span class='type'>(<tt>Boolean</tt>)</span>
1038
+
1039
+
1040
+ <em class="default">(defaults to: <tt>false</tt>)</em>
1041
+
1042
+
1043
+ &mdash;
1044
+ <div class='inline'><p>If also the banner should be indented.</p>
1045
+ </div>
1046
+
1047
+ </li>
1048
+
1049
+ <li>
1050
+
1051
+ <span class='name'>full_colored</span>
1052
+
1053
+
1054
+ <span class='type'>(<tt>Boolean</tt>)</span>
1055
+
1056
+
1057
+ <em class="default">(defaults to: <tt>false</tt>)</em>
1058
+
1059
+
1060
+ &mdash;
1061
+ <div class='inline'><p>If the banner should be fully colored.</p>
1062
+ </div>
1063
+
1064
+ </li>
1065
+
1066
+ <li>
1067
+
1068
+ <span class='name'>return_code</span>
1069
+
1070
+
1071
+ <span class='type'>(<tt>Fixnum</tt>)</span>
1072
+
1073
+
1074
+ <em class="default">(defaults to: <tt>-1,</tt>)</em>
1075
+
1076
+
1077
+ &mdash;
1078
+ <div class='inline'><p>The code to return to the shell.</p>
1079
+ </div>
1080
+
1081
+ </li>
1082
+
1083
+ <li>
1084
+
1085
+ <span class='name'>print</span>
1086
+
1087
+
1088
+ <span class='type'>(<tt>Boolean</tt>)</span>
1089
+
1090
+
1091
+ <em class="default">(defaults to: <tt>true</tt>)</em>
1092
+
1093
+
1094
+ &mdash;
1095
+ <div class='inline'><p>If <code>false</code>, the result will be returned instead of be printed.</p>
1096
+ </div>
1097
+
1098
+ </li>
1099
+
1100
+ </ul>
1101
+
1102
+
1103
+ <p class="tag_title">See Also:</p>
1104
+ <ul class="see">
1105
+
1106
+ <li>#format</li>
1107
+
1108
+ </ul>
1109
+
1110
+ </div><table class="source_code">
1111
+ <tr>
1112
+ <td>
1113
+ <pre class="lines">
1114
+
1115
+
1116
+ 372
1117
+ 373
1118
+ 374
1119
+ 375</pre>
1120
+ </td>
1121
+ <td>
1122
+ <pre class="code"><span class="info file"># File 'lib/bovem/console.rb', line 372</span>
1123
+
1124
+ <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='id identifier rubyid_suffix'>suffix</span> <span class='op'>=</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>\n</span><span class='tstring_end'>&quot;</span></span><span class='comma'>,</span> <span class='id identifier rubyid_indent'>indent</span> <span class='op'>=</span> <span class='kw'>true</span><span class='comma'>,</span> <span class='id identifier rubyid_wrap'>wrap</span> <span class='op'>=</span> <span class='kw'>false</span><span class='comma'>,</span> <span class='id identifier rubyid_plain'>plain</span> <span class='op'>=</span> <span class='kw'>false</span><span class='comma'>,</span> <span class='id identifier rubyid_indented_banner'>indented_banner</span> <span class='op'>=</span> <span class='kw'>false</span><span class='comma'>,</span> <span class='id identifier rubyid_full_colored'>full_colored</span> <span class='op'>=</span> <span class='kw'>false</span><span class='comma'>,</span> <span class='id identifier rubyid_return_code'>return_code</span> <span class='op'>=</span> <span class='op'>-</span><span class='int'>1</span><span class='comma'>,</span> <span class='id identifier rubyid_print'>print</span> <span class='op'>=</span> <span class='kw'>true</span><span class='rparen'>)</span>
1125
+ <span class='kw'>self</span><span class='period'>.</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='id identifier rubyid_suffix'>suffix</span><span class='comma'>,</span> <span class='id identifier rubyid_indent'>indent</span><span class='comma'>,</span> <span class='id identifier rubyid_wrap'>wrap</span><span class='comma'>,</span> <span class='id identifier rubyid_plain'>plain</span><span class='comma'>,</span> <span class='id identifier rubyid_indented_banner'>indented_banner</span><span class='comma'>,</span> <span class='id identifier rubyid_full_colored'>full_colored</span><span class='comma'>,</span> <span class='id identifier rubyid_print'>print</span><span class='rparen'>)</span>
1126
+ <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>
1127
+ <span class='kw'>end</span></pre>
1128
+ </td>
1129
+ </tr>
1130
+ </table>
1131
+ </div>
1132
+
1133
+ <div class="method_details ">
1134
+ <h3 class="signature " id="get_banner-instance_method">
1135
+
1136
+ - (<tt>String</tt>) <strong>get_banner</strong>(label, base_color, full_colored = false, bracket_color = &quot;blue&quot;, brackets = [&quot;[&quot;, &quot;]&quot;])
1137
+
1138
+
1139
+
1140
+
1141
+
1142
+ </h3><div class="docstring">
1143
+ <div class="discussion">
1144
+ <p>Gets a banner for the messages.</p>
1145
+
1146
+
1147
+ </div>
1148
+ </div>
1149
+ <div class="tags">
1150
+ <p class="tag_title">Parameters:</p>
1151
+ <ul class="param">
1152
+
1153
+ <li>
1154
+
1155
+ <span class='name'>label</span>
1156
+
1157
+
1158
+ <span class='type'>(<tt>String</tt>)</span>
1159
+
1160
+
1161
+
1162
+ &mdash;
1163
+ <div class='inline'><p>The label for the banner.</p>
1164
+ </div>
1165
+
1166
+ </li>
1167
+
1168
+ <li>
1169
+
1170
+ <span class='name'>base_color</span>
1171
+
1172
+
1173
+ <span class='type'>(<tt>String</tt>)</span>
1174
+
1175
+
1176
+
1177
+ &mdash;
1178
+ <div class='inline'><p>The color for the label.</p>
1179
+ </div>
1180
+
1181
+ </li>
1182
+
1183
+ <li>
1184
+
1185
+ <span class='name'>full_colored</span>
1186
+
1187
+
1188
+ <span class='type'>(<tt>String</tt>)</span>
1189
+
1190
+
1191
+ <em class="default">(defaults to: <tt>false</tt>)</em>
1192
+
1193
+
1194
+ &mdash;
1195
+ <div class='inline'><p>If all the message should be of the label color.</p>
1196
+ </div>
1197
+
1198
+ </li>
1199
+
1200
+ <li>
1201
+
1202
+ <span class='name'>bracket_color</span>
1203
+
1204
+
1205
+ <span class='type'>(<tt>String</tt>)</span>
1206
+
1207
+
1208
+ <em class="default">(defaults to: <tt>&quot;blue&quot;</tt>)</em>
1209
+
1210
+
1211
+ &mdash;
1212
+ <div class='inline'><p>The color of the brackets.</p>
1213
+ </div>
1214
+
1215
+ </li>
1216
+
1217
+ <li>
1218
+
1219
+ <span class='name'>brackets</span>
1220
+
1221
+
1222
+ <span class='type'>(<tt>Array</tt>)</span>
1223
+
1224
+
1225
+ <em class="default">(defaults to: <tt>[&quot;[&quot;, &quot;]&quot;]</tt>)</em>
1226
+
1227
+
1228
+ &mdash;
1229
+ <div class='inline'><p>An array of dimension 2 to use for brackets.</p>
1230
+ </div>
1231
+
1232
+ </li>
1233
+
1234
+ </ul>
1235
+
1236
+ <p class="tag_title">Returns:</p>
1237
+ <ul class="return">
1238
+
1239
+ <li>
1240
+
1241
+
1242
+ <span class='type'>(<tt>String</tt>)</span>
1243
+
1244
+
1245
+
1246
+ &mdash;
1247
+ <div class='inline'><p>The banner.</p>
1248
+ </div>
1249
+
1250
+ </li>
1251
+
1252
+ </ul>
1253
+
1254
+ <p class="tag_title">See Also:</p>
1255
+ <ul class="see">
1256
+
1257
+ <li>#format</li>
1258
+
1259
+ </ul>
1260
+
1261
+ </div><table class="source_code">
1262
+ <tr>
1263
+ <td>
1264
+ <pre class="lines">
1265
+
1266
+
1267
+ 334
1268
+ 335
1269
+ 336
1270
+ 337
1271
+ 338
1272
+ 339</pre>
1273
+ </td>
1274
+ <td>
1275
+ <pre class="code"><span class="info file"># File 'lib/bovem/console.rb', line 334</span>
1276
+
1277
+ <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='id identifier rubyid_full_colored'>full_colored</span> <span class='op'>=</span> <span class='kw'>false</span><span class='comma'>,</span> <span class='id identifier rubyid_bracket_color'>bracket_color</span> <span class='op'>=</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>blue</span><span class='tstring_end'>&quot;</span></span><span class='comma'>,</span> <span class='id identifier rubyid_brackets'>brackets</span> <span class='op'>=</span> <span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>[</span><span class='tstring_end'>&quot;</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>]</span><span class='tstring_end'>&quot;</span></span><span class='rbracket'>]</span><span class='rparen'>)</span>
1278
+ <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'>&quot;</span><span class='tstring_content'> </span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span>
1279
+ <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>
1280
+ <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>
1281
+ <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>{mark=%s}%s{mark=%s}%s{/mark}%s{/mark}</span><span class='tstring_end'>&quot;</span></span> <span class='op'>%</span> <span class='lbracket'>[</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='rbracket'>]</span>
1282
+ <span class='kw'>end</span></pre>
1283
+ </td>
1284
+ </tr>
1285
+ </table>
1286
+ </div>
1287
+
1288
+ <div class="method_details ">
1289
+ <h3 class="signature " id="info-instance_method">
1290
+
1291
+ - (<tt>Object</tt>) <strong>info</strong>(message, suffix = &quot;\n&quot;, indent = true, wrap = false, plain = false, indented_banner = false, full_colored = false, print = true, *banner)
1292
+
1293
+
1294
+
1295
+
1296
+
1297
+ </h3><div class="docstring">
1298
+ <div class="discussion">
1299
+ <p>Writes a message prepending a cyan banner.</p>
1300
+
1301
+
1302
+ </div>
1303
+ </div>
1304
+ <div class="tags">
1305
+ <p class="tag_title">Parameters:</p>
1306
+ <ul class="param">
1307
+
1308
+ <li>
1309
+
1310
+ <span class='name'>message</span>
1311
+
1312
+
1313
+ <span class='type'>(<tt>String</tt>)</span>
1314
+
1315
+
1316
+
1317
+ &mdash;
1318
+ <div class='inline'><p>The message to format.</p>
1319
+ </div>
1320
+
1321
+ </li>
1322
+
1323
+ <li>
1324
+
1325
+ <span class='name'>suffix</span>
1326
+
1327
+
1328
+ <span class='type'>(<tt>Object</tt>)</span>
1329
+
1330
+
1331
+ <em class="default">(defaults to: <tt>&quot;\n&quot;</tt>)</em>
1332
+
1333
+
1334
+ &mdash;
1335
+ <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>
1336
+ </div>
1337
+
1338
+ </li>
1339
+
1340
+ <li>
1341
+
1342
+ <span class='name'>indent</span>
1343
+
1344
+
1345
+ <span class='type'>(<tt>Object</tt>)</span>
1346
+
1347
+
1348
+ <em class="default">(defaults to: <tt>true</tt>)</em>
1349
+
1350
+
1351
+ &mdash;
1352
+ <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, a negative value of <code>-x</code> will indent of <code>x</code> absolute spaces.</p>
1353
+ </div>
1354
+
1355
+ </li>
1356
+
1357
+ <li>
1358
+
1359
+ <span class='name'>wrap</span>
1360
+
1361
+
1362
+ <span class='type'>(<tt>Object</tt>)</span>
1363
+
1364
+
1365
+ <em class="default">(defaults to: <tt>false</tt>)</em>
1366
+
1367
+
1368
+ &mdash;
1369
+ <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>
1370
+ </div>
1371
+
1372
+ </li>
1373
+
1374
+ <li>
1375
+
1376
+ <span class='name'>plain</span>
1377
+
1378
+
1379
+ <span class='type'>(<tt>Boolean</tt>)</span>
1380
+
1381
+
1382
+ <em class="default">(defaults to: <tt>false</tt>)</em>
1383
+
1384
+
1385
+ &mdash;
1386
+ <div class='inline'><p>If ignore color markers into the message.</p>
1387
+ </div>
1388
+
1389
+ </li>
1390
+
1391
+ <li>
1392
+
1393
+ <span class='name'>indented_banner</span>
1394
+
1395
+
1396
+ <span class='type'>(<tt>Boolean</tt>)</span>
1397
+
1398
+
1399
+ <em class="default">(defaults to: <tt>false</tt>)</em>
1400
+
1401
+
1402
+ &mdash;
1403
+ <div class='inline'><p>If also the banner should be indented.</p>
1404
+ </div>
1405
+
1406
+ </li>
1407
+
1408
+ <li>
1409
+
1410
+ <span class='name'>full_colored</span>
1411
+
1412
+
1413
+ <span class='type'>(<tt>Boolean</tt>)</span>
1414
+
1415
+
1416
+ <em class="default">(defaults to: <tt>false</tt>)</em>
1417
+
1418
+
1419
+ &mdash;
1420
+ <div class='inline'><p>If the banner should be fully colored.</p>
1421
+ </div>
1422
+
1423
+ </li>
1424
+
1425
+ <li>
1426
+
1427
+ <span class='name'>print</span>
1428
+
1429
+
1430
+ <span class='type'>(<tt>Boolean</tt>)</span>
1431
+
1432
+
1433
+ <em class="default">(defaults to: <tt>true</tt>)</em>
1434
+
1435
+
1436
+ &mdash;
1437
+ <div class='inline'><p>If <code>false</code>, the result will be returned instead of be printed.</p>
1438
+ </div>
1439
+
1440
+ </li>
1441
+
1442
+ <li>
1443
+
1444
+ <span class='name'>banner</span>
1445
+
1446
+
1447
+ <span class='type'>(<tt>Array</tt>)</span>
1448
+
1449
+
1450
+
1451
+ &mdash;
1452
+ <div class='inline'><p>An array with at last letter and style to use for the banner.</p>
1453
+ </div>
1454
+
1455
+ </li>
1456
+
1457
+ </ul>
1458
+
1459
+
1460
+ <p class="tag_title">See Also:</p>
1461
+ <ul class="see">
1462
+
1463
+ <li>#format</li>
1464
+
1465
+ </ul>
1466
+
1467
+ </div><table class="source_code">
1468
+ <tr>
1469
+ <td>
1470
+ <pre class="lines">
1471
+
1472
+
1473
+ 390
1474
+ 391
1475
+ 392
1476
+ 393
1477
+ 394
1478
+ 395
1479
+ 396</pre>
1480
+ </td>
1481
+ <td>
1482
+ <pre class="code"><span class="info file"># File 'lib/bovem/console.rb', line 390</span>
1483
+
1484
+ <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='id identifier rubyid_suffix'>suffix</span> <span class='op'>=</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>\n</span><span class='tstring_end'>&quot;</span></span><span class='comma'>,</span> <span class='id identifier rubyid_indent'>indent</span> <span class='op'>=</span> <span class='kw'>true</span><span class='comma'>,</span> <span class='id identifier rubyid_wrap'>wrap</span> <span class='op'>=</span> <span class='kw'>false</span><span class='comma'>,</span> <span class='id identifier rubyid_plain'>plain</span> <span class='op'>=</span> <span class='kw'>false</span><span class='comma'>,</span> <span class='id identifier rubyid_indented_banner'>indented_banner</span> <span class='op'>=</span> <span class='kw'>false</span><span class='comma'>,</span> <span class='id identifier rubyid_full_colored'>full_colored</span> <span class='op'>=</span> <span class='kw'>false</span><span class='comma'>,</span> <span class='id identifier rubyid_print'>print</span> <span class='op'>=</span> <span class='kw'>true</span><span class='comma'>,</span> <span class='op'>*</span><span class='id identifier rubyid_banner'>banner</span><span class='rparen'>)</span>
1485
+ <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='period'>.</span><span class='id identifier rubyid_flatten'>flatten</span>
1486
+ <span class='id identifier rubyid_banner'>banner</span> <span class='op'>=</span> <span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>I</span><span class='tstring_end'>&quot;</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>bright cyan</span><span class='tstring_end'>&quot;</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>
1487
+ <span class='id identifier rubyid_banner'>banner</span> <span class='op'>=</span> <span class='kw'>self</span><span class='period'>.</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>
1488
+ <span class='id identifier rubyid_message'>message</span> <span class='op'>=</span> <span class='kw'>self</span><span class='period'>.</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_indent'>indent</span><span class='rparen'>)</span>
1489
+ <span class='kw'>self</span><span class='period'>.</span><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'>&quot;</span><span class='tstring_content'> </span><span class='tstring_end'>&quot;</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 rubyid_indent'>indent</span> <span class='op'>:</span> <span class='int'>0</span><span class='comma'>,</span> <span class='id identifier rubyid_wrap'>wrap</span><span class='comma'>,</span> <span class='id identifier rubyid_plain'>plain</span><span class='comma'>,</span> <span class='id identifier rubyid_print'>print</span><span class='rparen'>)</span>
1490
+ <span class='kw'>end</span></pre>
1491
+ </td>
1492
+ </tr>
1493
+ </table>
1494
+ </div>
1495
+
1496
+ <div class="method_details ">
1497
+ <h3 class="signature " id="status-instance_method">
1498
+
1499
+ - (<tt>Array</tt>) <strong>status</strong>(status, plain = false, go_up = true, right = true, print = true)
1500
+
1501
+
1502
+
1503
+
1504
+
1505
+ </h3><div class="docstring">
1506
+ <div class="discussion">
1507
+ <p>Writes a status to the output. Valid values are <code>:ok</code>, <code>:pass</code>, <code>:fail</code>, <code>:warn</code>.</p>
1508
+
1509
+
1510
+ </div>
1511
+ </div>
1512
+ <div class="tags">
1513
+ <p class="tag_title">Parameters:</p>
1514
+ <ul class="param">
1515
+
1516
+ <li>
1517
+
1518
+ <span class='name'>status</span>
1519
+
1520
+
1521
+ <span class='type'>(<tt>Symbol</tt>)</span>
1522
+
1523
+
1524
+
1525
+ &mdash;
1526
+ <div class='inline'><p>The status to write.</p>
1527
+ </div>
1528
+
1529
+ </li>
1530
+
1531
+ <li>
1532
+
1533
+ <span class='name'>plain</span>
1534
+
1535
+
1536
+ <span class='type'>(<tt>Boolean</tt>)</span>
1537
+
1538
+
1539
+ <em class="default">(defaults to: <tt>false</tt>)</em>
1540
+
1541
+
1542
+ &mdash;
1543
+ <div class='inline'><p>If not use colors.</p>
1544
+ </div>
1545
+
1546
+ </li>
1547
+
1548
+ <li>
1549
+
1550
+ <span class='name'>go_up</span>
1551
+
1552
+
1553
+ <span class='type'>(<tt>Boolean</tt>)</span>
1554
+
1555
+
1556
+ <em class="default">(defaults to: <tt>true</tt>)</em>
1557
+
1558
+
1559
+ &mdash;
1560
+ <div class='inline'><p>If go up one line before formatting.</p>
1561
+ </div>
1562
+
1563
+ </li>
1564
+
1565
+ <li>
1566
+
1567
+ <span class='name'>right</span>
1568
+
1569
+
1570
+ <span class='type'>(<tt>Boolean</tt>)</span>
1571
+
1572
+
1573
+ <em class="default">(defaults to: <tt>true</tt>)</em>
1574
+
1575
+
1576
+ &mdash;
1577
+ <div class='inline'><p>If to print results on the right.</p>
1578
+ </div>
1579
+
1580
+ </li>
1581
+
1582
+ <li>
1583
+
1584
+ <span class='name'>print</span>
1585
+
1586
+
1587
+ <span class='type'>(<tt>Boolean</tt>)</span>
1588
+
1589
+
1590
+ <em class="default">(defaults to: <tt>true</tt>)</em>
1591
+
1592
+
1593
+ &mdash;
1594
+ <div class='inline'><p>If <code>false</code>, the result will be returned instead of be printed.</p>
1595
+ </div>
1596
+
1597
+ </li>
1598
+
1599
+ </ul>
1600
+
1601
+ <p class="tag_title">Returns:</p>
1602
+ <ul class="return">
1603
+
1604
+ <li>
1605
+
1606
+
1607
+ <span class='type'>(<tt>Array</tt>)</span>
1608
+
1609
+
1610
+
1611
+ &mdash;
1612
+ <div class='inline'><p>An dictionary with <code>:label</code> and <code>:color</code> keys for the status.</p>
1613
+ </div>
1614
+
1615
+ </li>
1616
+
1617
+ </ul>
1618
+
1619
+ </div><table class="source_code">
1620
+ <tr>
1621
+ <td>
1622
+ <pre class="lines">
1623
+
1624
+
1625
+ 301
1626
+ 302
1627
+ 303
1628
+ 304
1629
+ 305
1630
+ 306
1631
+ 307
1632
+ 308
1633
+ 309
1634
+ 310
1635
+ 311
1636
+ 312
1637
+ 313
1638
+ 314
1639
+ 315
1640
+ 316
1641
+ 317
1642
+ 318
1643
+ 319
1644
+ 320
1645
+ 321
1646
+ 322
1647
+ 323</pre>
1648
+ </td>
1649
+ <td>
1650
+ <pre class="code"><span class="info file"># File 'lib/bovem/console.rb', line 301</span>
1651
+
1652
+ <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='id identifier rubyid_plain'>plain</span> <span class='op'>=</span> <span class='kw'>false</span><span class='comma'>,</span> <span class='id identifier rubyid_go_up'>go_up</span> <span class='op'>=</span> <span class='kw'>true</span><span class='comma'>,</span> <span class='id identifier rubyid_right'>right</span> <span class='op'>=</span> <span class='kw'>true</span><span class='comma'>,</span> <span class='id identifier rubyid_print'>print</span> <span class='op'>=</span> <span class='kw'>true</span><span class='rparen'>)</span>
1653
+ <span class='id identifier rubyid_statuses'>statuses</span> <span class='op'>=</span> <span class='lbrace'>{</span>
1654
+ <span class='label'>ok:</span> <span class='lbrace'>{</span><span class='label'>label:</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'> OK </span><span class='tstring_end'>&quot;</span></span><span class='comma'>,</span> <span class='label'>color:</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>bright green</span><span class='tstring_end'>&quot;</span></span><span class='rbrace'>}</span><span class='comma'>,</span>
1655
+ <span class='label'>pass:</span> <span class='lbrace'>{</span><span class='label'>label:</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>PASS</span><span class='tstring_end'>&quot;</span></span><span class='comma'>,</span> <span class='label'>color:</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>bright cyan</span><span class='tstring_end'>&quot;</span></span><span class='rbrace'>}</span><span class='comma'>,</span>
1656
+ <span class='label'>warn:</span> <span class='lbrace'>{</span><span class='label'>label:</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>WARN</span><span class='tstring_end'>&quot;</span></span><span class='comma'>,</span> <span class='label'>color:</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>bright yellow</span><span class='tstring_end'>&quot;</span></span><span class='rbrace'>}</span><span class='comma'>,</span>
1657
+ <span class='label'>fail:</span> <span class='lbrace'>{</span><span class='label'>label:</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>FAIL</span><span class='tstring_end'>&quot;</span></span><span class='comma'>,</span> <span class='label'>color:</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>bright red</span><span class='tstring_end'>&quot;</span></span><span class='rbrace'>}</span>
1658
+ <span class='rbrace'>}</span>
1659
+ <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>
1660
+
1661
+ <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>
1662
+
1663
+ <span class='kw'>if</span> <span class='id identifier rubyid_print'>print</span> <span class='kw'>then</span>
1664
+ <span class='id identifier rubyid_banner'>banner</span> <span class='op'>=</span> <span class='kw'>self</span><span class='period'>.</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>
1665
+
1666
+ <span class='kw'>if</span> <span class='id identifier rubyid_right'>right</span> <span class='kw'>then</span>
1667
+ <span class='const'>Kernel</span><span class='period'>.</span><span class='id identifier rubyid_puts'>puts</span> <span class='kw'>self</span><span class='period'>.</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'>&quot;</span><span class='tstring_content'> </span><span class='tstring_end'>&quot;</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>
1668
+ <span class='kw'>else</span>
1669
+ <span class='const'>Kernel</span><span class='period'>.</span><span class='id identifier rubyid_puts'>puts</span> <span class='kw'>self</span><span class='period'>.</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'>&quot;</span><span class='tstring_content'> </span><span class='tstring_end'>&quot;</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>\n</span><span class='tstring_end'>&quot;</span></span><span class='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>
1670
+ <span class='kw'>end</span>
1671
+ <span class='kw'>end</span>
1672
+
1673
+ <span class='id identifier rubyid_rv'>rv</span>
1674
+ <span class='kw'>end</span></pre>
1675
+ </td>
1676
+ </tr>
1677
+ </table>
1678
+ </div>
1679
+
1680
+ <div class="method_details ">
1681
+ <h3 class="signature " id="warn-instance_method">
1682
+
1683
+ - (<tt>Object</tt>) <strong>warn</strong>(message, suffix = &quot;\n&quot;, indent = true, wrap = false, plain = false, indented_banner = false, full_colored = false, print = true)
1684
+
1685
+
1686
+
1687
+
1688
+
1689
+ </h3><div class="docstring">
1690
+ <div class="discussion">
1691
+ <p>Writes a message prepending a yellow banner.</p>
1692
+
1693
+
1694
+ </div>
1695
+ </div>
1696
+ <div class="tags">
1697
+ <p class="tag_title">Parameters:</p>
1698
+ <ul class="param">
1699
+
1700
+ <li>
1701
+
1702
+ <span class='name'>message</span>
1703
+
1704
+
1705
+ <span class='type'>(<tt>String</tt>)</span>
1706
+
1707
+
1708
+
1709
+ &mdash;
1710
+ <div class='inline'><p>The message to format.</p>
1711
+ </div>
1712
+
1713
+ </li>
1714
+
1715
+ <li>
1716
+
1717
+ <span class='name'>suffix</span>
1718
+
1719
+
1720
+ <span class='type'>(<tt>Object</tt>)</span>
1721
+
1722
+
1723
+ <em class="default">(defaults to: <tt>&quot;\n&quot;</tt>)</em>
1724
+
1725
+
1726
+ &mdash;
1727
+ <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>
1728
+ </div>
1729
+
1730
+ </li>
1731
+
1732
+ <li>
1733
+
1734
+ <span class='name'>indent</span>
1735
+
1736
+
1737
+ <span class='type'>(<tt>Object</tt>)</span>
1738
+
1739
+
1740
+ <em class="default">(defaults to: <tt>true</tt>)</em>
1741
+
1742
+
1743
+ &mdash;
1744
+ <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, a negative value of <code>-x</code> will indent of <code>x</code> absolute spaces.</p>
1745
+ </div>
1746
+
1747
+ </li>
1748
+
1749
+ <li>
1750
+
1751
+ <span class='name'>wrap</span>
1752
+
1753
+
1754
+ <span class='type'>(<tt>Object</tt>)</span>
1755
+
1756
+
1757
+ <em class="default">(defaults to: <tt>false</tt>)</em>
1758
+
1759
+
1760
+ &mdash;
1761
+ <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>
1762
+ </div>
1763
+
1764
+ </li>
1765
+
1766
+ <li>
1767
+
1768
+ <span class='name'>plain</span>
1769
+
1770
+
1771
+ <span class='type'>(<tt>Boolean</tt>)</span>
1772
+
1773
+
1774
+ <em class="default">(defaults to: <tt>false</tt>)</em>
1775
+
1776
+
1777
+ &mdash;
1778
+ <div class='inline'><p>If ignore color markers into the message.</p>
1779
+ </div>
1780
+
1781
+ </li>
1782
+
1783
+ <li>
1784
+
1785
+ <span class='name'>indented_banner</span>
1786
+
1787
+
1788
+ <span class='type'>(<tt>Boolean</tt>)</span>
1789
+
1790
+
1791
+ <em class="default">(defaults to: <tt>false</tt>)</em>
1792
+
1793
+
1794
+ &mdash;
1795
+ <div class='inline'><p>If also the banner should be indented.</p>
1796
+ </div>
1797
+
1798
+ </li>
1799
+
1800
+ <li>
1801
+
1802
+ <span class='name'>full_colored</span>
1803
+
1804
+
1805
+ <span class='type'>(<tt>Boolean</tt>)</span>
1806
+
1807
+
1808
+ <em class="default">(defaults to: <tt>false</tt>)</em>
1809
+
1810
+
1811
+ &mdash;
1812
+ <div class='inline'><p>If the banner should be fully colored.</p>
1813
+ </div>
1814
+
1815
+ </li>
1816
+
1817
+ <li>
1818
+
1819
+ <span class='name'>print</span>
1820
+
1821
+
1822
+ <span class='type'>(<tt>Boolean</tt>)</span>
1823
+
1824
+
1825
+ <em class="default">(defaults to: <tt>true</tt>)</em>
1826
+
1827
+
1828
+ &mdash;
1829
+ <div class='inline'><p>If <code>false</code>, the result will be returned instead of be printed.</p>
1830
+ </div>
1831
+
1832
+ </li>
1833
+
1834
+ </ul>
1835
+
1836
+
1837
+ <p class="tag_title">See Also:</p>
1838
+ <ul class="see">
1839
+
1840
+ <li>#format</li>
1841
+
1842
+ </ul>
1843
+
1844
+ </div><table class="source_code">
1845
+ <tr>
1846
+ <td>
1847
+ <pre class="lines">
1848
+
1849
+
1850
+ 426
1851
+ 427
1852
+ 428
1853
+ 429</pre>
1854
+ </td>
1855
+ <td>
1856
+ <pre class="code"><span class="info file"># File 'lib/bovem/console.rb', line 426</span>
1857
+
1858
+ <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='id identifier rubyid_suffix'>suffix</span> <span class='op'>=</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>\n</span><span class='tstring_end'>&quot;</span></span><span class='comma'>,</span> <span class='id identifier rubyid_indent'>indent</span> <span class='op'>=</span> <span class='kw'>true</span><span class='comma'>,</span> <span class='id identifier rubyid_wrap'>wrap</span> <span class='op'>=</span> <span class='kw'>false</span><span class='comma'>,</span> <span class='id identifier rubyid_plain'>plain</span> <span class='op'>=</span> <span class='kw'>false</span><span class='comma'>,</span> <span class='id identifier rubyid_indented_banner'>indented_banner</span> <span class='op'>=</span> <span class='kw'>false</span><span class='comma'>,</span> <span class='id identifier rubyid_full_colored'>full_colored</span> <span class='op'>=</span> <span class='kw'>false</span><span class='comma'>,</span> <span class='id identifier rubyid_print'>print</span> <span class='op'>=</span> <span class='kw'>true</span><span class='rparen'>)</span>
1859
+ <span class='id identifier rubyid_warn_banner'>warn_banner</span> <span class='op'>=</span> <span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>W</span><span class='tstring_end'>&quot;</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>bright yellow</span><span class='tstring_end'>&quot;</span></span><span class='rbracket'>]</span>
1860
+ <span class='kw'>self</span><span class='period'>.</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='id identifier rubyid_suffix'>suffix</span><span class='comma'>,</span> <span class='id identifier rubyid_indent'>indent</span><span class='comma'>,</span> <span class='id identifier rubyid_wrap'>wrap</span><span class='comma'>,</span> <span class='id identifier rubyid_plain'>plain</span><span class='comma'>,</span> <span class='id identifier rubyid_indented_banner'>indented_banner</span><span class='comma'>,</span> <span class='id identifier rubyid_full_colored'>full_colored</span><span class='comma'>,</span> <span class='id identifier rubyid_print'>print</span><span class='comma'>,</span> <span class='id identifier rubyid_warn_banner'>warn_banner</span><span class='rparen'>)</span>
1861
+ <span class='kw'>end</span></pre>
1862
+ </td>
1863
+ </tr>
1864
+ </table>
1865
+ </div>
1866
+
1867
+ <div class="method_details ">
1868
+ <h3 class="signature " id="write-instance_method">
1869
+
1870
+ - (<tt>String</tt>) <strong>write</strong>(message, suffix = &quot;\n&quot;, indent = true, wrap = false, plain = false, print = true)
1871
+
1872
+
1873
+
1874
+
1875
+
1876
+ </h3><div class="docstring">
1877
+ <div class="discussion">
1878
+ <p>Writes a message.</p>
1879
+
1880
+
1881
+ </div>
1882
+ </div>
1883
+ <div class="tags">
1884
+ <p class="tag_title">Parameters:</p>
1885
+ <ul class="param">
1886
+
1887
+ <li>
1888
+
1889
+ <span class='name'>message</span>
1890
+
1891
+
1892
+ <span class='type'>(<tt>String</tt>)</span>
1893
+
1894
+
1895
+
1896
+ &mdash;
1897
+ <div class='inline'><p>The message to format.</p>
1898
+ </div>
1899
+
1900
+ </li>
1901
+
1902
+ <li>
1903
+
1904
+ <span class='name'>suffix</span>
1905
+
1906
+
1907
+ <span class='type'>(<tt>Object</tt>)</span>
1908
+
1909
+
1910
+ <em class="default">(defaults to: <tt>&quot;\n&quot;</tt>)</em>
1911
+
1912
+
1913
+ &mdash;
1914
+ <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>
1915
+ </div>
1916
+
1917
+ </li>
1918
+
1919
+ <li>
1920
+
1921
+ <span class='name'>indent</span>
1922
+
1923
+
1924
+ <span class='type'>(<tt>Object</tt>)</span>
1925
+
1926
+
1927
+ <em class="default">(defaults to: <tt>true</tt>)</em>
1928
+
1929
+
1930
+ &mdash;
1931
+ <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, a negative value of <code>-x</code> will indent of <code>x</code> absolute spaces.</p>
1932
+ </div>
1933
+
1934
+ </li>
1935
+
1936
+ <li>
1937
+
1938
+ <span class='name'>wrap</span>
1939
+
1940
+
1941
+ <span class='type'>(<tt>Object</tt>)</span>
1942
+
1943
+
1944
+ <em class="default">(defaults to: <tt>false</tt>)</em>
1945
+
1946
+
1947
+ &mdash;
1948
+ <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>
1949
+ </div>
1950
+
1951
+ </li>
1952
+
1953
+ <li>
1954
+
1955
+ <span class='name'>plain</span>
1956
+
1957
+
1958
+ <span class='type'>(<tt>Boolean</tt>)</span>
1959
+
1960
+
1961
+ <em class="default">(defaults to: <tt>false</tt>)</em>
1962
+
1963
+
1964
+ &mdash;
1965
+ <div class='inline'><p>If ignore color markers into the message.</p>
1966
+ </div>
1967
+
1968
+ </li>
1969
+
1970
+ <li>
1971
+
1972
+ <span class='name'>print</span>
1973
+
1974
+
1975
+ <span class='type'>(<tt>Boolean</tt>)</span>
1976
+
1977
+
1978
+ <em class="default">(defaults to: <tt>true</tt>)</em>
1979
+
1980
+
1981
+ &mdash;
1982
+ <div class='inline'><p>If <code>false</code>, the result will be returned instead of be printed.</p>
1983
+ </div>
1984
+
1985
+ </li>
1986
+
1987
+ </ul>
1988
+
1989
+ <p class="tag_title">Returns:</p>
1990
+ <ul class="return">
1991
+
1992
+ <li>
1993
+
1994
+
1995
+ <span class='type'>(<tt>String</tt>)</span>
1996
+
1997
+
1998
+
1999
+ &mdash;
2000
+ <div class='inline'><p>The printed message.</p>
2001
+ </div>
2002
+
2003
+ </li>
2004
+
2005
+ </ul>
2006
+
2007
+ <p class="tag_title">See Also:</p>
2008
+ <ul class="see">
2009
+
2010
+ <li>#format</li>
2011
+
2012
+ </ul>
2013
+
2014
+ </div><table class="source_code">
2015
+ <tr>
2016
+ <td>
2017
+ <pre class="lines">
2018
+
2019
+
2020
+ 272
2021
+ 273
2022
+ 274
2023
+ 275
2024
+ 276</pre>
2025
+ </td>
2026
+ <td>
2027
+ <pre class="code"><span class="info file"># File 'lib/bovem/console.rb', line 272</span>
2028
+
2029
+ <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='id identifier rubyid_suffix'>suffix</span> <span class='op'>=</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>\n</span><span class='tstring_end'>&quot;</span></span><span class='comma'>,</span> <span class='id identifier rubyid_indent'>indent</span> <span class='op'>=</span> <span class='kw'>true</span><span class='comma'>,</span> <span class='id identifier rubyid_wrap'>wrap</span> <span class='op'>=</span> <span class='kw'>false</span><span class='comma'>,</span> <span class='id identifier rubyid_plain'>plain</span> <span class='op'>=</span> <span class='kw'>false</span><span class='comma'>,</span> <span class='id identifier rubyid_print'>print</span> <span class='op'>=</span> <span class='kw'>true</span><span class='rparen'>)</span>
2030
+ <span class='id identifier rubyid_rv'>rv</span> <span class='op'>=</span> <span class='kw'>self</span><span class='period'>.</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 rubyid_indent'>indent</span><span class='comma'>,</span> <span class='id identifier rubyid_wrap'>wrap</span><span class='comma'>,</span> <span class='id identifier rubyid_plain'>plain</span><span class='rparen'>)</span>
2031
+ <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>
2032
+ <span class='id identifier rubyid_rv'>rv</span>
2033
+ <span class='kw'>end</span></pre>
2034
+ </td>
2035
+ </tr>
2036
+ </table>
2037
+ </div>
2038
+
2039
+ <div class="method_details ">
2040
+ <h3 class="signature " id="write_banner_aligned-instance_method">
2041
+
2042
+ - (<tt>String</tt>) <strong>write_banner_aligned</strong>(message, suffix = &quot;\n&quot;, indent = true, wrap = false, plain = false, print = true)
2043
+
2044
+
2045
+
2046
+
2047
+
2048
+ </h3><div class="docstring">
2049
+ <div class="discussion">
2050
+ <p>Writes a message, aligning to a call with an empty banner.</p>
2051
+
2052
+
2053
+ </div>
2054
+ </div>
2055
+ <div class="tags">
2056
+ <p class="tag_title">Parameters:</p>
2057
+ <ul class="param">
2058
+
2059
+ <li>
2060
+
2061
+ <span class='name'>message</span>
2062
+
2063
+
2064
+ <span class='type'>(<tt>String</tt>)</span>
2065
+
2066
+
2067
+
2068
+ &mdash;
2069
+ <div class='inline'><p>The message to format.</p>
2070
+ </div>
2071
+
2072
+ </li>
2073
+
2074
+ <li>
2075
+
2076
+ <span class='name'>suffix</span>
2077
+
2078
+
2079
+ <span class='type'>(<tt>Object</tt>)</span>
2080
+
2081
+
2082
+ <em class="default">(defaults to: <tt>&quot;\n&quot;</tt>)</em>
2083
+
2084
+
2085
+ &mdash;
2086
+ <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>
2087
+ </div>
2088
+
2089
+ </li>
2090
+
2091
+ <li>
2092
+
2093
+ <span class='name'>indent</span>
2094
+
2095
+
2096
+ <span class='type'>(<tt>Object</tt>)</span>
2097
+
2098
+
2099
+ <em class="default">(defaults to: <tt>true</tt>)</em>
2100
+
2101
+
2102
+ &mdash;
2103
+ <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, a negative value of <code>-x</code> will indent of <code>x</code> absolute spaces.</p>
2104
+ </div>
2105
+
2106
+ </li>
2107
+
2108
+ <li>
2109
+
2110
+ <span class='name'>wrap</span>
2111
+
2112
+
2113
+ <span class='type'>(<tt>Object</tt>)</span>
2114
+
2115
+
2116
+ <em class="default">(defaults to: <tt>false</tt>)</em>
2117
+
2118
+
2119
+ &mdash;
2120
+ <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>
2121
+ </div>
2122
+
2123
+ </li>
2124
+
2125
+ <li>
2126
+
2127
+ <span class='name'>plain</span>
2128
+
2129
+
2130
+ <span class='type'>(<tt>Boolean</tt>)</span>
2131
+
2132
+
2133
+ <em class="default">(defaults to: <tt>false</tt>)</em>
2134
+
2135
+
2136
+ &mdash;
2137
+ <div class='inline'><p>If ignore color markers into the message.</p>
2138
+ </div>
2139
+
2140
+ </li>
2141
+
2142
+ <li>
2143
+
2144
+ <span class='name'>print</span>
2145
+
2146
+
2147
+ <span class='type'>(<tt>Boolean</tt>)</span>
2148
+
2149
+
2150
+ <em class="default">(defaults to: <tt>true</tt>)</em>
2151
+
2152
+
2153
+ &mdash;
2154
+ <div class='inline'><p>If <code>false</code>, the result will be returned instead of be printed.</p>
2155
+ </div>
2156
+
2157
+ </li>
2158
+
2159
+ </ul>
2160
+
2161
+ <p class="tag_title">Returns:</p>
2162
+ <ul class="return">
2163
+
2164
+ <li>
2165
+
2166
+
2167
+ <span class='type'>(<tt>String</tt>)</span>
2168
+
2169
+
2170
+
2171
+ &mdash;
2172
+ <div class='inline'><p>The printed message.</p>
2173
+ </div>
2174
+
2175
+ </li>
2176
+
2177
+ </ul>
2178
+
2179
+ <p class="tag_title">See Also:</p>
2180
+ <ul class="see">
2181
+
2182
+ <li>#format</li>
2183
+
2184
+ </ul>
2185
+
2186
+ </div><table class="source_code">
2187
+ <tr>
2188
+ <td>
2189
+ <pre class="lines">
2190
+
2191
+
2192
+ 289
2193
+ 290
2194
+ 291</pre>
2195
+ </td>
2196
+ <td>
2197
+ <pre class="code"><span class="info file"># File 'lib/bovem/console.rb', line 289</span>
2198
+
2199
+ <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='id identifier rubyid_suffix'>suffix</span> <span class='op'>=</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>\n</span><span class='tstring_end'>&quot;</span></span><span class='comma'>,</span> <span class='id identifier rubyid_indent'>indent</span> <span class='op'>=</span> <span class='kw'>true</span><span class='comma'>,</span> <span class='id identifier rubyid_wrap'>wrap</span> <span class='op'>=</span> <span class='kw'>false</span><span class='comma'>,</span> <span class='id identifier rubyid_plain'>plain</span> <span class='op'>=</span> <span class='kw'>false</span><span class='comma'>,</span> <span class='id identifier rubyid_print'>print</span> <span class='op'>=</span> <span class='kw'>true</span><span class='rparen'>)</span>
2200
+ <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_write'>write</span><span class='lparen'>(</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'> </span><span class='tstring_end'>&quot;</span></span> <span class='op'>*</span> <span class='lparen'>(</span><span class='op'>::</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> <span class='id identifier rubyid_suffix'>suffix</span><span class='comma'>,</span> <span class='id identifier rubyid_indent'>indent</span><span class='comma'>,</span> <span class='id identifier rubyid_wrap'>wrap</span><span class='comma'>,</span> <span class='id identifier rubyid_plain'>plain</span><span class='comma'>,</span> <span class='id identifier rubyid_print'>print</span><span class='rparen'>)</span>
2201
+ <span class='kw'>end</span></pre>
2202
+ </td>
2203
+ </tr>
2204
+ </table>
2205
+ </div>
2206
+
2207
+ </div>
2208
+
2209
+ </div>
2210
+
2211
+ <div id="footer">
2212
+ Generated on Fri Feb 1 23:40:18 2013 by
2213
+ <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
2214
+ 0.8.3 (ruby-1.9.3).
2215
+ </div>
2216
+
2217
+ </body>
2218
+ </html>