term_utils 0.3.2 → 0.5.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 +16 -2
- data/COPYING +3 -3
- data/README.md +51 -16
- data/Rakefile +6 -0
- data/doc/TermUtils/AP/Article.html +57 -55
- data/doc/TermUtils/AP/ArticleResult.html +584 -0
- data/doc/TermUtils/AP/Flag.html +295 -78
- data/doc/TermUtils/AP/Parameter.html +891 -103
- data/doc/TermUtils/AP/ParameterResult.html +980 -0
- data/doc/TermUtils/{FF/Cursor/Context.html → AP/ParameterWalkerHooks.html} +60 -60
- data/doc/TermUtils/AP/ParseError.html +651 -19
- data/doc/TermUtils/AP/Parser.html +181 -121
- data/doc/TermUtils/AP/Result.html +201 -528
- data/doc/TermUtils/AP/Syntax.html +103 -393
- data/doc/TermUtils/AP/SyntaxError.html +9 -91
- data/doc/TermUtils/AP/Walker.html +686 -0
- data/doc/TermUtils/AP.html +49 -160
- data/doc/TermUtils/FF/Config.html +203 -35
- data/doc/TermUtils/FF/Context.html +585 -0
- data/doc/TermUtils/FF/Entry.html +626 -0
- data/doc/TermUtils/FF/Finder.html +850 -0
- data/doc/TermUtils/FF/{Cursor.html → FinderEntry.html} +473 -211
- data/doc/TermUtils/FF/FinderQuery.html +946 -0
- data/doc/TermUtils/FF/Query.html +402 -70
- data/doc/TermUtils/FF.html +135 -11
- data/doc/TermUtils/PropertyTreeNode.html +304 -190
- data/doc/TermUtils/Tab/Column.html +98 -96
- data/doc/TermUtils/Tab/Header.html +30 -30
- data/doc/TermUtils/Tab/Holder.html +81 -81
- data/doc/TermUtils/Tab/Printer.html +43 -43
- data/doc/TermUtils/Tab/Table.html +124 -128
- data/doc/TermUtils/Tab/TableError.html +7 -89
- data/doc/TermUtils/Tab.html +93 -86
- data/doc/TermUtils.html +10 -10
- data/doc/_index.html +62 -42
- data/doc/class_list.html +3 -3
- data/doc/css/style.css +3 -2
- data/doc/file.README.html +63 -26
- data/doc/file_list.html +2 -2
- data/doc/frames.html +2 -2
- data/doc/index.html +63 -26
- data/doc/js/app.js +14 -3
- data/doc/method_list.html +708 -236
- data/doc/top-level-namespace.html +7 -7
- data/lib/term_utils/ap/article.rb +15 -9
- data/lib/term_utils/ap/flag.rb +37 -20
- data/lib/term_utils/ap/parameter.rb +88 -19
- data/lib/term_utils/ap/parser.rb +143 -116
- data/lib/term_utils/ap/result.rb +208 -161
- data/lib/term_utils/ap/syntax.rb +53 -69
- data/lib/term_utils/ap.rb +79 -24
- data/lib/term_utils/ff/config.rb +22 -10
- data/lib/term_utils/{ap/no_such_value_error.rb → ff/entry.rb} +26 -8
- data/lib/term_utils/ff/finder.rb +255 -0
- data/lib/term_utils/ff/query.rb +94 -17
- data/lib/term_utils/ff.rb +12 -2
- data/lib/term_utils/property_tree_node.rb +47 -19
- data/lib/term_utils/tab.rb +106 -61
- data/lib/term_utils.rb +8 -1
- data/term_utils.gemspec +4 -4
- metadata +18 -17
- data/doc/TermUtils/AP/Element.html +0 -1025
- data/doc/TermUtils/AP/Level.html +0 -638
- data/doc/TermUtils/AP/NoSuchValueError.html +0 -217
- 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
data/doc/TermUtils/AP.html
CHANGED
@@ -6,15 +6,15 @@
|
|
6
6
|
<title>
|
7
7
|
Module: TermUtils::AP
|
8
8
|
|
9
|
-
— Documentation by YARD 0.9.
|
9
|
+
— Documentation by YARD 0.9.34
|
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::AP";
|
19
19
|
relpath = '../';
|
20
20
|
</script>
|
@@ -79,7 +79,7 @@
|
|
79
79
|
<dl>
|
80
80
|
<dt>Defined in:</dt>
|
81
81
|
<dd>lib/term_utils/ap.rb<span class="defines">,<br />
|
82
|
-
lib/term_utils/ap/flag.rb,<br /> lib/term_utils/ap/
|
82
|
+
lib/term_utils/ap/flag.rb,<br /> lib/term_utils/ap/parser.rb,<br /> lib/term_utils/ap/result.rb,<br /> lib/term_utils/ap/syntax.rb,<br /> lib/term_utils/ap/article.rb,<br /> lib/term_utils/ap/parameter.rb</span>
|
83
83
|
</dd>
|
84
84
|
</dl>
|
85
85
|
|
@@ -88,7 +88,7 @@
|
|
88
88
|
<h2>Overview</h2><div class="docstring">
|
89
89
|
<div class="discussion">
|
90
90
|
|
91
|
-
<p>The Argument Parser module provides a way to parse
|
91
|
+
<p>The Argument Parser module provides a way to parse arguments.</p>
|
92
92
|
|
93
93
|
|
94
94
|
</div>
|
@@ -102,7 +102,7 @@
|
|
102
102
|
|
103
103
|
|
104
104
|
|
105
|
-
<strong class="classes">Classes:</strong> <span class='object_link'><a href="AP/Article.html" title="TermUtils::AP::Article (class)">Article</a></span>, <span class='object_link'><a href="AP/
|
105
|
+
<strong class="classes">Classes:</strong> <span class='object_link'><a href="AP/Article.html" title="TermUtils::AP::Article (class)">Article</a></span>, <span class='object_link'><a href="AP/ArticleResult.html" title="TermUtils::AP::ArticleResult (class)">ArticleResult</a></span>, <span class='object_link'><a href="AP/Flag.html" title="TermUtils::AP::Flag (class)">Flag</a></span>, <span class='object_link'><a href="AP/Parameter.html" title="TermUtils::AP::Parameter (class)">Parameter</a></span>, <span class='object_link'><a href="AP/ParameterResult.html" title="TermUtils::AP::ParameterResult (class)">ParameterResult</a></span>, <span class='object_link'><a href="AP/ParameterWalkerHooks.html" title="TermUtils::AP::ParameterWalkerHooks (class)">ParameterWalkerHooks</a></span>, <span class='object_link'><a href="AP/ParseError.html" title="TermUtils::AP::ParseError (class)">ParseError</a></span>, <span class='object_link'><a href="AP/Parser.html" title="TermUtils::AP::Parser (class)">Parser</a></span>, <span class='object_link'><a href="AP/Result.html" title="TermUtils::AP::Result (class)">Result</a></span>, <span class='object_link'><a href="AP/Syntax.html" title="TermUtils::AP::Syntax (class)">Syntax</a></span>, <span class='object_link'><a href="AP/SyntaxError.html" title="TermUtils::AP::SyntaxError (class)">SyntaxError</a></span>, <span class='object_link'><a href="AP/Walker.html" title="TermUtils::AP::Walker (class)">Walker</a></span>
|
106
106
|
|
107
107
|
|
108
108
|
</p>
|
@@ -148,7 +148,7 @@
|
|
148
148
|
<li class="public ">
|
149
149
|
<span class="summary_signature">
|
150
150
|
|
151
|
-
<a href="#parse_arguments-class_method" title="parse_arguments (class method)">.<strong>parse_arguments</strong>(syntax, arguments, opts = {}) ⇒
|
151
|
+
<a href="#parse_arguments-class_method" title="parse_arguments (class method)">.<strong>parse_arguments</strong>(syntax, arguments, opts = {}, &block) ⇒ Result </a>
|
152
152
|
|
153
153
|
|
154
154
|
|
@@ -166,30 +166,6 @@
|
|
166
166
|
<p>Parses a given list of arguments.</p>
|
167
167
|
</div></span>
|
168
168
|
|
169
|
-
</li>
|
170
|
-
|
171
|
-
|
172
|
-
<li class="public ">
|
173
|
-
<span class="summary_signature">
|
174
|
-
|
175
|
-
<a href="#parse_command-class_method" title="parse_command (class method)">.<strong>parse_command</strong>(syntax, command, opts = {}) ⇒ TermUtils::AP::Result </a>
|
176
|
-
|
177
|
-
|
178
|
-
|
179
|
-
</span>
|
180
|
-
|
181
|
-
|
182
|
-
|
183
|
-
|
184
|
-
|
185
|
-
|
186
|
-
|
187
|
-
|
188
|
-
|
189
|
-
<span class="summary_desc"><div class='inline'>
|
190
|
-
<p>Parses a given command.</p>
|
191
|
-
</div></span>
|
192
|
-
|
193
169
|
</li>
|
194
170
|
|
195
171
|
|
@@ -241,14 +217,14 @@
|
|
241
217
|
<pre class="lines">
|
242
218
|
|
243
219
|
|
244
|
-
|
245
|
-
|
246
|
-
|
247
|
-
|
248
|
-
|
220
|
+
96
|
221
|
+
97
|
222
|
+
98
|
223
|
+
99
|
224
|
+
100</pre>
|
249
225
|
</td>
|
250
226
|
<td>
|
251
|
-
<pre class="code"><span class="info file"># File 'lib/term_utils/ap.rb', line
|
227
|
+
<pre class="code"><span class="info file"># File 'lib/term_utils/ap.rb', line 96</span>
|
252
228
|
|
253
229
|
<span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_create_syntax'>create_syntax</span><span class='lparen'>(</span><span class='op'>&</span><span class='id identifier rubyid_block'>block</span><span class='rparen'>)</span>
|
254
230
|
<span class='id identifier rubyid_new_syntax'>new_syntax</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="" title="TermUtils::AP (module)">AP</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="AP/Syntax.html" title="TermUtils::AP::Syntax (class)">Syntax</a></span></span><span class='period'>.</span><span class='id identifier rubyid_new'><span class='object_link'><a href="AP/Syntax.html#initialize-instance_method" title="TermUtils::AP::Syntax#initialize (method)">new</a></span></span>
|
@@ -263,7 +239,7 @@
|
|
263
239
|
<div class="method_details ">
|
264
240
|
<h3 class="signature " id="parse_arguments-class_method">
|
265
241
|
|
266
|
-
.<strong>parse_arguments</strong>(syntax, arguments, opts = {}) ⇒ <tt><span class='object_link'><a href="AP/Result.html" title="TermUtils::AP::Result (class)">
|
242
|
+
.<strong>parse_arguments</strong>(syntax, arguments, opts = {}, &block) ⇒ <tt><span class='object_link'><a href="AP/Result.html" title="TermUtils::AP::Result (class)">Result</a></span></tt>
|
267
243
|
|
268
244
|
|
269
245
|
|
@@ -286,7 +262,7 @@
|
|
286
262
|
<span class='name'>syntax</span>
|
287
263
|
|
288
264
|
|
289
|
-
<span class='type'>(<tt><span class='object_link'><a href="AP/Syntax.html" title="TermUtils::AP::Syntax (class)">
|
265
|
+
<span class='type'>(<tt><span class='object_link'><a href="AP/Syntax.html" title="TermUtils::AP::Syntax (class)">Syntax</a></span></tt>)</span>
|
290
266
|
|
291
267
|
|
292
268
|
|
@@ -318,120 +294,33 @@
|
|
318
294
|
|
319
295
|
</ul>
|
320
296
|
|
321
|
-
<p class="tag_title">Returns:</p>
|
322
|
-
<ul class="return">
|
323
|
-
|
324
|
-
<li>
|
325
|
-
|
326
|
-
|
327
|
-
<span class='type'>(<tt><span class='object_link'><a href="AP/Result.html" title="TermUtils::AP::Result (class)">TermUtils::AP::Result</a></span></tt>)</span>
|
328
|
-
|
329
|
-
|
330
|
-
|
331
|
-
</li>
|
332
|
-
|
333
|
-
</ul>
|
334
|
-
<p class="tag_title">Raises:</p>
|
335
|
-
<ul class="raise">
|
336
|
-
|
337
|
-
<li>
|
338
|
-
|
339
|
-
|
340
|
-
<span class='type'>(<tt><span class='object_link'><a href="AP/ParseError.html" title="TermUtils::AP::ParseError (class)">TermUtils::AP::ParseError</a></span></tt>)</span>
|
341
|
-
|
342
|
-
|
343
|
-
|
344
|
-
</li>
|
345
297
|
|
346
|
-
<li>
|
347
|
-
|
348
|
-
|
349
|
-
<span class='type'>(<tt><span class='object_link'><a href="AP/SyntaxError.html" title="TermUtils::AP::SyntaxError (class)">TermUtils::AP::SyntaxError</a></span></tt>)</span>
|
350
|
-
|
351
|
-
|
352
|
-
|
353
|
-
</li>
|
354
|
-
|
355
|
-
</ul>
|
356
|
-
|
357
|
-
</div><table class="source_code">
|
358
|
-
<tr>
|
359
|
-
<td>
|
360
|
-
<pre class="lines">
|
361
|
-
|
362
|
-
|
363
|
-
55
|
364
|
-
56
|
365
|
-
57</pre>
|
366
|
-
</td>
|
367
|
-
<td>
|
368
|
-
<pre class="code"><span class="info file"># File 'lib/term_utils/ap.rb', line 55</span>
|
369
|
-
|
370
|
-
<span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_parse_arguments'>parse_arguments</span><span class='lparen'>(</span><span class='id identifier rubyid_syntax'>syntax</span><span class='comma'>,</span> <span class='id identifier rubyid_arguments'>arguments</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>
|
371
|
-
<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="" title="TermUtils::AP (module)">AP</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="AP/Parser.html" title="TermUtils::AP::Parser (class)">Parser</a></span></span><span class='period'>.</span><span class='id identifier rubyid_new'><span class='object_link'><a href="AP/Parser.html#initialize-instance_method" title="TermUtils::AP::Parser#initialize (method)">new</a></span></span><span class='period'>.</span><span class='id identifier rubyid_parse_arguments'><span class='object_link'><a href="AP/Parser.html#parse_arguments-instance_method" title="TermUtils::AP::Parser#parse_arguments (method)">parse_arguments</a></span></span><span class='lparen'>(</span><span class='id identifier rubyid_syntax'>syntax</span><span class='comma'>,</span> <span class='id identifier rubyid_arguments'>arguments</span><span class='comma'>,</span> <span class='id identifier rubyid_opts'>opts</span><span class='rparen'>)</span>
|
372
|
-
<span class='kw'>end</span></pre>
|
373
|
-
</td>
|
374
|
-
</tr>
|
375
|
-
</table>
|
376
|
-
</div>
|
377
298
|
|
378
|
-
<div class="method_details ">
|
379
|
-
<h3 class="signature " id="parse_command-class_method">
|
380
|
-
|
381
|
-
.<strong>parse_command</strong>(syntax, command, opts = {}) ⇒ <tt><span class='object_link'><a href="AP/Result.html" title="TermUtils::AP::Result (class)">TermUtils::AP::Result</a></span></tt>
|
382
|
-
|
383
|
-
|
384
|
-
|
385
|
-
|
386
|
-
|
387
|
-
</h3><div class="docstring">
|
388
|
-
<div class="discussion">
|
389
299
|
|
390
|
-
|
391
|
-
|
392
|
-
|
393
|
-
|
300
|
+
|
301
|
+
|
302
|
+
|
303
|
+
|
304
|
+
<p class="tag_title">Options Hash (<tt>opts</tt>):</p>
|
305
|
+
<ul class="option">
|
306
|
+
|
307
|
+
<li>
|
308
|
+
<span class="name">:strict</span>
|
309
|
+
<span class="type">(<tt>Boolean</tt>)</span>
|
310
|
+
<span class="default">
|
311
|
+
|
312
|
+
</span>
|
313
|
+
|
314
|
+
— <div class='inline'>
|
315
|
+
<p>Whether the Syntax must be considered as strict.</p>
|
394
316
|
</div>
|
395
|
-
|
396
|
-
|
397
|
-
<ul class="param">
|
398
|
-
|
399
|
-
<li>
|
400
|
-
|
401
|
-
<span class='name'>syntax</span>
|
402
|
-
|
317
|
+
|
318
|
+
</li>
|
403
319
|
|
404
|
-
|
405
|
-
|
406
|
-
|
407
|
-
|
408
|
-
</li>
|
409
|
-
|
410
|
-
<li>
|
411
|
-
|
412
|
-
<span class='name'>command</span>
|
413
|
-
|
414
|
-
|
415
|
-
<span class='type'>(<tt>String</tt>)</span>
|
416
|
-
|
417
|
-
|
418
|
-
|
419
|
-
</li>
|
420
|
-
|
421
|
-
<li>
|
422
|
-
|
423
|
-
<span class='name'>opts</span>
|
424
|
-
|
425
|
-
|
426
|
-
<span class='type'>(<tt>Hash</tt>)</span>
|
427
|
-
|
428
|
-
|
429
|
-
<em class="default">(defaults to: <tt>{}</tt>)</em>
|
430
|
-
|
431
|
-
|
432
|
-
</li>
|
320
|
+
</ul>
|
433
321
|
|
434
|
-
|
322
|
+
|
323
|
+
|
435
324
|
|
436
325
|
<p class="tag_title">Returns:</p>
|
437
326
|
<ul class="return">
|
@@ -439,7 +328,7 @@
|
|
439
328
|
<li>
|
440
329
|
|
441
330
|
|
442
|
-
<span class='type'>(<tt><span class='object_link'><a href="AP/Result.html" title="TermUtils::AP::Result (class)">
|
331
|
+
<span class='type'>(<tt><span class='object_link'><a href="AP/Result.html" title="TermUtils::AP::Result (class)">Result</a></span></tt>)</span>
|
443
332
|
|
444
333
|
|
445
334
|
|
@@ -452,7 +341,7 @@
|
|
452
341
|
<li>
|
453
342
|
|
454
343
|
|
455
|
-
<span class='type'>(<tt><span class='object_link'><a href="AP/ParseError.html" title="TermUtils::AP::ParseError (class)">
|
344
|
+
<span class='type'>(<tt><span class='object_link'><a href="AP/ParseError.html" title="TermUtils::AP::ParseError (class)">ParseError</a></span></tt>)</span>
|
456
345
|
|
457
346
|
|
458
347
|
|
@@ -461,7 +350,7 @@
|
|
461
350
|
<li>
|
462
351
|
|
463
352
|
|
464
|
-
<span class='type'>(<tt><span class='object_link'><a href="AP/SyntaxError.html" title="TermUtils::AP::SyntaxError (class)">
|
353
|
+
<span class='type'>(<tt><span class='object_link'><a href="AP/SyntaxError.html" title="TermUtils::AP::SyntaxError (class)">SyntaxError</a></span></tt>)</span>
|
465
354
|
|
466
355
|
|
467
356
|
|
@@ -475,15 +364,15 @@
|
|
475
364
|
<pre class="lines">
|
476
365
|
|
477
366
|
|
478
|
-
|
479
|
-
|
480
|
-
|
367
|
+
110
|
368
|
+
111
|
369
|
+
112</pre>
|
481
370
|
</td>
|
482
371
|
<td>
|
483
|
-
<pre class="code"><span class="info file"># File 'lib/term_utils/ap.rb', line
|
372
|
+
<pre class="code"><span class="info file"># File 'lib/term_utils/ap.rb', line 110</span>
|
484
373
|
|
485
|
-
<span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier
|
486
|
-
<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="" title="TermUtils::AP (module)">AP</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="AP/Parser.html" title="TermUtils::AP::Parser (class)">Parser</a></span></span><span class='period'>.</span><span class='id identifier rubyid_new'><span class='object_link'><a href="AP/Parser.html#initialize-instance_method" title="TermUtils::AP::Parser#initialize (method)">new</a></span></span><span class='period'>.</span><span class='id identifier
|
374
|
+
<span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_parse_arguments'>parse_arguments</span><span class='lparen'>(</span><span class='id identifier rubyid_syntax'>syntax</span><span class='comma'>,</span> <span class='id identifier rubyid_arguments'>arguments</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>
|
375
|
+
<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="" title="TermUtils::AP (module)">AP</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="AP/Parser.html" title="TermUtils::AP::Parser (class)">Parser</a></span></span><span class='period'>.</span><span class='id identifier rubyid_new'><span class='object_link'><a href="AP/Parser.html#initialize-instance_method" title="TermUtils::AP::Parser#initialize (method)">new</a></span></span><span class='period'>.</span><span class='id identifier rubyid_parse_arguments'><span class='object_link'><a href="AP/Parser.html#parse_arguments-instance_method" title="TermUtils::AP::Parser#parse_arguments (method)">parse_arguments</a></span></span><span class='lparen'>(</span><span class='id identifier rubyid_syntax'>syntax</span><span class='comma'>,</span> <span class='id identifier rubyid_arguments'>arguments</span><span class='comma'>,</span> <span class='id identifier rubyid_opts'>opts</span><span class='comma'>,</span> <span class='op'>&</span><span class='id identifier rubyid_block'>block</span><span class='rparen'>)</span>
|
487
376
|
<span class='kw'>end</span></pre>
|
488
377
|
</td>
|
489
378
|
</tr>
|
@@ -495,9 +384,9 @@
|
|
495
384
|
</div>
|
496
385
|
|
497
386
|
<div id="footer">
|
498
|
-
Generated on
|
499
|
-
<a href="
|
500
|
-
0.9.
|
387
|
+
Generated on Wed Aug 9 17:34:25 2023 by
|
388
|
+
<a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
389
|
+
0.9.34 (ruby-3.2.2).
|
501
390
|
</div>
|
502
391
|
|
503
392
|
</div>
|