bovem 3.0.5 → 4.0.0
Sign up to get free protection for your applications and to get access to all the features.
- 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::Logging::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/Logging/ClassMethods.html";
|
21
21
|
</script>
|
22
22
|
|
23
23
|
|
@@ -183,12 +183,12 @@
|
|
183
183
|
<pre class="lines">
|
184
184
|
|
185
185
|
|
186
|
-
|
187
|
-
|
188
|
-
|
186
|
+
285
|
187
|
+
286
|
188
|
+
287</pre>
|
189
189
|
</td>
|
190
190
|
<td>
|
191
|
-
<pre class="code"><span class="info file"># File 'lib/bovem/console.rb', line
|
191
|
+
<pre class="code"><span class="info file"># File 'lib/bovem/console.rb', line 285</span>
|
192
192
|
|
193
193
|
<span class='kw'>def</span> <span class='id identifier rubyid_min_banner_length'>min_banner_length</span>
|
194
194
|
<span class='int'>1</span>
|
@@ -203,9 +203,9 @@
|
|
203
203
|
</div>
|
204
204
|
|
205
205
|
<div id="footer">
|
206
|
-
Generated on
|
206
|
+
Generated on Tue Mar 29 20:43:16 2016 by
|
207
207
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
208
|
-
0.8.7.
|
208
|
+
0.8.7.6 (ruby-2.3.0).
|
209
209
|
</div>
|
210
210
|
|
211
211
|
</body>
|
@@ -6,7 +6,7 @@
|
|
6
6
|
<title>
|
7
7
|
Module: Bovem::ConsoleMethods::Output
|
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/Output.html";
|
21
21
|
</script>
|
22
22
|
|
23
23
|
|
@@ -139,7 +139,7 @@
|
|
139
139
|
<li class="public ">
|
140
140
|
<span class="summary_signature">
|
141
141
|
|
142
|
-
<a href="#format-instance_method" title="#format (instance method)">- (String) <strong>format</strong>(message, suffix
|
142
|
+
<a href="#format-instance_method" title="#format (instance method)">- (String) <strong>format</strong>(message, suffix: "\n", indented: true, wrap: true, plain: false) </a>
|
143
143
|
|
144
144
|
|
145
145
|
|
@@ -162,7 +162,7 @@
|
|
162
162
|
<li class="public ">
|
163
163
|
<span class="summary_signature">
|
164
164
|
|
165
|
-
<a href="#format_right-instance_method" title="#format_right (instance method)">- (String) <strong>format_right</strong>(message, width
|
165
|
+
<a href="#format_right-instance_method" title="#format_right (instance method)">- (String) <strong>format_right</strong>(message, width: true, go_up: true, plain: false) </a>
|
166
166
|
|
167
167
|
|
168
168
|
|
@@ -384,12 +384,12 @@
|
|
384
384
|
<pre class="lines">
|
385
385
|
|
386
386
|
|
387
|
-
|
388
|
-
|
389
|
-
|
387
|
+
244
|
388
|
+
245
|
389
|
+
246</pre>
|
390
390
|
</td>
|
391
391
|
<td>
|
392
|
-
<pre class="code"><span class="info file"># File 'lib/bovem/console.rb', line
|
392
|
+
<pre class="code"><span class="info file"># File 'lib/bovem/console.rb', line 244</span>
|
393
393
|
|
394
394
|
<span class='kw'>def</span> <span class='id identifier rubyid_emphasize'>emphasize</span><span class='lparen'>(</span><span class='id identifier rubyid_message'>message</span><span class='comma'>,</span> <span class='id identifier rubyid_style'>style</span> <span class='op'>=</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>bright</span><span class='tstring_end'>"</span></span><span class='rparen'>)</span>
|
395
395
|
<span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>{mark=</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_style'>style</span><span class='embexpr_end'>}</span><span class='tstring_content'>}</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_message'>message</span><span class='embexpr_end'>}</span><span class='tstring_content'>{/mark}</span><span class='tstring_end'>"</span></span>
|
@@ -402,7 +402,7 @@
|
|
402
402
|
<div class="method_details ">
|
403
403
|
<h3 class="signature " id="format-instance_method">
|
404
404
|
|
405
|
-
- (<tt>String</tt>) <strong>format</strong>(message, suffix
|
405
|
+
- (<tt>String</tt>) <strong>format</strong>(message, suffix: "\n", indented: true, wrap: true, plain: false)
|
406
406
|
|
407
407
|
|
408
408
|
|
@@ -444,8 +444,6 @@
|
|
444
444
|
<span class='type'>(<tt>Object</tt>)</span>
|
445
445
|
|
446
446
|
|
447
|
-
<em class="default">(defaults to: <tt>"\n"</tt>)</em>
|
448
|
-
|
449
447
|
|
450
448
|
—
|
451
449
|
<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>
|
@@ -455,17 +453,16 @@
|
|
455
453
|
|
456
454
|
<li>
|
457
455
|
|
458
|
-
<span class='name'>
|
456
|
+
<span class='name'>indented</span>
|
459
457
|
|
460
458
|
|
461
459
|
<span class='type'>(<tt>Object</tt>)</span>
|
462
460
|
|
463
461
|
|
464
|
-
<em class="default">(defaults to: <tt>true</tt>)</em>
|
465
|
-
|
466
462
|
|
467
463
|
—
|
468
|
-
<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,
|
464
|
+
<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,
|
465
|
+
a negative value of <code>-x</code> will indent of <code>x</code> absolute spaces.</p>
|
469
466
|
</div>
|
470
467
|
|
471
468
|
</li>
|
@@ -478,8 +475,6 @@
|
|
478
475
|
<span class='type'>(<tt>Object</tt>)</span>
|
479
476
|
|
480
477
|
|
481
|
-
<em class="default">(defaults to: <tt>true</tt>)</em>
|
482
|
-
|
483
478
|
|
484
479
|
—
|
485
480
|
<div class='inline'><p>If not <code>nil</code> or <code>false</code>, the maximum length of a line. <code>true</code> means the current line width.</p>
|
@@ -495,8 +490,6 @@
|
|
495
490
|
<span class='type'>(<tt>Boolean</tt>)</span>
|
496
491
|
|
497
492
|
|
498
|
-
<em class="default">(defaults to: <tt>false</tt>)</em>
|
499
|
-
|
500
493
|
|
501
494
|
—
|
502
495
|
<div class='inline'><p>If ignore color markers into the message.</p>
|
@@ -537,49 +530,31 @@
|
|
537
530
|
<pre class="lines">
|
538
531
|
|
539
532
|
|
540
|
-
191
|
541
|
-
192
|
542
|
-
193
|
543
|
-
194
|
544
|
-
195
|
545
|
-
196
|
546
|
-
197
|
547
|
-
198
|
548
|
-
199
|
549
|
-
200
|
550
|
-
201
|
551
|
-
202
|
552
|
-
203
|
553
|
-
204
|
554
|
-
205
|
555
|
-
206
|
556
533
|
207
|
557
534
|
208
|
558
535
|
209
|
559
536
|
210
|
560
|
-
211
|
537
|
+
211
|
538
|
+
212
|
539
|
+
213
|
540
|
+
214
|
541
|
+
215
|
542
|
+
216
|
543
|
+
217
|
544
|
+
218</pre>
|
561
545
|
</td>
|
562
546
|
<td>
|
563
|
-
<pre class="code"><span class="info file"># File 'lib/bovem/console.rb', line
|
547
|
+
<pre class="code"><span class="info file"># File 'lib/bovem/console.rb', line 207</span>
|
564
548
|
|
565
|
-
<span class='kw'>def</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='
|
549
|
+
<span class='kw'>def</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='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'>true</span><span class='comma'>,</span> <span class='label'>plain:</span> <span class='kw'>false</span><span class='rparen'>)</span>
|
566
550
|
<span class='id identifier rubyid_rv'>rv</span> <span class='op'>=</span> <span class='id identifier rubyid_message'>message</span>
|
567
551
|
|
568
552
|
<span class='id identifier rubyid_rv'>rv</span> <span class='op'>=</span> <span class='id identifier rubyid_replace_markers'>replace_markers</span><span class='lparen'>(</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'># Replace markers
|
569
553
|
</span>
|
570
554
|
<span class='comment'># Compute the real width available for the screen, if we both indent and wrap
|
571
|
-
</span> <span class='kw'>if</span> <span class='id identifier rubyid_wrap'>wrap</span><span class='period'>.</span><span class='id identifier rubyid_is_a?'>is_a?</span><span class='lparen'>(</span><span class='const'>TrueClass</span><span class='rparen'>)</span>
|
572
|
-
<span class='id identifier rubyid_wrap'>wrap</span> <span class='op'>=</span> <span class='id identifier rubyid_line_width'>line_width</span>
|
573
|
-
|
574
|
-
<span class='kw'>if</span> <span class='id identifier rubyid_indent'>indent</span><span class='period'>.</span><span class='id identifier rubyid_is_a?'>is_a?</span><span class='lparen'>(</span><span class='const'>TrueClass</span><span class='rparen'>)</span> <span class='kw'>then</span>
|
575
|
-
<span class='id identifier rubyid_wrap'>wrap</span> <span class='op'>-=</span> <span class='ivar'>@indentation</span>
|
576
|
-
<span class='kw'>else</span>
|
577
|
-
<span class='id identifier rubyid_indent_i'>indent_i</span> <span class='op'>=</span> <span class='id identifier rubyid_indent'>indent</span><span class='period'>.</span><span class='id identifier rubyid_to_integer'>to_integer</span>
|
578
|
-
<span class='id identifier rubyid_wrap'>wrap</span> <span class='op'>-=</span> <span class='lparen'>(</span><span class='id identifier rubyid_indent_i'>indent_i</span> <span class='op'>></span> <span class='int'>0</span> <span class='op'>?</span> <span class='ivar'>@indentation</span> <span class='op'>:</span> <span class='int'>0</span><span class='rparen'>)</span> <span class='op'>+</span> <span class='id identifier rubyid_indent_i'>indent_i</span>
|
579
|
-
<span class='kw'>end</span>
|
580
|
-
<span class='kw'>end</span>
|
555
|
+
</span> <span class='id identifier rubyid_wrap'>wrap</span> <span class='op'>=</span> <span class='id identifier rubyid_compute_wrap'>compute_wrap</span><span class='lparen'>(</span><span class='id identifier rubyid_indented'>indented</span><span class='rparen'>)</span> <span class='kw'>if</span> <span class='id identifier rubyid_wrap'>wrap</span><span class='period'>.</span><span class='id identifier rubyid_is_a?'>is_a?</span><span class='lparen'>(</span><span class='const'>TrueClass</span><span class='rparen'>)</span>
|
581
556
|
|
582
|
-
<span class='id identifier rubyid_rv'>rv</span> <span class='op'>=</span> <span class='id identifier rubyid_indent'>indent</span><span class='lparen'>(</span><span class='id identifier rubyid_wrap'>wrap</span><span class='lparen'>(</span><span class='id identifier rubyid_rv'>rv</span><span class='comma'>,</span> <span class='id identifier rubyid_wrap'>wrap</span><span class='rparen'>)</span><span class='comma'>,</span> <span class='id identifier
|
557
|
+
<span class='id identifier rubyid_rv'>rv</span> <span class='op'>=</span> <span class='id identifier rubyid_indent'>indent</span><span class='lparen'>(</span><span class='id identifier rubyid_wrap'>wrap</span><span class='lparen'>(</span><span class='id identifier rubyid_rv'>rv</span><span class='comma'>,</span> <span class='id identifier rubyid_wrap'>wrap</span><span class='rparen'>)</span><span class='comma'>,</span> <span class='id identifier rubyid_indented'>indented</span><span class='rparen'>)</span> <span class='comment'># Wrap & Indent
|
583
558
|
</span> <span class='id identifier rubyid_rv'>rv</span> <span class='op'>+=</span> <span class='lparen'>(</span><span class='id identifier rubyid_suffix'>suffix</span><span class='period'>.</span><span class='id identifier rubyid_is_a?'>is_a?</span><span class='lparen'>(</span><span class='const'>TrueClass</span><span class='rparen'>)</span> <span class='op'>?</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>\n</span><span class='tstring_end'>"</span></span> <span class='op'>:</span> <span class='id identifier rubyid_suffix'>suffix</span><span class='period'>.</span><span class='id identifier rubyid_ensure_string'>ensure_string</span><span class='rparen'>)</span> <span class='kw'>if</span> <span class='id identifier rubyid_suffix'>suffix</span> <span class='comment'># Add the suffix
|
584
559
|
</span> <span class='id identifier rubyid_rv'>rv</span>
|
585
560
|
<span class='kw'>end</span></pre>
|
@@ -591,7 +566,7 @@
|
|
591
566
|
<div class="method_details ">
|
592
567
|
<h3 class="signature " id="format_right-instance_method">
|
593
568
|
|
594
|
-
- (<tt>String</tt>) <strong>format_right</strong>(message, width
|
569
|
+
- (<tt>String</tt>) <strong>format_right</strong>(message, width: true, go_up: true, plain: false)
|
595
570
|
|
596
571
|
|
597
572
|
|
@@ -631,8 +606,6 @@
|
|
631
606
|
<span class='type'>(<tt>Fixnum</tt>)</span>
|
632
607
|
|
633
608
|
|
634
|
-
<em class="default">(defaults to: <tt>true</tt>)</em>
|
635
|
-
|
636
609
|
|
637
610
|
—
|
638
611
|
<div class='inline'><p>The screen width. If <code>true</code>, it is automatically computed.</p>
|
@@ -648,8 +621,6 @@
|
|
648
621
|
<span class='type'>(<tt>Boolean</tt>)</span>
|
649
622
|
|
650
623
|
|
651
|
-
<em class="default">(defaults to: <tt>true</tt>)</em>
|
652
|
-
|
653
624
|
|
654
625
|
—
|
655
626
|
<div class='inline'><p>If go up one line before formatting.</p>
|
@@ -665,8 +636,6 @@
|
|
665
636
|
<span class='type'>(<tt>Boolean</tt>)</span>
|
666
637
|
|
667
638
|
|
668
|
-
<em class="default">(defaults to: <tt>false</tt>)</em>
|
669
|
-
|
670
639
|
|
671
640
|
—
|
672
641
|
<div class='inline'><p>If ignore color markers into the message.</p>
|
@@ -700,22 +669,22 @@
|
|
700
669
|
<pre class="lines">
|
701
670
|
|
702
671
|
|
703
|
-
220
|
704
|
-
221
|
705
|
-
222
|
706
|
-
223
|
707
|
-
224
|
708
|
-
225
|
709
|
-
226
|
710
672
|
227
|
711
673
|
228
|
712
674
|
229
|
713
|
-
230
|
675
|
+
230
|
676
|
+
231
|
677
|
+
232
|
678
|
+
233
|
679
|
+
234
|
680
|
+
235
|
681
|
+
236
|
682
|
+
237</pre>
|
714
683
|
</td>
|
715
684
|
<td>
|
716
|
-
<pre class="code"><span class="info file"># File 'lib/bovem/console.rb', line
|
685
|
+
<pre class="code"><span class="info file"># File 'lib/bovem/console.rb', line 227</span>
|
717
686
|
|
718
|
-
<span class='kw'>def</span> <span class='id identifier rubyid_format_right'>format_right</span><span class='lparen'>(</span><span class='id identifier rubyid_message'>message</span><span class='comma'>,</span> <span class='
|
687
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_format_right'>format_right</span><span class='lparen'>(</span><span class='id identifier rubyid_message'>message</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='kw'>true</span><span class='comma'>,</span> <span class='label'>plain:</span> <span class='kw'>false</span><span class='rparen'>)</span>
|
719
688
|
<span class='id identifier rubyid_message'>message</span> <span class='op'>=</span> <span class='id identifier rubyid_replace_markers'>replace_markers</span><span class='lparen'>(</span><span class='id identifier rubyid_message'>message</span><span class='comma'>,</span> <span class='id identifier rubyid_plain'>plain</span><span class='rparen'>)</span>
|
720
689
|
|
721
690
|
<span class='id identifier rubyid_width'>width</span> <span class='op'>=</span> <span class='lparen'>(</span><span class='id identifier rubyid_width'>width</span> <span class='op'>==</span> <span class='kw'>true</span> <span class='op'>||</span> <span class='id identifier rubyid_width'>width</span><span class='period'>.</span><span class='id identifier rubyid_to_integer'>to_integer</span> <span class='op'><</span> <span class='int'>1</span> <span class='op'>?</span> <span class='id identifier rubyid_line_width'>line_width</span> <span class='op'>:</span> <span class='id identifier rubyid_to_integer'>to_integer</span><span class='rparen'>)</span>
|
@@ -778,7 +747,8 @@
|
|
778
747
|
|
779
748
|
|
780
749
|
—
|
781
|
-
<div class='inline'><p>The indentation width. <code>true</code> means to use the current indentation, a negative value of <code>-x</code>
|
750
|
+
<div class='inline'><p>The indentation width. <code>true</code> means to use the current indentation, a negative value of <code>-x</code>
|
751
|
+
will indent of <code>x</code> absolute spaces. <code>nil</code> or <code>false</code> will skip indentation.</p>
|
782
752
|
</div>
|
783
753
|
|
784
754
|
</li>
|
@@ -826,30 +796,34 @@
|
|
826
796
|
<pre class="lines">
|
827
797
|
|
828
798
|
|
829
|
-
|
830
|
-
|
831
|
-
|
832
|
-
|
833
|
-
|
834
|
-
|
835
|
-
|
836
|
-
|
837
|
-
|
838
|
-
|
839
|
-
|
840
|
-
|
799
|
+
179
|
800
|
+
180
|
801
|
+
181
|
802
|
+
182
|
803
|
+
183
|
804
|
+
184
|
805
|
+
185
|
806
|
+
186
|
807
|
+
187
|
808
|
+
188
|
809
|
+
189
|
810
|
+
190
|
811
|
+
191
|
812
|
+
192</pre>
|
841
813
|
</td>
|
842
814
|
<td>
|
843
|
-
<pre class="code"><span class="info file"># File 'lib/bovem/console.rb', line
|
815
|
+
<pre class="code"><span class="info file"># File 'lib/bovem/console.rb', line 179</span>
|
844
816
|
|
845
817
|
<span class='kw'>def</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_width'>width</span> <span class='op'>=</span> <span class='kw'>true</span><span class='comma'>,</span> <span class='id identifier rubyid_newline_separator'>newline_separator</span> <span class='op'>=</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>\n</span><span class='tstring_end'>"</span></span><span class='rparen'>)</span>
|
846
|
-
<span class='kw'>if</span> <span class='id identifier rubyid_width'>width</span><span class='period'>.</span><span class='id identifier rubyid_to_integer'>to_integer</span> <span class='op'>!=</span> <span class='int'>0</span>
|
818
|
+
<span class='kw'>if</span> <span class='id identifier rubyid_width'>width</span><span class='period'>.</span><span class='id identifier rubyid_to_integer'>to_integer</span> <span class='op'>!=</span> <span class='int'>0</span>
|
847
819
|
<span class='id identifier rubyid_width'>width</span> <span class='op'>=</span> <span class='lparen'>(</span><span class='id identifier rubyid_width'>width</span><span class='period'>.</span><span class='id identifier rubyid_is_a?'>is_a?</span><span class='lparen'>(</span><span class='const'>TrueClass</span><span class='rparen'>)</span> <span class='op'>?</span> <span class='int'>0</span> <span class='op'>:</span> <span class='id identifier rubyid_width'>width</span><span class='period'>.</span><span class='id identifier rubyid_to_integer'>to_integer</span><span class='rparen'>)</span>
|
848
820
|
<span class='id identifier rubyid_width'>width</span> <span class='op'>=</span> <span class='id identifier rubyid_width'>width</span> <span class='op'><</span> <span class='int'>0</span> <span class='op'>?</span> <span class='op'>-</span><span class='id identifier rubyid_width'>width</span> <span class='op'>:</span> <span class='ivar'>@indentation</span> <span class='op'>+</span> <span class='id identifier rubyid_width'>width</span>
|
849
821
|
|
850
|
-
<span class='id identifier
|
822
|
+
<span class='id identifier rubyid_rv'>rv</span> <span class='op'>=</span> <span class='id identifier rubyid_message'>message</span><span class='period'>.</span><span class='id identifier rubyid_split'>split</span><span class='lparen'>(</span><span class='id identifier rubyid_newline_separator'>newline_separator</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_map'>map</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_line'>line</span><span class='op'>|</span>
|
851
823
|
<span class='lparen'>(</span><span class='ivar'>@indentation_string</span> <span class='op'>*</span> <span class='id identifier rubyid_width'>width</span><span class='rparen'>)</span> <span class='op'>+</span> <span class='id identifier rubyid_line'>line</span>
|
852
|
-
<span class='
|
824
|
+
<span class='kw'>end</span>
|
825
|
+
|
826
|
+
<span class='id identifier rubyid_message'>message</span> <span class='op'>=</span> <span class='id identifier rubyid_rv'>rv</span><span class='period'>.</span><span class='id identifier rubyid_join'>join</span><span class='lparen'>(</span><span class='id identifier rubyid_newline_separator'>newline_separator</span><span class='rparen'>)</span>
|
853
827
|
<span class='kw'>end</span>
|
854
828
|
|
855
829
|
<span class='id identifier rubyid_message'>message</span>
|
@@ -901,12 +875,12 @@
|
|
901
875
|
<pre class="lines">
|
902
876
|
|
903
877
|
|
904
|
-
|
905
|
-
|
906
|
-
|
878
|
+
135
|
879
|
+
136
|
880
|
+
137</pre>
|
907
881
|
</td>
|
908
882
|
<td>
|
909
|
-
<pre class="code"><span class="info file"># File 'lib/bovem/console.rb', line
|
883
|
+
<pre class="code"><span class="info file"># File 'lib/bovem/console.rb', line 135</span>
|
910
884
|
|
911
885
|
<span class='kw'>def</span> <span class='id identifier rubyid_reset_indentation'>reset_indentation</span>
|
912
886
|
<span class='ivar'>@indentation</span> <span class='op'>=</span> <span class='int'>0</span>
|
@@ -994,12 +968,12 @@
|
|
994
968
|
<pre class="lines">
|
995
969
|
|
996
970
|
|
997
|
-
|
998
|
-
|
999
|
-
|
971
|
+
128
|
972
|
+
129
|
973
|
+
130</pre>
|
1000
974
|
</td>
|
1001
975
|
<td>
|
1002
|
-
<pre class="code"><span class="info file"># File 'lib/bovem/console.rb', line
|
976
|
+
<pre class="code"><span class="info file"># File 'lib/bovem/console.rb', line 128</span>
|
1003
977
|
|
1004
978
|
<span class='kw'>def</span> <span class='id identifier rubyid_set_indentation'>set_indentation</span><span class='lparen'>(</span><span class='id identifier rubyid_width'>width</span><span class='comma'>,</span> <span class='id identifier rubyid_is_absolute'>is_absolute</span> <span class='op'>=</span> <span class='kw'>false</span><span class='rparen'>)</span>
|
1005
979
|
<span class='ivar'>@indentation</span> <span class='op'>=</span> <span class='lbracket'>[</span><span class='lparen'>(</span><span class='op'>!</span><span class='id identifier rubyid_is_absolute'>is_absolute</span> <span class='op'>?</span> <span class='ivar'>@indentation</span> <span class='op'>:</span> <span class='int'>0</span><span class='rparen'>)</span> <span class='op'>+</span> <span class='id identifier rubyid_width'>width</span><span class='comma'>,</span> <span class='int'>0</span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_max'>max</span><span class='period'>.</span><span class='id identifier rubyid_to_i'>to_i</span>
|
@@ -1089,17 +1063,17 @@
|
|
1089
1063
|
<pre class="lines">
|
1090
1064
|
|
1091
1065
|
|
1092
|
-
|
1093
|
-
|
1094
|
-
|
1095
|
-
|
1096
|
-
|
1097
|
-
|
1098
|
-
|
1099
|
-
|
1066
|
+
144
|
1067
|
+
145
|
1068
|
+
146
|
1069
|
+
147
|
1070
|
+
148
|
1071
|
+
149
|
1072
|
+
150
|
1073
|
+
151</pre>
|
1100
1074
|
</td>
|
1101
1075
|
<td>
|
1102
|
-
<pre class="code"><span class="info file"># File 'lib/bovem/console.rb', line
|
1076
|
+
<pre class="code"><span class="info file"># File 'lib/bovem/console.rb', line 144</span>
|
1103
1077
|
|
1104
1078
|
<span class='kw'>def</span> <span class='id identifier rubyid_with_indentation'>with_indentation</span><span class='lparen'>(</span><span class='id identifier rubyid_width'>width</span> <span class='op'>=</span> <span class='int'>3</span><span class='comma'>,</span> <span class='id identifier rubyid_is_absolute'>is_absolute</span> <span class='op'>=</span> <span class='kw'>false</span><span class='rparen'>)</span>
|
1105
1079
|
<span class='id identifier rubyid_old'>old</span> <span class='op'>=</span> <span class='ivar'>@indentation</span>
|
@@ -1192,30 +1166,34 @@
|
|
1192
1166
|
<pre class="lines">
|
1193
1167
|
|
1194
1168
|
|
1195
|
-
|
1196
|
-
|
1197
|
-
|
1198
|
-
|
1199
|
-
|
1200
|
-
|
1201
|
-
|
1202
|
-
|
1203
|
-
|
1204
|
-
|
1205
|
-
|
1169
|
+
158
|
1170
|
+
159
|
1171
|
+
160
|
1172
|
+
161
|
1173
|
+
162
|
1174
|
+
163
|
1175
|
+
164
|
1176
|
+
165
|
1177
|
+
166
|
1178
|
+
167
|
1179
|
+
168
|
1180
|
+
169
|
1181
|
+
170</pre>
|
1206
1182
|
</td>
|
1207
1183
|
<td>
|
1208
|
-
<pre class="code"><span class="info file"># File 'lib/bovem/console.rb', line
|
1184
|
+
<pre class="code"><span class="info file"># File 'lib/bovem/console.rb', line 158</span>
|
1209
1185
|
|
1210
1186
|
<span class='kw'>def</span> <span class='id identifier rubyid_wrap'>wrap</span><span class='lparen'>(</span><span class='id identifier rubyid_message'>message</span><span class='comma'>,</span> <span class='id identifier rubyid_width'>width</span> <span class='op'>=</span> <span class='kw'>nil</span><span class='rparen'>)</span>
|
1211
|
-
<span class='kw'>if</span> <span class='id identifier rubyid_width'>width</span><span class='period'>.</span><span class='id identifier rubyid_to_integer'>to_integer</span> <span class='op'><=</span> <span class='int'>0</span>
|
1187
|
+
<span class='kw'>if</span> <span class='id identifier rubyid_width'>width</span><span class='period'>.</span><span class='id identifier rubyid_to_integer'>to_integer</span> <span class='op'><=</span> <span class='int'>0</span>
|
1212
1188
|
<span class='id identifier rubyid_message'>message</span>
|
1213
1189
|
<span class='kw'>else</span>
|
1214
1190
|
<span class='id identifier rubyid_width'>width</span> <span class='op'>=</span> <span class='lparen'>(</span><span class='id identifier rubyid_width'>width</span> <span class='op'>==</span> <span class='kw'>true</span> <span class='op'>||</span> <span class='id identifier rubyid_width'>width</span><span class='period'>.</span><span class='id identifier rubyid_to_integer'>to_integer</span> <span class='op'><</span> <span class='int'>0</span> <span class='op'>?</span> <span class='id identifier rubyid_line_width'>line_width</span> <span class='op'>:</span> <span class='id identifier rubyid_width'>width</span><span class='period'>.</span><span class='id identifier rubyid_to_integer'>to_integer</span><span class='rparen'>)</span>
|
1215
1191
|
|
1216
|
-
<span class='id identifier rubyid_message'>message</span><span class='period'>.</span><span class='id identifier rubyid_split'>split</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>\n</span><span class='tstring_end'>"</span></span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_map'>map</span> <span class='
|
1217
|
-
<span class='id identifier
|
1218
|
-
<span class='
|
1192
|
+
<span class='id identifier rubyid_rv'>rv</span> <span class='op'>=</span> <span class='id identifier rubyid_message'>message</span><span class='period'>.</span><span class='id identifier rubyid_split'>split</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>\n</span><span class='tstring_end'>"</span></span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_map'>map</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_line'>line</span><span class='op'>|</span>
|
1193
|
+
<span class='id identifier rubyid_wrap_line'>wrap_line</span><span class='lparen'>(</span><span class='id identifier rubyid_line'>line</span><span class='comma'>,</span> <span class='id identifier rubyid_width'>width</span><span class='rparen'>)</span>
|
1194
|
+
<span class='kw'>end</span>
|
1195
|
+
|
1196
|
+
<span class='id identifier rubyid_rv'>rv</span><span class='period'>.</span><span class='id identifier rubyid_join'>join</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>\n</span><span class='tstring_end'>"</span></span><span class='rparen'>)</span>
|
1219
1197
|
<span class='kw'>end</span>
|
1220
1198
|
<span class='kw'>end</span></pre>
|
1221
1199
|
</td>
|
@@ -1228,9 +1206,9 @@
|
|
1228
1206
|
</div>
|
1229
1207
|
|
1230
1208
|
<div id="footer">
|
1231
|
-
Generated on
|
1209
|
+
Generated on Tue Mar 29 20:43:16 2016 by
|
1232
1210
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
1233
|
-
0.8.7.
|
1211
|
+
0.8.7.6 (ruby-2.3.0).
|
1234
1212
|
</div>
|
1235
1213
|
|
1236
1214
|
</body>
|