term_utils 0.3.2 → 0.4.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +9 -2
- data/COPYING +3 -3
- data/README.md +51 -16
- data/doc/TermUtils.html +9 -9
- data/doc/TermUtils/AP.html +48 -159
- data/doc/TermUtils/AP/Article.html +48 -46
- data/doc/TermUtils/AP/ArticleResult.html +584 -0
- data/doc/TermUtils/AP/Flag.html +294 -77
- data/doc/TermUtils/AP/NoSuchValueError.html +13 -13
- data/doc/TermUtils/AP/Parameter.html +885 -97
- data/doc/TermUtils/AP/ParameterResult.html +980 -0
- data/doc/TermUtils/{FF/Cursor/Context.html → AP/ParameterWalkerHooks.html} +59 -59
- data/doc/TermUtils/AP/ParseError.html +13 -13
- data/doc/TermUtils/AP/Parser.html +174 -142
- data/doc/TermUtils/AP/Result.html +200 -527
- data/doc/TermUtils/AP/Syntax.html +102 -392
- data/doc/TermUtils/AP/SyntaxError.html +13 -13
- data/doc/TermUtils/AP/Walker.html +686 -0
- data/doc/TermUtils/FF.html +10 -10
- data/doc/TermUtils/FF/Config.html +201 -33
- data/doc/TermUtils/FF/Context.html +585 -0
- data/doc/TermUtils/FF/Entry.html +626 -0
- data/doc/TermUtils/FF/Query.html +402 -66
- data/doc/TermUtils/PropertyTreeNode.html +302 -188
- data/doc/TermUtils/Tab.html +90 -83
- data/doc/TermUtils/Tab/Column.html +94 -92
- data/doc/TermUtils/Tab/Header.html +26 -26
- data/doc/TermUtils/Tab/Holder.html +74 -74
- data/doc/TermUtils/Tab/Printer.html +42 -42
- data/doc/TermUtils/Tab/Table.html +124 -128
- data/doc/TermUtils/Tab/TableError.html +11 -11
- data/doc/_index.html +48 -34
- data/doc/class_list.html +3 -3
- data/doc/css/style.css +2 -2
- data/doc/file.README.html +64 -31
- data/doc/file_list.html +2 -2
- data/doc/frames.html +2 -2
- data/doc/index.html +64 -31
- data/doc/js/app.js +14 -3
- data/doc/method_list.html +387 -211
- data/doc/top-level-namespace.html +6 -6
- data/lib/term_utils.rb +8 -1
- data/lib/term_utils/ap.rb +41 -30
- data/lib/term_utils/ap/article.rb +14 -8
- data/lib/term_utils/ap/flag.rb +36 -19
- data/lib/term_utils/ap/parameter.rb +87 -18
- data/lib/term_utils/ap/parser.rb +141 -115
- data/lib/term_utils/ap/result.rb +207 -160
- data/lib/term_utils/ap/syntax.rb +52 -68
- data/lib/term_utils/ff.rb +11 -2
- data/lib/term_utils/ff/config.rb +20 -8
- data/lib/term_utils/{ap/no_such_value_error.rb → ff/entry.rb} +25 -7
- data/lib/term_utils/ff/query.rb +93 -14
- data/lib/term_utils/property_tree_node.rb +47 -19
- data/lib/term_utils/tab.rb +102 -58
- data/term_utils.gemspec +4 -4
- metadata +12 -14
- data/doc/TermUtils/AP/Element.html +0 -1025
- data/doc/TermUtils/AP/Level.html +0 -638
- data/doc/TermUtils/FF/Cursor.html +0 -929
- data/lib/term_utils/ap/element.rb +0 -78
- data/lib/term_utils/ap/level.rb +0 -57
- data/lib/term_utils/ap/parse_error.rb +0 -27
- data/lib/term_utils/ap/syntax_error.rb +0 -27
- data/lib/term_utils/ff/cursor.rb +0 -153
@@ -6,15 +6,15 @@
|
|
6
6
|
<title>
|
7
7
|
Class: TermUtils::Tab::Table
|
8
8
|
|
9
|
-
— Documentation by YARD 0.9.
|
9
|
+
— Documentation by YARD 0.9.25
|
10
10
|
|
11
11
|
</title>
|
12
12
|
|
13
|
-
<link rel="stylesheet" href="../../css/style.css" type="text/css"
|
13
|
+
<link rel="stylesheet" href="../../css/style.css" type="text/css" />
|
14
14
|
|
15
|
-
<link rel="stylesheet" href="../../css/common.css" type="text/css"
|
15
|
+
<link rel="stylesheet" href="../../css/common.css" type="text/css" />
|
16
16
|
|
17
|
-
<script type="text/javascript"
|
17
|
+
<script type="text/javascript">
|
18
18
|
pathId = "TermUtils::Tab::Table";
|
19
19
|
relpath = '../../';
|
20
20
|
</script>
|
@@ -517,7 +517,7 @@
|
|
517
517
|
</h3><div class="docstring">
|
518
518
|
<div class="discussion">
|
519
519
|
|
520
|
-
<p>Returns a new instance of Table
|
520
|
+
<p>Returns a new instance of Table.</p>
|
521
521
|
|
522
522
|
|
523
523
|
</div>
|
@@ -584,32 +584,24 @@
|
|
584
584
|
<pre class="lines">
|
585
585
|
|
586
586
|
|
587
|
-
120
|
588
|
-
121
|
589
|
-
122
|
590
|
-
123
|
591
|
-
124
|
592
|
-
125
|
593
|
-
126
|
594
|
-
127
|
595
587
|
128
|
596
588
|
129
|
597
589
|
130
|
598
|
-
131
|
590
|
+
131
|
591
|
+
132
|
592
|
+
133
|
593
|
+
134
|
594
|
+
135</pre>
|
599
595
|
</td>
|
600
596
|
<td>
|
601
|
-
<pre class="code"><span class="info file"># File 'lib/term_utils/tab.rb', line
|
597
|
+
<pre class="code"><span class="info file"># File 'lib/term_utils/tab.rb', line 128</span>
|
602
598
|
|
603
599
|
<span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span><span class='lparen'>(</span><span class='id identifier rubyid_opts'>opts</span> <span class='op'>=</span> <span class='lbrace'>{</span><span class='rbrace'>}</span><span class='rparen'>)</span>
|
604
600
|
<span class='id identifier rubyid_opts'>opts</span> <span class='op'>=</span> <span class='const'><span class='object_link'><a href="../../TermUtils.html" title="TermUtils (module)">TermUtils</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../Tab.html" title="TermUtils::Tab (module)">Tab</a></span></span><span class='period'>.</span><span class='id identifier rubyid_init_table_props'><span class='object_link'><a href="../Tab.html#init_table_props-class_method" title="TermUtils::Tab.init_table_props (method)">init_table_props</a></span></span><span class='period'>.</span><span class='id identifier rubyid_merge'>merge</span><span class='lparen'>(</span><span class='id identifier rubyid_opts'>opts</span><span class='rparen'>)</span>
|
605
601
|
<span class='ivar'>@id</span> <span class='op'>=</span> <span class='id identifier rubyid_opts'>opts</span><span class='period'>.</span><span class='id identifier rubyid_fetch'>fetch</span><span class='lparen'>(</span><span class='symbol'>:id</span><span class='comma'>,</span> <span class='kw'>nil</span><span class='rparen'>)</span>
|
606
602
|
<span class='ivar'>@offset</span> <span class='op'>=</span> <span class='id identifier rubyid_opts'>opts</span><span class='period'>.</span><span class='id identifier rubyid_fetch'>fetch</span><span class='lparen'>(</span><span class='symbol'>:offset</span><span class='rparen'>)</span>
|
607
603
|
<span class='ivar'>@column_separator_width</span> <span class='op'>=</span> <span class='id identifier rubyid_opts'>opts</span><span class='period'>.</span><span class='id identifier rubyid_fetch'>fetch</span><span class='lparen'>(</span><span class='symbol'>:column_separator_width</span><span class='rparen'>)</span>
|
608
|
-
<span class='
|
609
|
-
<span class='ivar'>@column_defaults</span> <span class='op'>=</span> <span class='id identifier rubyid_opts'>opts</span><span class='lbracket'>[</span><span class='symbol'>:column_defaults</span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_dup'>dup</span>
|
610
|
-
<span class='kw'>else</span>
|
611
|
-
<span class='ivar'>@column_defaults</span> <span class='op'>=</span> <span class='const'><span class='object_link'><a href="../../TermUtils.html" title="TermUtils (module)">TermUtils</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../Tab.html" title="TermUtils::Tab (module)">Tab</a></span></span><span class='period'>.</span><span class='id identifier rubyid_default_column_props'>default_column_props</span>
|
612
|
-
<span class='kw'>end</span>
|
604
|
+
<span class='ivar'>@column_defaults</span> <span class='op'>=</span> <span class='id identifier rubyid_opts'>opts</span><span class='period'>.</span><span class='id identifier rubyid_key?'>key?</span><span class='lparen'>(</span><span class='symbol'>:column_defaults</span><span class='rparen'>)</span> <span class='op'>?</span> <span class='id identifier rubyid_opts'>opts</span><span class='lbracket'>[</span><span class='symbol'>:column_defaults</span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_dup'>dup</span> <span class='op'>:</span> <span class='const'><span class='object_link'><a href="../../TermUtils.html" title="TermUtils (module)">TermUtils</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../Tab.html" title="TermUtils::Tab (module)">Tab</a></span></span><span class='period'>.</span><span class='id identifier rubyid_default_column_props'>default_column_props</span>
|
613
605
|
<span class='ivar'>@columns</span> <span class='op'>=</span> <span class='lbracket'>[</span><span class='rbracket'>]</span>
|
614
606
|
<span class='kw'>end</span></pre>
|
615
607
|
</td>
|
@@ -668,12 +660,12 @@
|
|
668
660
|
<pre class="lines">
|
669
661
|
|
670
662
|
|
671
|
-
|
672
|
-
|
673
|
-
|
663
|
+
120
|
664
|
+
121
|
665
|
+
122</pre>
|
674
666
|
</td>
|
675
667
|
<td>
|
676
|
-
<pre class="code"><span class="info file"># File 'lib/term_utils/tab.rb', line
|
668
|
+
<pre class="code"><span class="info file"># File 'lib/term_utils/tab.rb', line 120</span>
|
677
669
|
|
678
670
|
<span class='kw'>def</span> <span class='id identifier rubyid_column_defaults'>column_defaults</span>
|
679
671
|
<span class='ivar'>@column_defaults</span>
|
@@ -722,12 +714,12 @@
|
|
722
714
|
<pre class="lines">
|
723
715
|
|
724
716
|
|
725
|
-
|
726
|
-
|
727
|
-
|
717
|
+
118
|
718
|
+
119
|
719
|
+
120</pre>
|
728
720
|
</td>
|
729
721
|
<td>
|
730
|
-
<pre class="code"><span class="info file"># File 'lib/term_utils/tab.rb', line
|
722
|
+
<pre class="code"><span class="info file"># File 'lib/term_utils/tab.rb', line 118</span>
|
731
723
|
|
732
724
|
<span class='kw'>def</span> <span class='id identifier rubyid_column_separator_width'>column_separator_width</span>
|
733
725
|
<span class='ivar'>@column_separator_width</span>
|
@@ -776,12 +768,12 @@
|
|
776
768
|
<pre class="lines">
|
777
769
|
|
778
770
|
|
779
|
-
|
780
|
-
|
781
|
-
|
771
|
+
122
|
772
|
+
123
|
773
|
+
124</pre>
|
782
774
|
</td>
|
783
775
|
<td>
|
784
|
-
<pre class="code"><span class="info file"># File 'lib/term_utils/tab.rb', line
|
776
|
+
<pre class="code"><span class="info file"># File 'lib/term_utils/tab.rb', line 122</span>
|
785
777
|
|
786
778
|
<span class='kw'>def</span> <span class='id identifier rubyid_columns'>columns</span>
|
787
779
|
<span class='ivar'>@columns</span>
|
@@ -830,12 +822,12 @@
|
|
830
822
|
<pre class="lines">
|
831
823
|
|
832
824
|
|
833
|
-
|
834
|
-
|
835
|
-
|
825
|
+
114
|
826
|
+
115
|
827
|
+
116</pre>
|
836
828
|
</td>
|
837
829
|
<td>
|
838
|
-
<pre class="code"><span class="info file"># File 'lib/term_utils/tab.rb', line
|
830
|
+
<pre class="code"><span class="info file"># File 'lib/term_utils/tab.rb', line 114</span>
|
839
831
|
|
840
832
|
<span class='kw'>def</span> <span class='id identifier rubyid_id'>id</span>
|
841
833
|
<span class='ivar'>@id</span>
|
@@ -884,12 +876,12 @@
|
|
884
876
|
<pre class="lines">
|
885
877
|
|
886
878
|
|
887
|
-
|
888
|
-
|
889
|
-
|
879
|
+
116
|
880
|
+
117
|
881
|
+
118</pre>
|
890
882
|
</td>
|
891
883
|
<td>
|
892
|
-
<pre class="code"><span class="info file"># File 'lib/term_utils/tab.rb', line
|
884
|
+
<pre class="code"><span class="info file"># File 'lib/term_utils/tab.rb', line 116</span>
|
893
885
|
|
894
886
|
<span class='kw'>def</span> <span class='id identifier rubyid_offset'>offset</span>
|
895
887
|
<span class='ivar'>@offset</span>
|
@@ -1031,13 +1023,6 @@
|
|
1031
1023
|
<pre class="lines">
|
1032
1024
|
|
1033
1025
|
|
1034
|
-
156
|
1035
|
-
157
|
1036
|
-
158
|
1037
|
-
159
|
1038
|
-
160
|
1039
|
-
161
|
1040
|
-
162
|
1041
1026
|
163
|
1042
1027
|
164
|
1043
1028
|
165
|
@@ -1045,21 +1030,28 @@
|
|
1045
1030
|
167
|
1046
1031
|
168
|
1047
1032
|
169
|
1048
|
-
170
|
1033
|
+
170
|
1034
|
+
171
|
1035
|
+
172
|
1036
|
+
173
|
1037
|
+
174
|
1038
|
+
175
|
1039
|
+
176
|
1040
|
+
177</pre>
|
1049
1041
|
</td>
|
1050
1042
|
<td>
|
1051
|
-
<pre class="code"><span class="info file"># File 'lib/term_utils/tab.rb', line
|
1043
|
+
<pre class="code"><span class="info file"># File 'lib/term_utils/tab.rb', line 163</span>
|
1052
1044
|
|
1053
1045
|
<span class='kw'>def</span> <span class='id identifier rubyid_define_column'>define_column</span><span class='lparen'>(</span><span class='id identifier rubyid_id'>id</span><span class='comma'>,</span> <span class='id identifier rubyid_opts'>opts</span> <span class='op'>=</span> <span class='lbrace'>{</span><span class='rbrace'>}</span><span class='comma'>,</span> <span class='op'>&</span><span class='id identifier rubyid_block'>block</span><span class='rparen'>)</span>
|
1054
1046
|
<span class='id identifier rubyid_col'>col</span> <span class='op'>=</span> <span class='ivar'>@columns</span><span class='period'>.</span><span class='id identifier rubyid_find'>find</span> <span class='lbrace'>{</span> <span class='op'>|</span><span class='id identifier rubyid_c'>c</span><span class='op'>|</span> <span class='id identifier rubyid_c'>c</span><span class='period'>.</span><span class='id identifier rubyid_id'>id</span> <span class='op'>==</span> <span class='id identifier rubyid_id'>id</span> <span class='rbrace'>}</span>
|
1055
1047
|
<span class='kw'>if</span> <span class='id identifier rubyid_col'>col</span>
|
1056
|
-
<span class='id identifier rubyid_block'>block</span><span class='
|
1048
|
+
<span class='id identifier rubyid_block'>block</span><span class='op'>&.</span><span class='id identifier rubyid_call'>call</span><span class='lparen'>(</span><span class='id identifier rubyid_col'>col</span><span class='rparen'>)</span>
|
1057
1049
|
<span class='id identifier rubyid_col'>col</span><span class='period'>.</span><span class='id identifier rubyid_validate'>validate</span>
|
1058
1050
|
<span class='kw'>else</span>
|
1059
1051
|
<span class='id identifier rubyid_opts'>opts</span><span class='lbracket'>[</span><span class='symbol'>:id</span><span class='rbracket'>]</span> <span class='op'>=</span> <span class='id identifier rubyid_id'>id</span>
|
1060
1052
|
<span class='id identifier rubyid_opts'>opts</span><span class='lbracket'>[</span><span class='symbol'>:index</span><span class='rbracket'>]</span> <span class='op'>=</span> <span class='ivar'>@columns</span><span class='period'>.</span><span class='id identifier rubyid_length'>length</span>
|
1061
1053
|
<span class='id identifier rubyid_col'>col</span> <span class='op'>=</span> <span class='const'><span class='object_link'><a href="Column.html" title="TermUtils::Tab::Column (class)">Column</a></span></span><span class='period'>.</span><span class='id identifier rubyid_new'><span class='object_link'><a href="Column.html#initialize-instance_method" title="TermUtils::Tab::Column#initialize (method)">new</a></span></span><span class='lparen'>(</span><span class='ivar'>@column_defaults</span><span class='period'>.</span><span class='id identifier rubyid_merge'>merge</span><span class='lparen'>(</span><span class='id identifier rubyid_opts'>opts</span><span class='rparen'>)</span><span class='rparen'>)</span>
|
1062
|
-
<span class='id identifier rubyid_block'>block</span><span class='
|
1054
|
+
<span class='id identifier rubyid_block'>block</span><span class='op'>&.</span><span class='id identifier rubyid_call'>call</span><span class='lparen'>(</span><span class='id identifier rubyid_col'>col</span><span class='rparen'>)</span>
|
1063
1055
|
<span class='id identifier rubyid_col'>col</span><span class='period'>.</span><span class='id identifier rubyid_validate'>validate</span>
|
1064
1056
|
<span class='ivar'>@columns</span> <span class='op'><<</span> <span class='id identifier rubyid_col'>col</span>
|
1065
1057
|
<span class='kw'>end</span>
|
@@ -1124,12 +1116,12 @@
|
|
1124
1116
|
<pre class="lines">
|
1125
1117
|
|
1126
1118
|
|
1127
|
-
|
1128
|
-
|
1129
|
-
|
1119
|
+
182
|
1120
|
+
183
|
1121
|
+
184</pre>
|
1130
1122
|
</td>
|
1131
1123
|
<td>
|
1132
|
-
<pre class="code"><span class="info file"># File 'lib/term_utils/tab.rb', line
|
1124
|
+
<pre class="code"><span class="info file"># File 'lib/term_utils/tab.rb', line 182</span>
|
1133
1125
|
|
1134
1126
|
<span class='kw'>def</span> <span class='id identifier rubyid_find_column'>find_column</span><span class='lparen'>(</span><span class='id identifier rubyid_id'>id</span><span class='rparen'>)</span>
|
1135
1127
|
<span class='ivar'>@columns</span><span class='period'>.</span><span class='id identifier rubyid_find'>find</span> <span class='lbrace'>{</span> <span class='op'>|</span><span class='id identifier rubyid_c'>c</span><span class='op'>|</span> <span class='id identifier rubyid_c'>c</span><span class='period'>.</span><span class='id identifier rubyid_id'>id</span> <span class='op'>==</span> <span class='id identifier rubyid_id'>id</span> <span class='rbrace'>}</span>
|
@@ -1261,28 +1253,29 @@
|
|
1261
1253
|
<pre class="lines">
|
1262
1254
|
|
1263
1255
|
|
1264
|
-
225
|
1265
|
-
226
|
1266
|
-
227
|
1267
|
-
228
|
1268
|
-
229
|
1269
|
-
230
|
1270
|
-
231
|
1271
|
-
232
|
1272
|
-
233
|
1273
|
-
234
|
1274
|
-
235
|
1275
|
-
236
|
1276
1256
|
237
|
1277
1257
|
238
|
1278
1258
|
239
|
1279
1259
|
240
|
1280
1260
|
241
|
1281
1261
|
242
|
1282
|
-
243
|
1262
|
+
243
|
1263
|
+
244
|
1264
|
+
245
|
1265
|
+
246
|
1266
|
+
247
|
1267
|
+
248
|
1268
|
+
249
|
1269
|
+
250
|
1270
|
+
251
|
1271
|
+
252
|
1272
|
+
253
|
1273
|
+
254
|
1274
|
+
255
|
1275
|
+
256</pre>
|
1283
1276
|
</td>
|
1284
1277
|
<td>
|
1285
|
-
<pre class="code"><span class="info file"># File 'lib/term_utils/tab.rb', line
|
1278
|
+
<pre class="code"><span class="info file"># File 'lib/term_utils/tab.rb', line 237</span>
|
1286
1279
|
|
1287
1280
|
<span class='kw'>def</span> <span class='id identifier rubyid_print_data'>print_data</span><span class='lparen'>(</span><span class='id identifier rubyid_io'>io</span><span class='comma'>,</span> <span class='id identifier rubyid_values'>values</span><span class='comma'>,</span> <span class='id identifier rubyid_opts'>opts</span> <span class='op'>=</span> <span class='lbrace'>{</span><span class='rbrace'>}</span><span class='rparen'>)</span>
|
1288
1281
|
<span class='id identifier rubyid_vals'>vals</span> <span class='op'>=</span> <span class='id identifier rubyid_values'>values</span>
|
@@ -1292,13 +1285,14 @@
|
|
1292
1285
|
<span class='id identifier rubyid_vals'>vals</span> <span class='op'><<</span> <span class='id identifier rubyid_values'>values</span><span class='lbracket'>[</span><span class='id identifier rubyid_col'>col</span><span class='period'>.</span><span class='id identifier rubyid_id'>id</span><span class='rbracket'>]</span>
|
1293
1286
|
<span class='kw'>end</span>
|
1294
1287
|
<span class='kw'>end</span>
|
1295
|
-
<span class='id identifier rubyid_raise'>raise</span> <span class='const'><span class='object_link'><a href="../../TermUtils.html" title="TermUtils (module)">TermUtils</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../Tab.html" title="TermUtils::Tab (module)">Tab</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="TableError.html" title="TermUtils::Tab::TableError (class)">TableError</a></span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'
|
1288
|
+
<span class='id identifier rubyid_raise'>raise</span> <span class='const'><span class='object_link'><a href="../../TermUtils.html" title="TermUtils (module)">TermUtils</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../Tab.html" title="TermUtils::Tab (module)">Tab</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="TableError.html" title="TermUtils::Tab::TableError (class)">TableError</a></span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>wrong values (not array)</span><span class='tstring_end'>'</span></span> <span class='kw'>unless</span> <span class='id identifier rubyid_vals'>vals</span><span class='period'>.</span><span class='id identifier rubyid_is_a?'>is_a?</span> <span class='const'>Array</span>
|
1289
|
+
|
1296
1290
|
<span class='id identifier rubyid_offset'>offset</span> <span class='op'>=</span> <span class='id identifier rubyid_opts'>opts</span><span class='period'>.</span><span class='id identifier rubyid_fetch'>fetch</span><span class='lparen'>(</span><span class='symbol'>:offset</span><span class='rparen'>)</span>
|
1297
1291
|
<span class='id identifier rubyid_column_separator_width'>column_separator_width</span> <span class='op'>=</span> <span class='id identifier rubyid_opts'>opts</span><span class='period'>.</span><span class='id identifier rubyid_fetch'>fetch</span><span class='lparen'>(</span><span class='symbol'>:column_separator_width</span><span class='rparen'>)</span>
|
1298
1292
|
<span class='id identifier rubyid_sb'>sb</span> <span class='op'>=</span> <span class='const'>StringIO</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span>
|
1299
|
-
<span class='id identifier rubyid_sb'>sb</span> <span class='op'><<</span> <span class='tstring'><span class='tstring_beg'
|
1293
|
+
<span class='id identifier rubyid_sb'>sb</span> <span class='op'><<</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'> </span><span class='tstring_end'>'</span></span> <span class='op'>*</span> <span class='id identifier rubyid_offset'>offset</span> <span class='kw'>if</span> <span class='id identifier rubyid_offset'>offset</span><span class='period'>.</span><span class='id identifier rubyid_positive?'>positive?</span>
|
1300
1294
|
<span class='ivar'>@columns</span><span class='period'>.</span><span class='id identifier rubyid_each'>each</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_col'>col</span><span class='op'>|</span>
|
1301
|
-
<span class='id identifier rubyid_sb'>sb</span> <span class='op'><<</span> <span class='tstring'><span class='tstring_beg'
|
1295
|
+
<span class='id identifier rubyid_sb'>sb</span> <span class='op'><<</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'> </span><span class='tstring_end'>'</span></span> <span class='op'>*</span> <span class='id identifier rubyid_column_separator_width'>column_separator_width</span> <span class='kw'>if</span> <span class='id identifier rubyid_col'>col</span><span class='period'>.</span><span class='id identifier rubyid_index'>index</span><span class='period'>.</span><span class='id identifier rubyid_positive?'>positive?</span>
|
1302
1296
|
<span class='id identifier rubyid_sb'>sb</span> <span class='op'><<</span> <span class='id identifier rubyid_col'>col</span><span class='period'>.</span><span class='id identifier rubyid_render_data'>render_data</span><span class='lparen'>(</span><span class='id identifier rubyid_vals'>vals</span><span class='lbracket'>[</span><span class='id identifier rubyid_col'>col</span><span class='period'>.</span><span class='id identifier rubyid_index'>index</span><span class='rbracket'>]</span><span class='rparen'>)</span>
|
1303
1297
|
<span class='kw'>end</span>
|
1304
1298
|
<span class='id identifier rubyid_io'>io</span><span class='period'>.</span><span class='id identifier rubyid_puts'>puts</span> <span class='id identifier rubyid_sb'>sb</span><span class='period'>.</span><span class='id identifier rubyid_string'>string</span>
|
@@ -1432,16 +1426,6 @@
|
|
1432
1426
|
<pre class="lines">
|
1433
1427
|
|
1434
1428
|
|
1435
|
-
196
|
1436
|
-
197
|
1437
|
-
198
|
1438
|
-
199
|
1439
|
-
200
|
1440
|
-
201
|
1441
|
-
202
|
1442
|
-
203
|
1443
|
-
204
|
1444
|
-
205
|
1445
1429
|
206
|
1446
1430
|
207
|
1447
1431
|
208
|
@@ -1452,10 +1436,21 @@
|
|
1452
1436
|
213
|
1453
1437
|
214
|
1454
1438
|
215
|
1455
|
-
216
|
1439
|
+
216
|
1440
|
+
217
|
1441
|
+
218
|
1442
|
+
219
|
1443
|
+
220
|
1444
|
+
221
|
1445
|
+
222
|
1446
|
+
223
|
1447
|
+
224
|
1448
|
+
225
|
1449
|
+
226
|
1450
|
+
227</pre>
|
1456
1451
|
</td>
|
1457
1452
|
<td>
|
1458
|
-
<pre class="code"><span class="info file"># File 'lib/term_utils/tab.rb', line
|
1453
|
+
<pre class="code"><span class="info file"># File 'lib/term_utils/tab.rb', line 206</span>
|
1459
1454
|
|
1460
1455
|
<span class='kw'>def</span> <span class='id identifier rubyid_print_header'>print_header</span><span class='lparen'>(</span><span class='id identifier rubyid_io'>io</span><span class='comma'>,</span> <span class='id identifier rubyid_values'>values</span> <span class='op'>=</span> <span class='kw'>nil</span><span class='comma'>,</span> <span class='id identifier rubyid_opts'>opts</span> <span class='op'>=</span> <span class='lbrace'>{</span><span class='rbrace'>}</span><span class='rparen'>)</span>
|
1461
1456
|
<span class='id identifier rubyid_vals'>vals</span> <span class='op'>=</span> <span class='id identifier rubyid_values'>values</span>
|
@@ -1467,13 +1462,14 @@
|
|
1467
1462
|
<span class='id identifier rubyid_vals'>vals</span> <span class='op'><<</span> <span class='id identifier rubyid_values'>values</span><span class='lbracket'>[</span><span class='id identifier rubyid_col'>col</span><span class='period'>.</span><span class='id identifier rubyid_id'>id</span><span class='rbracket'>]</span>
|
1468
1463
|
<span class='kw'>end</span>
|
1469
1464
|
<span class='kw'>end</span>
|
1470
|
-
<span class='id identifier rubyid_raise'>raise</span> <span class='const'><span class='object_link'><a href="../../TermUtils.html" title="TermUtils (module)">TermUtils</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../Tab.html" title="TermUtils::Tab (module)">Tab</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="TableError.html" title="TermUtils::Tab::TableError (class)">TableError</a></span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'
|
1465
|
+
<span class='id identifier rubyid_raise'>raise</span> <span class='const'><span class='object_link'><a href="../../TermUtils.html" title="TermUtils (module)">TermUtils</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../Tab.html" title="TermUtils::Tab (module)">Tab</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="TableError.html" title="TermUtils::Tab::TableError (class)">TableError</a></span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>wrong values (not array)</span><span class='tstring_end'>'</span></span> <span class='kw'>unless</span> <span class='id identifier rubyid_vals'>vals</span><span class='period'>.</span><span class='id identifier rubyid_is_a?'>is_a?</span> <span class='const'>Array</span>
|
1466
|
+
|
1471
1467
|
<span class='id identifier rubyid_offset'>offset</span> <span class='op'>=</span> <span class='id identifier rubyid_opts'>opts</span><span class='period'>.</span><span class='id identifier rubyid_fetch'>fetch</span><span class='lparen'>(</span><span class='symbol'>:offset</span><span class='rparen'>)</span>
|
1472
1468
|
<span class='id identifier rubyid_column_separator_width'>column_separator_width</span> <span class='op'>=</span> <span class='id identifier rubyid_opts'>opts</span><span class='period'>.</span><span class='id identifier rubyid_fetch'>fetch</span><span class='lparen'>(</span><span class='symbol'>:column_separator_width</span><span class='rparen'>)</span>
|
1473
1469
|
<span class='id identifier rubyid_sb'>sb</span> <span class='op'>=</span> <span class='const'>StringIO</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span>
|
1474
|
-
<span class='id identifier rubyid_sb'>sb</span> <span class='op'><<</span> <span class='tstring'><span class='tstring_beg'
|
1470
|
+
<span class='id identifier rubyid_sb'>sb</span> <span class='op'><<</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'> </span><span class='tstring_end'>'</span></span> <span class='op'>*</span> <span class='id identifier rubyid_offset'>offset</span> <span class='kw'>if</span> <span class='id identifier rubyid_offset'>offset</span><span class='period'>.</span><span class='id identifier rubyid_positive?'>positive?</span>
|
1475
1471
|
<span class='ivar'>@columns</span><span class='period'>.</span><span class='id identifier rubyid_each'>each</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_col'>col</span><span class='op'>|</span>
|
1476
|
-
<span class='id identifier rubyid_sb'>sb</span> <span class='op'><<</span> <span class='tstring'><span class='tstring_beg'
|
1472
|
+
<span class='id identifier rubyid_sb'>sb</span> <span class='op'><<</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'> </span><span class='tstring_end'>'</span></span> <span class='op'>*</span> <span class='id identifier rubyid_column_separator_width'>column_separator_width</span> <span class='kw'>if</span> <span class='id identifier rubyid_col'>col</span><span class='period'>.</span><span class='id identifier rubyid_index'>index</span><span class='period'>.</span><span class='id identifier rubyid_positive?'>positive?</span>
|
1477
1473
|
<span class='id identifier rubyid_sb'>sb</span> <span class='op'><<</span> <span class='id identifier rubyid_col'>col</span><span class='period'>.</span><span class='id identifier rubyid_render_header'>render_header</span><span class='lparen'>(</span><span class='id identifier rubyid_vals'>vals</span><span class='lbracket'>[</span><span class='id identifier rubyid_col'>col</span><span class='period'>.</span><span class='id identifier rubyid_index'>index</span><span class='rbracket'>]</span><span class='rparen'>)</span>
|
1478
1474
|
<span class='kw'>end</span>
|
1479
1475
|
<span class='id identifier rubyid_io'>io</span><span class='period'>.</span><span class='id identifier rubyid_puts'>puts</span> <span class='id identifier rubyid_sb'>sb</span><span class='period'>.</span><span class='id identifier rubyid_string'>string</span>
|
@@ -1579,29 +1575,29 @@
|
|
1579
1575
|
<pre class="lines">
|
1580
1576
|
|
1581
1577
|
|
1582
|
-
|
1583
|
-
|
1584
|
-
|
1585
|
-
|
1586
|
-
|
1587
|
-
|
1588
|
-
|
1589
|
-
|
1590
|
-
|
1591
|
-
|
1592
|
-
|
1578
|
+
264
|
1579
|
+
265
|
1580
|
+
266
|
1581
|
+
267
|
1582
|
+
268
|
1583
|
+
269
|
1584
|
+
270
|
1585
|
+
271
|
1586
|
+
272
|
1587
|
+
273
|
1588
|
+
274</pre>
|
1593
1589
|
</td>
|
1594
1590
|
<td>
|
1595
|
-
<pre class="code"><span class="info file"># File 'lib/term_utils/tab.rb', line
|
1591
|
+
<pre class="code"><span class="info file"># File 'lib/term_utils/tab.rb', line 264</span>
|
1596
1592
|
|
1597
1593
|
<span class='kw'>def</span> <span class='id identifier rubyid_print_separator'>print_separator</span><span class='lparen'>(</span><span class='id identifier rubyid_io'>io</span><span class='comma'>,</span> <span class='id identifier rubyid_opts'>opts</span> <span class='op'>=</span> <span class='lbrace'>{</span><span class='rbrace'>}</span><span class='rparen'>)</span>
|
1598
1594
|
<span class='id identifier rubyid_offset'>offset</span> <span class='op'>=</span> <span class='id identifier rubyid_opts'>opts</span><span class='period'>.</span><span class='id identifier rubyid_fetch'>fetch</span><span class='lparen'>(</span><span class='symbol'>:offset</span><span class='rparen'>)</span>
|
1599
1595
|
<span class='id identifier rubyid_column_separator_width'>column_separator_width</span> <span class='op'>=</span> <span class='id identifier rubyid_opts'>opts</span><span class='period'>.</span><span class='id identifier rubyid_fetch'>fetch</span><span class='lparen'>(</span><span class='symbol'>:column_separator_width</span><span class='rparen'>)</span>
|
1600
1596
|
<span class='id identifier rubyid_sb'>sb</span> <span class='op'>=</span> <span class='const'>StringIO</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span>
|
1601
|
-
<span class='id identifier rubyid_sb'>sb</span> <span class='op'><<</span> <span class='tstring'><span class='tstring_beg'
|
1597
|
+
<span class='id identifier rubyid_sb'>sb</span> <span class='op'><<</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'> </span><span class='tstring_end'>'</span></span> <span class='op'>*</span> <span class='id identifier rubyid_offset'>offset</span> <span class='kw'>if</span> <span class='id identifier rubyid_offset'>offset</span><span class='period'>.</span><span class='id identifier rubyid_positive?'>positive?</span>
|
1602
1598
|
<span class='ivar'>@columns</span><span class='period'>.</span><span class='id identifier rubyid_each'>each</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_col'>col</span><span class='op'>|</span>
|
1603
|
-
<span class='id identifier rubyid_sb'>sb</span> <span class='op'><<</span> <span class='tstring'><span class='tstring_beg'
|
1604
|
-
<span class='id identifier rubyid_sb'>sb</span> <span class='op'><<</span> <span class='tstring'><span class='tstring_beg'
|
1599
|
+
<span class='id identifier rubyid_sb'>sb</span> <span class='op'><<</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'> </span><span class='tstring_end'>'</span></span> <span class='op'>*</span> <span class='id identifier rubyid_column_separator_width'>column_separator_width</span> <span class='kw'>if</span> <span class='id identifier rubyid_col'>col</span><span class='period'>.</span><span class='id identifier rubyid_index'>index</span><span class='period'>.</span><span class='id identifier rubyid_positive?'>positive?</span>
|
1600
|
+
<span class='id identifier rubyid_sb'>sb</span> <span class='op'><<</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>-</span><span class='tstring_end'>'</span></span> <span class='op'>*</span> <span class='id identifier rubyid_col'>col</span><span class='period'>.</span><span class='id identifier rubyid_width'>width</span>
|
1605
1601
|
<span class='kw'>end</span>
|
1606
1602
|
<span class='id identifier rubyid_io'>io</span><span class='period'>.</span><span class='id identifier rubyid_puts'>puts</span> <span class='id identifier rubyid_sb'>sb</span><span class='period'>.</span><span class='id identifier rubyid_string'>string</span>
|
1607
1603
|
<span class='kw'>end</span></pre>
|
@@ -1708,18 +1704,18 @@
|
|
1708
1704
|
<pre class="lines">
|
1709
1705
|
|
1710
1706
|
|
1711
|
-
|
1712
|
-
|
1713
|
-
|
1714
|
-
|
1715
|
-
|
1707
|
+
192
|
1708
|
+
193
|
1709
|
+
194
|
1710
|
+
195
|
1711
|
+
196</pre>
|
1716
1712
|
</td>
|
1717
1713
|
<td>
|
1718
|
-
<pre class="code"><span class="info file"># File 'lib/term_utils/tab.rb', line
|
1714
|
+
<pre class="code"><span class="info file"># File 'lib/term_utils/tab.rb', line 192</span>
|
1719
1715
|
|
1720
1716
|
<span class='kw'>def</span> <span class='id identifier rubyid_printer'>printer</span><span class='lparen'>(</span><span class='id identifier rubyid_io'>io</span><span class='comma'>,</span> <span class='id identifier rubyid_opts'>opts</span> <span class='op'>=</span> <span class='lbrace'>{</span><span class='rbrace'>}</span><span class='comma'>,</span> <span class='op'>&</span><span class='id identifier rubyid_block'>block</span><span class='rparen'>)</span>
|
1721
1717
|
<span class='id identifier rubyid_ptr'>ptr</span> <span class='op'>=</span> <span class='const'><span class='object_link'><a href="Printer.html" title="TermUtils::Tab::Printer (class)">Printer</a></span></span><span class='period'>.</span><span class='id identifier rubyid_new'><span class='object_link'><a href="Printer.html#initialize-instance_method" title="TermUtils::Tab::Printer#initialize (method)">new</a></span></span><span class='lparen'>(</span><span class='kw'>self</span><span class='comma'>,</span> <span class='id identifier rubyid_io'>io</span><span class='comma'>,</span> <span class='id identifier rubyid_props'>props</span><span class='period'>.</span><span class='id identifier rubyid_merge'>merge</span><span class='lparen'>(</span><span class='id identifier rubyid_opts'>opts</span><span class='rparen'>)</span><span class='rparen'>)</span>
|
1722
|
-
<span class='id identifier rubyid_block'>block</span><span class='
|
1718
|
+
<span class='id identifier rubyid_block'>block</span><span class='op'>&.</span><span class='id identifier rubyid_call'>call</span><span class='lparen'>(</span><span class='id identifier rubyid_ptr'>ptr</span><span class='rparen'>)</span>
|
1723
1719
|
<span class='id identifier rubyid_ptr'>ptr</span>
|
1724
1720
|
<span class='kw'>end</span></pre>
|
1725
1721
|
</td>
|
@@ -1766,15 +1762,15 @@
|
|
1766
1762
|
<pre class="lines">
|
1767
1763
|
|
1768
1764
|
|
1769
|
-
|
1770
|
-
|
1771
|
-
|
1765
|
+
139
|
1766
|
+
140
|
1767
|
+
141</pre>
|
1772
1768
|
</td>
|
1773
1769
|
<td>
|
1774
|
-
<pre class="code"><span class="info file"># File 'lib/term_utils/tab.rb', line
|
1770
|
+
<pre class="code"><span class="info file"># File 'lib/term_utils/tab.rb', line 139</span>
|
1775
1771
|
|
1776
1772
|
<span class='kw'>def</span> <span class='id identifier rubyid_props'>props</span>
|
1777
|
-
<span class='lbrace'>{</span
|
1773
|
+
<span class='lbrace'>{</span> <span class='label'>offset:</span> <span class='ivar'>@offset</span><span class='comma'>,</span> <span class='label'>column_separator_width:</span> <span class='ivar'>@column_separator_width</span> <span class='rbrace'>}</span>
|
1778
1774
|
<span class='kw'>end</span></pre>
|
1779
1775
|
</td>
|
1780
1776
|
</tr>
|
@@ -1878,12 +1874,12 @@
|
|
1878
1874
|
<pre class="lines">
|
1879
1875
|
|
1880
1876
|
|
1881
|
-
|
1882
|
-
|
1883
|
-
|
1877
|
+
150
|
1878
|
+
151
|
1879
|
+
152</pre>
|
1884
1880
|
</td>
|
1885
1881
|
<td>
|
1886
|
-
<pre class="code"><span class="info file"># File 'lib/term_utils/tab.rb', line
|
1882
|
+
<pre class="code"><span class="info file"># File 'lib/term_utils/tab.rb', line 150</span>
|
1887
1883
|
|
1888
1884
|
<span class='kw'>def</span> <span class='id identifier rubyid_set_column_defaults'>set_column_defaults</span><span class='lparen'>(</span><span class='id identifier rubyid_opts'>opts</span> <span class='op'>=</span> <span class='lbrace'>{</span><span class='rbrace'>}</span><span class='rparen'>)</span>
|
1889
1885
|
<span class='const'><span class='object_link'><a href="../../TermUtils.html" title="TermUtils (module)">TermUtils</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../Tab.html" title="TermUtils::Tab (module)">Tab</a></span></span><span class='period'>.</span><span class='id identifier rubyid_assign_column_props'><span class='object_link'><a href="../Tab.html#assign_column_props-class_method" title="TermUtils::Tab.assign_column_props (method)">assign_column_props</a></span></span><span class='lparen'>(</span><span class='ivar'>@column_defaults</span><span class='comma'>,</span> <span class='id identifier rubyid_opts'>opts</span><span class='rparen'>)</span>
|
@@ -1932,16 +1928,16 @@
|
|
1932
1928
|
<pre class="lines">
|
1933
1929
|
|
1934
1930
|
|
1935
|
-
|
1936
|
-
|
1937
|
-
|
1938
|
-
|
1939
|
-
|
1940
|
-
|
1941
|
-
|
1931
|
+
278
|
1932
|
+
279
|
1933
|
+
280
|
1934
|
+
281
|
1935
|
+
282
|
1936
|
+
283
|
1937
|
+
284</pre>
|
1942
1938
|
</td>
|
1943
1939
|
<td>
|
1944
|
-
<pre class="code"><span class="info file"># File 'lib/term_utils/tab.rb', line
|
1940
|
+
<pre class="code"><span class="info file"># File 'lib/term_utils/tab.rb', line 278</span>
|
1945
1941
|
|
1946
1942
|
<span class='kw'>def</span> <span class='id identifier rubyid_titles'>titles</span>
|
1947
1943
|
<span class='id identifier rubyid_h'>h</span> <span class='op'>=</span> <span class='lbrace'>{</span><span class='rbrace'>}</span>
|
@@ -1960,9 +1956,9 @@
|
|
1960
1956
|
</div>
|
1961
1957
|
|
1962
1958
|
<div id="footer">
|
1963
|
-
Generated on
|
1959
|
+
Generated on Sun Aug 2 18:35:09 2020 by
|
1964
1960
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
1965
|
-
0.9.
|
1961
|
+
0.9.25 (ruby-2.6.5).
|
1966
1962
|
</div>
|
1967
1963
|
|
1968
1964
|
</div>
|