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
@@ -4,31 +4,31 @@
|
|
4
4
|
<meta charset="utf-8">
|
5
5
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
6
6
|
<title>
|
7
|
-
Class: TermUtils::
|
7
|
+
Class: TermUtils::AP::ParameterWalkerHooks
|
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="
|
13
|
+
<link rel="stylesheet" href="../../css/style.css" type="text/css" />
|
14
14
|
|
15
|
-
<link rel="stylesheet" href="
|
15
|
+
<link rel="stylesheet" href="../../css/common.css" type="text/css" />
|
16
16
|
|
17
|
-
<script type="text/javascript"
|
18
|
-
pathId = "TermUtils::
|
19
|
-
relpath = '
|
17
|
+
<script type="text/javascript">
|
18
|
+
pathId = "TermUtils::AP::ParameterWalkerHooks";
|
19
|
+
relpath = '../../';
|
20
20
|
</script>
|
21
21
|
|
22
22
|
|
23
|
-
<script type="text/javascript" charset="utf-8" src="
|
23
|
+
<script type="text/javascript" charset="utf-8" src="../../js/jquery.js"></script>
|
24
24
|
|
25
|
-
<script type="text/javascript" charset="utf-8" src="
|
25
|
+
<script type="text/javascript" charset="utf-8" src="../../js/app.js"></script>
|
26
26
|
|
27
27
|
|
28
28
|
</head>
|
29
29
|
<body>
|
30
30
|
<div class="nav_wrap">
|
31
|
-
<iframe id="nav" src="
|
31
|
+
<iframe id="nav" src="../../class_list.html?1"></iframe>
|
32
32
|
<div id="resizer"></div>
|
33
33
|
</div>
|
34
34
|
|
@@ -36,17 +36,17 @@
|
|
36
36
|
<div id="header">
|
37
37
|
<div id="menu">
|
38
38
|
|
39
|
-
<a href="
|
40
|
-
<span class='title'><span class='object_link'><a href="
|
39
|
+
<a href="../../_index.html">Index (P)</a> »
|
40
|
+
<span class='title'><span class='object_link'><a href="../../TermUtils.html" title="TermUtils (module)">TermUtils</a></span></span> » <span class='title'><span class='object_link'><a href="../AP.html" title="TermUtils::AP (module)">AP</a></span></span>
|
41
41
|
»
|
42
|
-
<span class="title">
|
42
|
+
<span class="title">ParameterWalkerHooks</span>
|
43
43
|
|
44
44
|
</div>
|
45
45
|
|
46
46
|
<div id="search">
|
47
47
|
|
48
48
|
<a class="full_list_link" id="class_list_link"
|
49
|
-
href="
|
49
|
+
href="../../class_list.html">
|
50
50
|
|
51
51
|
<svg width="24" height="24">
|
52
52
|
<rect x="0" y="4" width="24" height="4" rx="1" ry="1"></rect>
|
@@ -59,7 +59,7 @@
|
|
59
59
|
<div class="clear"></div>
|
60
60
|
</div>
|
61
61
|
|
62
|
-
<div id="content"><h1>Class: TermUtils::
|
62
|
+
<div id="content"><h1>Class: TermUtils::AP::ParameterWalkerHooks
|
63
63
|
|
64
64
|
|
65
65
|
|
@@ -76,7 +76,7 @@
|
|
76
76
|
|
77
77
|
<li class="next">Struct</li>
|
78
78
|
|
79
|
-
<li class="next">TermUtils::
|
79
|
+
<li class="next">TermUtils::AP::ParameterWalkerHooks</li>
|
80
80
|
|
81
81
|
</ul>
|
82
82
|
<a href="#" class="inheritanceTree">show all</a>
|
@@ -96,7 +96,7 @@
|
|
96
96
|
|
97
97
|
<dl>
|
98
98
|
<dt>Defined in:</dt>
|
99
|
-
<dd>lib/term_utils/
|
99
|
+
<dd>lib/term_utils/ap/result.rb</dd>
|
100
100
|
</dl>
|
101
101
|
|
102
102
|
</div>
|
@@ -104,7 +104,7 @@
|
|
104
104
|
<h2>Overview</h2><div class="docstring">
|
105
105
|
<div class="discussion">
|
106
106
|
|
107
|
-
<p>
|
107
|
+
<p>Parameter hooks for Walker.</p>
|
108
108
|
|
109
109
|
|
110
110
|
</div>
|
@@ -122,7 +122,7 @@
|
|
122
122
|
<li class="public ">
|
123
123
|
<span class="summary_signature">
|
124
124
|
|
125
|
-
<a href="#
|
125
|
+
<a href="#anonymous_article_hook-instance_method" title="#anonymous_article_hook (instance method)">#<strong>anonymous_article_hook</strong> ⇒ Object </a>
|
126
126
|
|
127
127
|
|
128
128
|
|
@@ -140,7 +140,7 @@
|
|
140
140
|
|
141
141
|
|
142
142
|
<span class="summary_desc"><div class='inline'>
|
143
|
-
<p>Returns the value of attribute
|
143
|
+
<p>Returns the value of attribute anonymous_article_hook.</p>
|
144
144
|
</div></span>
|
145
145
|
|
146
146
|
</li>
|
@@ -149,7 +149,7 @@
|
|
149
149
|
<li class="public ">
|
150
150
|
<span class="summary_signature">
|
151
151
|
|
152
|
-
<a href="#
|
152
|
+
<a href="#article_hooks-instance_method" title="#article_hooks (instance method)">#<strong>article_hooks</strong> ⇒ Object </a>
|
153
153
|
|
154
154
|
|
155
155
|
|
@@ -167,7 +167,7 @@
|
|
167
167
|
|
168
168
|
|
169
169
|
<span class="summary_desc"><div class='inline'>
|
170
|
-
<p>Returns the value of attribute
|
170
|
+
<p>Returns the value of attribute article_hooks.</p>
|
171
171
|
</div></span>
|
172
172
|
|
173
173
|
</li>
|
@@ -176,7 +176,7 @@
|
|
176
176
|
<li class="public ">
|
177
177
|
<span class="summary_signature">
|
178
178
|
|
179
|
-
<a href="#
|
179
|
+
<a href="#hook-instance_method" title="#hook (instance method)">#<strong>hook</strong> ⇒ Object </a>
|
180
180
|
|
181
181
|
|
182
182
|
|
@@ -194,7 +194,7 @@
|
|
194
194
|
|
195
195
|
|
196
196
|
<span class="summary_desc"><div class='inline'>
|
197
|
-
<p>Returns the value of attribute
|
197
|
+
<p>Returns the value of attribute hook.</p>
|
198
198
|
</div></span>
|
199
199
|
|
200
200
|
</li>
|
@@ -211,11 +211,11 @@
|
|
211
211
|
<h2>Instance Attribute Details</h2>
|
212
212
|
|
213
213
|
|
214
|
-
<span id="
|
214
|
+
<span id="anonymous_article_hook=-instance_method"></span>
|
215
215
|
<div class="method_details first">
|
216
|
-
<h3 class="signature first" id="
|
216
|
+
<h3 class="signature first" id="anonymous_article_hook-instance_method">
|
217
217
|
|
218
|
-
#<strong>
|
218
|
+
#<strong>anonymous_article_hook</strong> ⇒ <tt>Object</tt>
|
219
219
|
|
220
220
|
|
221
221
|
|
@@ -224,7 +224,7 @@
|
|
224
224
|
</h3><div class="docstring">
|
225
225
|
<div class="discussion">
|
226
226
|
|
227
|
-
<p>Returns the value of attribute
|
227
|
+
<p>Returns the value of attribute anonymous_article_hook</p>
|
228
228
|
|
229
229
|
|
230
230
|
</div>
|
@@ -243,7 +243,7 @@
|
|
243
243
|
|
244
244
|
—
|
245
245
|
<div class='inline'>
|
246
|
-
<p>the current value of
|
246
|
+
<p>the current value of anonymous_article_hook</p>
|
247
247
|
</div>
|
248
248
|
|
249
249
|
</li>
|
@@ -256,15 +256,15 @@
|
|
256
256
|
<pre class="lines">
|
257
257
|
|
258
258
|
|
259
|
-
|
260
|
-
|
261
|
-
|
259
|
+
242
|
260
|
+
243
|
261
|
+
244</pre>
|
262
262
|
</td>
|
263
263
|
<td>
|
264
|
-
<pre class="code"><span class="info file"># File 'lib/term_utils/
|
264
|
+
<pre class="code"><span class="info file"># File 'lib/term_utils/ap/result.rb', line 242</span>
|
265
265
|
|
266
|
-
<span class='kw'>def</span> <span class='id identifier
|
267
|
-
<span class='ivar'>@
|
266
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_anonymous_article_hook'>anonymous_article_hook</span>
|
267
|
+
<span class='ivar'>@anonymous_article_hook</span>
|
268
268
|
<span class='kw'>end</span></pre>
|
269
269
|
</td>
|
270
270
|
</tr>
|
@@ -272,11 +272,11 @@
|
|
272
272
|
</div>
|
273
273
|
|
274
274
|
|
275
|
-
<span id="
|
275
|
+
<span id="article_hooks=-instance_method"></span>
|
276
276
|
<div class="method_details ">
|
277
|
-
<h3 class="signature " id="
|
277
|
+
<h3 class="signature " id="article_hooks-instance_method">
|
278
278
|
|
279
|
-
#<strong>
|
279
|
+
#<strong>article_hooks</strong> ⇒ <tt>Object</tt>
|
280
280
|
|
281
281
|
|
282
282
|
|
@@ -285,7 +285,7 @@
|
|
285
285
|
</h3><div class="docstring">
|
286
286
|
<div class="discussion">
|
287
287
|
|
288
|
-
<p>Returns the value of attribute
|
288
|
+
<p>Returns the value of attribute article_hooks</p>
|
289
289
|
|
290
290
|
|
291
291
|
</div>
|
@@ -304,7 +304,7 @@
|
|
304
304
|
|
305
305
|
—
|
306
306
|
<div class='inline'>
|
307
|
-
<p>the current value of
|
307
|
+
<p>the current value of article_hooks</p>
|
308
308
|
</div>
|
309
309
|
|
310
310
|
</li>
|
@@ -317,15 +317,15 @@
|
|
317
317
|
<pre class="lines">
|
318
318
|
|
319
319
|
|
320
|
-
|
321
|
-
|
322
|
-
|
320
|
+
242
|
321
|
+
243
|
322
|
+
244</pre>
|
323
323
|
</td>
|
324
324
|
<td>
|
325
|
-
<pre class="code"><span class="info file"># File 'lib/term_utils/
|
325
|
+
<pre class="code"><span class="info file"># File 'lib/term_utils/ap/result.rb', line 242</span>
|
326
326
|
|
327
|
-
<span class='kw'>def</span> <span class='id identifier
|
328
|
-
<span class='ivar'>@
|
327
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_article_hooks'>article_hooks</span>
|
328
|
+
<span class='ivar'>@article_hooks</span>
|
329
329
|
<span class='kw'>end</span></pre>
|
330
330
|
</td>
|
331
331
|
</tr>
|
@@ -333,11 +333,11 @@
|
|
333
333
|
</div>
|
334
334
|
|
335
335
|
|
336
|
-
<span id="
|
336
|
+
<span id="hook=-instance_method"></span>
|
337
337
|
<div class="method_details ">
|
338
|
-
<h3 class="signature " id="
|
338
|
+
<h3 class="signature " id="hook-instance_method">
|
339
339
|
|
340
|
-
#<strong>
|
340
|
+
#<strong>hook</strong> ⇒ <tt>Object</tt>
|
341
341
|
|
342
342
|
|
343
343
|
|
@@ -346,7 +346,7 @@
|
|
346
346
|
</h3><div class="docstring">
|
347
347
|
<div class="discussion">
|
348
348
|
|
349
|
-
<p>Returns the value of attribute
|
349
|
+
<p>Returns the value of attribute hook</p>
|
350
350
|
|
351
351
|
|
352
352
|
</div>
|
@@ -365,7 +365,7 @@
|
|
365
365
|
|
366
366
|
—
|
367
367
|
<div class='inline'>
|
368
|
-
<p>the current value of
|
368
|
+
<p>the current value of hook</p>
|
369
369
|
</div>
|
370
370
|
|
371
371
|
</li>
|
@@ -378,15 +378,15 @@
|
|
378
378
|
<pre class="lines">
|
379
379
|
|
380
380
|
|
381
|
-
|
382
|
-
|
383
|
-
|
381
|
+
242
|
382
|
+
243
|
383
|
+
244</pre>
|
384
384
|
</td>
|
385
385
|
<td>
|
386
|
-
<pre class="code"><span class="info file"># File 'lib/term_utils/
|
386
|
+
<pre class="code"><span class="info file"># File 'lib/term_utils/ap/result.rb', line 242</span>
|
387
387
|
|
388
|
-
<span class='kw'>def</span> <span class='id identifier
|
389
|
-
<span class='ivar'>@
|
388
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_hook'>hook</span>
|
389
|
+
<span class='ivar'>@hook</span>
|
390
390
|
<span class='kw'>end</span></pre>
|
391
391
|
</td>
|
392
392
|
</tr>
|
@@ -399,9 +399,9 @@
|
|
399
399
|
</div>
|
400
400
|
|
401
401
|
<div id="footer">
|
402
|
-
Generated on
|
402
|
+
Generated on Sun Aug 2 18:35:10 2020 by
|
403
403
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
404
|
-
0.9.
|
404
|
+
0.9.25 (ruby-2.6.5).
|
405
405
|
</div>
|
406
406
|
|
407
407
|
</div>
|
@@ -6,15 +6,15 @@
|
|
6
6
|
<title>
|
7
7
|
Exception: TermUtils::AP::ParseError
|
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::AP::ParseError";
|
19
19
|
relpath = '../../';
|
20
20
|
</script>
|
@@ -96,7 +96,7 @@
|
|
96
96
|
|
97
97
|
<dl>
|
98
98
|
<dt>Defined in:</dt>
|
99
|
-
<dd>lib/term_utils/ap
|
99
|
+
<dd>lib/term_utils/ap.rb</dd>
|
100
100
|
</dl>
|
101
101
|
|
102
102
|
</div>
|
@@ -104,7 +104,7 @@
|
|
104
104
|
<h2>Overview</h2><div class="docstring">
|
105
105
|
<div class="discussion">
|
106
106
|
|
107
|
-
<p>
|
107
|
+
<p>ParseError.</p>
|
108
108
|
|
109
109
|
|
110
110
|
</div>
|
@@ -172,7 +172,7 @@
|
|
172
172
|
</h3><div class="docstring">
|
173
173
|
<div class="discussion">
|
174
174
|
|
175
|
-
<p>Returns a new instance of ParseError
|
175
|
+
<p>Returns a new instance of ParseError.</p>
|
176
176
|
|
177
177
|
|
178
178
|
</div>
|
@@ -186,12 +186,12 @@
|
|
186
186
|
<pre class="lines">
|
187
187
|
|
188
188
|
|
189
|
-
|
190
|
-
|
191
|
-
|
189
|
+
31
|
190
|
+
32
|
191
|
+
33</pre>
|
192
192
|
</td>
|
193
193
|
<td>
|
194
|
-
<pre class="code"><span class="info file"># File 'lib/term_utils/ap
|
194
|
+
<pre class="code"><span class="info file"># File 'lib/term_utils/ap.rb', line 31</span>
|
195
195
|
|
196
196
|
<span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span><span class='lparen'>(</span><span class='id identifier rubyid_msg'>msg</span><span class='rparen'>)</span>
|
197
197
|
<span class='kw'>super</span>
|
@@ -207,9 +207,9 @@
|
|
207
207
|
</div>
|
208
208
|
|
209
209
|
<div id="footer">
|
210
|
-
Generated on
|
210
|
+
Generated on Sun Aug 2 18:35:09 2020 by
|
211
211
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
212
|
-
0.9.
|
212
|
+
0.9.25 (ruby-2.6.5).
|
213
213
|
</div>
|
214
214
|
|
215
215
|
</div>
|
@@ -6,15 +6,15 @@
|
|
6
6
|
<title>
|
7
7
|
Class: TermUtils::AP::Parser
|
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::AP::Parser";
|
19
19
|
relpath = '../../';
|
20
20
|
</script>
|
@@ -119,7 +119,7 @@
|
|
119
119
|
|
120
120
|
|
121
121
|
<h2>
|
122
|
-
|
122
|
+
Class Method Summary
|
123
123
|
<small><a href="#" class="summary_toggle">collapse</a></small>
|
124
124
|
</h2>
|
125
125
|
|
@@ -128,14 +128,36 @@
|
|
128
128
|
<li class="public ">
|
129
129
|
<span class="summary_signature">
|
130
130
|
|
131
|
-
<a href="#
|
131
|
+
<a href="#eval_article_min_occurs-class_method" title="eval_article_min_occurs (class method)">.<strong>eval_article_min_occurs</strong>(articles) ⇒ Integer </a>
|
132
132
|
|
133
133
|
|
134
134
|
|
135
135
|
</span>
|
136
136
|
|
137
137
|
|
138
|
-
|
138
|
+
|
139
|
+
|
140
|
+
|
141
|
+
|
142
|
+
|
143
|
+
|
144
|
+
|
145
|
+
<span class="summary_desc"><div class='inline'>
|
146
|
+
<p>Evaluates the added number of min occurs of a given array of articles.</p>
|
147
|
+
</div></span>
|
148
|
+
|
149
|
+
</li>
|
150
|
+
|
151
|
+
|
152
|
+
<li class="public ">
|
153
|
+
<span class="summary_signature">
|
154
|
+
|
155
|
+
<a href="#match_shortcut_flag-class_method" title="match_shortcut_flag (class method)">.<strong>match_shortcut_flag</strong>(shortcut_flags, arg) ⇒ Array<String><sup>?</sup> </a>
|
156
|
+
|
157
|
+
|
158
|
+
|
159
|
+
</span>
|
160
|
+
|
139
161
|
|
140
162
|
|
141
163
|
|
@@ -145,22 +167,33 @@
|
|
145
167
|
|
146
168
|
|
147
169
|
<span class="summary_desc"><div class='inline'>
|
148
|
-
<p>
|
170
|
+
<p>Tests whether a given sample matches a shortcut flag.</p>
|
149
171
|
</div></span>
|
150
172
|
|
151
173
|
</li>
|
152
174
|
|
153
175
|
|
176
|
+
</ul>
|
177
|
+
|
178
|
+
<h2>
|
179
|
+
Instance Method Summary
|
180
|
+
<small><a href="#" class="summary_toggle">collapse</a></small>
|
181
|
+
</h2>
|
182
|
+
|
183
|
+
<ul class="summary">
|
184
|
+
|
154
185
|
<li class="public ">
|
155
186
|
<span class="summary_signature">
|
156
187
|
|
157
|
-
<a href="#
|
188
|
+
<a href="#initialize-instance_method" title="#initialize (instance method)">#<strong>initialize</strong> ⇒ Parser </a>
|
158
189
|
|
159
190
|
|
160
191
|
|
161
192
|
</span>
|
162
193
|
|
163
194
|
|
195
|
+
<span class="note title constructor">constructor</span>
|
196
|
+
|
164
197
|
|
165
198
|
|
166
199
|
|
@@ -169,7 +202,7 @@
|
|
169
202
|
|
170
203
|
|
171
204
|
<span class="summary_desc"><div class='inline'>
|
172
|
-
<p>
|
205
|
+
<p>Constructs a new Parser.</p>
|
173
206
|
</div></span>
|
174
207
|
|
175
208
|
</li>
|
@@ -178,7 +211,7 @@
|
|
178
211
|
<li class="public ">
|
179
212
|
<span class="summary_signature">
|
180
213
|
|
181
|
-
<a href="#
|
214
|
+
<a href="#parse_arguments-instance_method" title="#parse_arguments (instance method)">#<strong>parse_arguments</strong>(syntax, arguments, opts = {}, &block) ⇒ Result </a>
|
182
215
|
|
183
216
|
|
184
217
|
|
@@ -193,7 +226,7 @@
|
|
193
226
|
|
194
227
|
|
195
228
|
<span class="summary_desc"><div class='inline'>
|
196
|
-
<p>Parses a given
|
229
|
+
<p>Parses a given list of arguments.</p>
|
197
230
|
</div></span>
|
198
231
|
|
199
232
|
</li>
|
@@ -217,7 +250,7 @@
|
|
217
250
|
</h3><div class="docstring">
|
218
251
|
<div class="discussion">
|
219
252
|
|
220
|
-
<p>
|
253
|
+
<p>Constructs a new Parser.</p>
|
221
254
|
|
222
255
|
|
223
256
|
</div>
|
@@ -231,11 +264,11 @@
|
|
231
264
|
<pre class="lines">
|
232
265
|
|
233
266
|
|
234
|
-
|
235
|
-
|
267
|
+
24
|
268
|
+
25</pre>
|
236
269
|
</td>
|
237
270
|
<td>
|
238
|
-
<pre class="code"><span class="info file"># File 'lib/term_utils/ap/parser.rb', line
|
271
|
+
<pre class="code"><span class="info file"># File 'lib/term_utils/ap/parser.rb', line 24</span>
|
239
272
|
|
240
273
|
<span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span>
|
241
274
|
<span class='kw'>end</span></pre>
|
@@ -247,14 +280,14 @@
|
|
247
280
|
</div>
|
248
281
|
|
249
282
|
|
250
|
-
<div id="
|
251
|
-
<h2>
|
283
|
+
<div id="class_method_details" class="method_details_list">
|
284
|
+
<h2>Class Method Details</h2>
|
252
285
|
|
253
286
|
|
254
287
|
<div class="method_details first">
|
255
|
-
<h3 class="signature first" id="
|
288
|
+
<h3 class="signature first" id="eval_article_min_occurs-class_method">
|
256
289
|
|
257
|
-
|
290
|
+
.<strong>eval_article_min_occurs</strong>(articles) ⇒ <tt>Integer</tt>
|
258
291
|
|
259
292
|
|
260
293
|
|
@@ -263,7 +296,7 @@
|
|
263
296
|
</h3><div class="docstring">
|
264
297
|
<div class="discussion">
|
265
298
|
|
266
|
-
<p>
|
299
|
+
<p>Evaluates the added number of min occurs of a given array of articles.</p>
|
267
300
|
|
268
301
|
|
269
302
|
</div>
|
@@ -274,104 +307,112 @@
|
|
274
307
|
|
275
308
|
<li>
|
276
309
|
|
277
|
-
<span class='name'>
|
310
|
+
<span class='name'>articles</span>
|
278
311
|
|
279
312
|
|
280
|
-
<span class='type'>(<tt
|
313
|
+
<span class='type'>(<tt>Array<<span class='object_link'><a href="Article.html" title="TermUtils::AP::Article (class)">TermUtils::AP::Article</a></span>></tt>)</span>
|
281
314
|
|
282
315
|
|
283
316
|
|
284
317
|
</li>
|
285
318
|
|
286
|
-
|
287
|
-
|
288
|
-
|
289
|
-
|
290
|
-
|
291
|
-
<span class='type'>(<tt>Array<String></tt>)</span>
|
292
|
-
|
293
|
-
|
294
|
-
|
295
|
-
</li>
|
319
|
+
</ul>
|
320
|
+
|
321
|
+
<p class="tag_title">Returns:</p>
|
322
|
+
<ul class="return">
|
296
323
|
|
297
324
|
<li>
|
298
325
|
|
299
|
-
<span class='name'>opts</span>
|
300
|
-
|
301
326
|
|
302
|
-
<span class='type'>(<tt>
|
327
|
+
<span class='type'>(<tt>Integer</tt>)</span>
|
303
328
|
|
304
329
|
|
305
|
-
<em class="default">(defaults to: <tt>{}</tt>)</em>
|
306
|
-
|
307
|
-
|
308
|
-
—
|
309
|
-
<div class='inline'>
|
310
|
-
<p>`:program`.</p>
|
311
|
-
</div>
|
312
330
|
|
313
331
|
</li>
|
314
332
|
|
315
333
|
</ul>
|
316
334
|
|
317
|
-
|
318
|
-
|
319
|
-
|
320
|
-
|
321
|
-
|
322
|
-
|
323
|
-
|
324
|
-
|
325
|
-
|
326
|
-
|
327
|
-
|
328
|
-
|
329
|
-
|
330
|
-
|
331
|
-
|
332
|
-
|
333
|
-
|
334
|
-
|
335
|
-
|
335
|
+
</div><table class="source_code">
|
336
|
+
<tr>
|
337
|
+
<td>
|
338
|
+
<pre class="lines">
|
339
|
+
|
340
|
+
|
341
|
+
64
|
342
|
+
65
|
343
|
+
66</pre>
|
344
|
+
</td>
|
345
|
+
<td>
|
346
|
+
<pre class="code"><span class="info file"># File 'lib/term_utils/ap/parser.rb', line 64</span>
|
347
|
+
|
348
|
+
<span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_eval_article_min_occurs'>eval_article_min_occurs</span><span class='lparen'>(</span><span class='id identifier rubyid_articles'>articles</span><span class='rparen'>)</span>
|
349
|
+
<span class='id identifier rubyid_articles'>articles</span><span class='period'>.</span><span class='id identifier rubyid_inject'>inject</span><span class='lparen'>(</span><span class='int'>0</span><span class='rparen'>)</span> <span class='lbrace'>{</span> <span class='op'>|</span><span class='id identifier rubyid_acc'>acc</span><span class='comma'>,</span> <span class='id identifier rubyid_a'>a</span><span class='op'>|</span> <span class='id identifier rubyid_acc'>acc</span> <span class='op'>+</span> <span class='id identifier rubyid_a'>a</span><span class='period'>.</span><span class='id identifier rubyid_min_occurs'>min_occurs</span> <span class='rbrace'>}</span>
|
350
|
+
<span class='kw'>end</span></pre>
|
351
|
+
</td>
|
352
|
+
</tr>
|
353
|
+
</table>
|
336
354
|
</div>
|
337
|
-
|
338
|
-
|
339
|
-
|
340
|
-
|
355
|
+
|
356
|
+
<div class="method_details ">
|
357
|
+
<h3 class="signature " id="match_shortcut_flag-class_method">
|
358
|
+
|
359
|
+
.<strong>match_shortcut_flag</strong>(shortcut_flags, arg) ⇒ <tt>Array<String></tt><sup>?</sup>
|
341
360
|
|
342
361
|
|
343
|
-
|
344
|
-
|
362
|
+
|
363
|
+
|
364
|
+
|
365
|
+
</h3><div class="docstring">
|
366
|
+
<div class="discussion">
|
367
|
+
|
368
|
+
<p>Tests whether a given sample matches a shortcut flag.</p>
|
369
|
+
|
370
|
+
|
371
|
+
</div>
|
372
|
+
</div>
|
373
|
+
<div class="tags">
|
374
|
+
<p class="tag_title">Parameters:</p>
|
375
|
+
<ul class="param">
|
345
376
|
|
346
377
|
<li>
|
347
378
|
|
379
|
+
<span class='name'>shortcut_flags</span>
|
380
|
+
|
348
381
|
|
349
|
-
<span class='type'>(<tt
|
382
|
+
<span class='type'>(<tt>Hash<String, <span class='object_link'><a href="Flag.html" title="TermUtils::AP::Flag (class)">Flag</a></span>></tt>)</span>
|
350
383
|
|
351
384
|
|
352
385
|
|
353
386
|
</li>
|
354
387
|
|
355
|
-
</ul>
|
356
|
-
<p class="tag_title">Raises:</p>
|
357
|
-
<ul class="raise">
|
358
|
-
|
359
388
|
<li>
|
360
389
|
|
390
|
+
<span class='name'>arg</span>
|
391
|
+
|
361
392
|
|
362
|
-
<span class='type'>(<tt
|
393
|
+
<span class='type'>(<tt>String</tt>)</span>
|
363
394
|
|
364
395
|
|
365
396
|
|
366
397
|
</li>
|
367
398
|
|
399
|
+
</ul>
|
400
|
+
|
401
|
+
<p class="tag_title">Returns:</p>
|
402
|
+
<ul class="return">
|
403
|
+
|
368
404
|
<li>
|
369
405
|
|
370
406
|
|
371
|
-
<span class='type'>(<tt
|
407
|
+
<span class='type'>(<tt>Array<String></tt>, <tt>nil</tt>)</span>
|
372
408
|
|
373
409
|
|
374
410
|
|
411
|
+
—
|
412
|
+
<div class='inline'>
|
413
|
+
<p>Replacements on success, nil otherwise.</p>
|
414
|
+
</div>
|
415
|
+
|
375
416
|
</li>
|
376
417
|
|
377
418
|
</ul>
|
@@ -382,39 +423,43 @@
|
|
382
423
|
<pre class="lines">
|
383
424
|
|
384
425
|
|
385
|
-
43
|
386
|
-
44
|
387
|
-
45
|
388
|
-
46
|
389
|
-
47
|
390
|
-
48
|
391
|
-
49
|
392
|
-
50
|
393
426
|
51
|
394
|
-
52
|
427
|
+
52
|
428
|
+
53
|
429
|
+
54
|
430
|
+
55
|
431
|
+
56
|
432
|
+
57
|
433
|
+
58
|
434
|
+
59</pre>
|
395
435
|
</td>
|
396
436
|
<td>
|
397
|
-
<pre class="code"><span class="info file"># File 'lib/term_utils/ap/parser.rb', line
|
437
|
+
<pre class="code"><span class="info file"># File 'lib/term_utils/ap/parser.rb', line 51</span>
|
398
438
|
|
399
|
-
<span class='kw'>def</span> <span class='
|
400
|
-
<span class='id identifier
|
401
|
-
|
402
|
-
|
403
|
-
|
404
|
-
<span class='id identifier rubyid_catch'>catch</span> <span class='symbol'>:done</span> <span class='kw'>do</span>
|
405
|
-
<span class='id identifier rubyid_parse0'>parse0</span><span class='lparen'>(</span><span class='id identifier rubyid_res'>res</span><span class='period'>.</span><span class='id identifier rubyid_value'>value</span><span class='comma'>,</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>
|
439
|
+
<span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_match_shortcut_flag'>match_shortcut_flag</span><span class='lparen'>(</span><span class='id identifier rubyid_shortcut_flags'>shortcut_flags</span><span class='comma'>,</span> <span class='id identifier rubyid_arg'>arg</span><span class='rparen'>)</span>
|
440
|
+
<span class='id identifier rubyid_shortcut_flags'>shortcut_flags</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_label'>label</span><span class='comma'>,</span> <span class='id identifier rubyid_flag'>flag</span><span class='op'>|</span>
|
441
|
+
<span class='kw'>next</span> <span class='kw'>unless</span> <span class='id identifier rubyid_arg'>arg</span><span class='period'>.</span><span class='id identifier rubyid_start_with?'>start_with?</span> <span class='id identifier rubyid_label'>label</span>
|
442
|
+
|
443
|
+
<span class='kw'>return</span> <span class='lbracket'>[</span><span class='id identifier rubyid_flag'>flag</span><span class='period'>.</span><span class='id identifier rubyid_label'>label</span><span class='comma'>,</span> <span class='id identifier rubyid_arg'>arg</span><span class='lbracket'>[</span><span class='id identifier rubyid_label'>label</span><span class='period'>.</span><span class='id identifier rubyid_length'>length</span><span class='op'>..</span><span class='op'>-</span><span class='int'>1</span><span class='rbracket'>]</span><span class='rbracket'>]</span>
|
406
444
|
<span class='kw'>end</span>
|
407
|
-
|
445
|
+
|
446
|
+
<span class='kw'>nil</span>
|
408
447
|
<span class='kw'>end</span></pre>
|
409
448
|
</td>
|
410
449
|
</tr>
|
411
450
|
</table>
|
412
451
|
</div>
|
413
452
|
|
414
|
-
|
415
|
-
|
453
|
+
</div>
|
454
|
+
|
455
|
+
<div id="instance_method_details" class="method_details_list">
|
456
|
+
<h2>Instance Method Details</h2>
|
457
|
+
|
458
|
+
|
459
|
+
<div class="method_details first">
|
460
|
+
<h3 class="signature first" id="parse_arguments-instance_method">
|
416
461
|
|
417
|
-
#<strong>
|
462
|
+
#<strong>parse_arguments</strong>(syntax, arguments, opts = {}, &block) ⇒ <tt><span class='object_link'><a href="Result.html" title="TermUtils::AP::Result (class)">Result</a></span></tt>
|
418
463
|
|
419
464
|
|
420
465
|
|
@@ -423,7 +468,7 @@
|
|
423
468
|
</h3><div class="docstring">
|
424
469
|
<div class="discussion">
|
425
470
|
|
426
|
-
<p>Parses a given
|
471
|
+
<p>Parses a given list of arguments.</p>
|
427
472
|
|
428
473
|
|
429
474
|
</div>
|
@@ -437,7 +482,7 @@
|
|
437
482
|
<span class='name'>syntax</span>
|
438
483
|
|
439
484
|
|
440
|
-
<span class='type'>(<tt><span class='object_link'><a href="Syntax.html" title="TermUtils::AP::Syntax (class)">
|
485
|
+
<span class='type'>(<tt><span class='object_link'><a href="Syntax.html" title="TermUtils::AP::Syntax (class)">Syntax</a></span></tt>)</span>
|
441
486
|
|
442
487
|
|
443
488
|
|
@@ -445,10 +490,10 @@
|
|
445
490
|
|
446
491
|
<li>
|
447
492
|
|
448
|
-
<span class='name'>
|
493
|
+
<span class='name'>arguments</span>
|
449
494
|
|
450
495
|
|
451
|
-
<span class='type'>(<tt>String
|
496
|
+
<span class='type'>(<tt>Array<String></tt>)</span>
|
452
497
|
|
453
498
|
|
454
499
|
|
@@ -465,48 +510,17 @@
|
|
465
510
|
<em class="default">(defaults to: <tt>{}</tt>)</em>
|
466
511
|
|
467
512
|
|
468
|
-
—
|
469
|
-
<div class='inline'>
|
470
|
-
<p>`:program`.</p>
|
471
|
-
</div>
|
472
|
-
|
473
513
|
</li>
|
474
514
|
|
475
515
|
</ul>
|
476
516
|
|
477
|
-
|
478
|
-
|
479
|
-
|
480
|
-
|
481
|
-
|
482
|
-
|
483
|
-
|
484
|
-
<p class="tag_title">Options Hash (<tt>opts</tt>):</p>
|
485
|
-
<ul class="option">
|
486
|
-
|
487
|
-
<li>
|
488
|
-
<span class="name">:program</span>
|
489
|
-
<span class="type">(<tt>Boolean</tt>)</span>
|
490
|
-
<span class="default">
|
491
|
-
|
492
|
-
</span>
|
493
|
-
|
494
|
-
— <div class='inline'>
|
495
|
-
<p>Whether the first argument is the program name.</p>
|
496
|
-
</div>
|
497
|
-
|
498
|
-
</li>
|
499
|
-
|
500
|
-
</ul>
|
501
|
-
|
502
|
-
|
503
517
|
<p class="tag_title">Returns:</p>
|
504
518
|
<ul class="return">
|
505
519
|
|
506
520
|
<li>
|
507
521
|
|
508
522
|
|
509
|
-
<span class='type'>(<tt><span class='object_link'><a href="Result.html" title="TermUtils::AP::Result (class)">
|
523
|
+
<span class='type'>(<tt><span class='object_link'><a href="Result.html" title="TermUtils::AP::Result (class)">Result</a></span></tt>)</span>
|
510
524
|
|
511
525
|
|
512
526
|
|
@@ -519,7 +533,7 @@
|
|
519
533
|
<li>
|
520
534
|
|
521
535
|
|
522
|
-
<span class='type'>(<tt><span class='object_link'><a href="ParseError.html" title="TermUtils::AP::ParseError (class)">
|
536
|
+
<span class='type'>(<tt><span class='object_link'><a href="ParseError.html" title="TermUtils::AP::ParseError (class)">ParseError</a></span></tt>)</span>
|
523
537
|
|
524
538
|
|
525
539
|
|
@@ -528,7 +542,7 @@
|
|
528
542
|
<li>
|
529
543
|
|
530
544
|
|
531
|
-
<span class='type'>(<tt><span class='object_link'><a href="SyntaxError.html" title="TermUtils::AP::SyntaxError (class)">
|
545
|
+
<span class='type'>(<tt><span class='object_link'><a href="SyntaxError.html" title="TermUtils::AP::SyntaxError (class)">SyntaxError</a></span></tt>)</span>
|
532
546
|
|
533
547
|
|
534
548
|
|
@@ -542,15 +556,33 @@
|
|
542
556
|
<pre class="lines">
|
543
557
|
|
544
558
|
|
545
|
-
|
546
|
-
|
547
|
-
|
559
|
+
34
|
560
|
+
35
|
561
|
+
36
|
562
|
+
37
|
563
|
+
38
|
564
|
+
39
|
565
|
+
40
|
566
|
+
41
|
567
|
+
42
|
568
|
+
43
|
569
|
+
44
|
570
|
+
45</pre>
|
548
571
|
</td>
|
549
572
|
<td>
|
550
|
-
<pre class="code"><span class="info file"># File 'lib/term_utils/ap/parser.rb', line
|
573
|
+
<pre class="code"><span class="info file"># File 'lib/term_utils/ap/parser.rb', line 34</span>
|
551
574
|
|
552
|
-
<span class='kw'>def</span> <span class='id identifier
|
553
|
-
<span class='id identifier
|
575
|
+
<span class='kw'>def</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>
|
576
|
+
<span class='id identifier rubyid_syntax'>syntax</span> <span class='op'>=</span> <span class='id identifier rubyid_syntax'>syntax</span><span class='period'>.</span><span class='id identifier rubyid_dup'>dup</span>
|
577
|
+
<span class='id identifier rubyid_syntax'>syntax</span><span class='period'>.</span><span class='id identifier rubyid_finalize!'>finalize!</span>
|
578
|
+
<span class='id identifier rubyid_arguments'>arguments</span> <span class='op'>=</span> <span class='id identifier rubyid_arguments'>arguments</span><span class='period'>.</span><span class='id identifier rubyid_dup'>dup</span>
|
579
|
+
<span class='id identifier rubyid_res'>res</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="../AP.html" title="TermUtils::AP (module)">AP</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="Result.html" title="TermUtils::AP::Result (class)">Result</a></span></span><span class='period'>.</span><span class='id identifier rubyid_new'><span class='object_link'><a href="Result.html#initialize-instance_method" title="TermUtils::AP::Result#initialize (method)">new</a></span></span><span class='lparen'>(</span><span class='id identifier rubyid_syntax'>syntax</span><span class='rparen'>)</span>
|
580
|
+
<span class='id identifier rubyid_catch'>catch</span> <span class='symbol'>:done</span> <span class='kw'>do</span>
|
581
|
+
<span class='id identifier rubyid_parse0'>parse0</span><span class='lparen'>(</span><span class='id identifier rubyid_res'>res</span><span class='comma'>,</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>
|
582
|
+
<span class='kw'>end</span>
|
583
|
+
<span class='id identifier rubyid_res'>res</span><span class='period'>.</span><span class='id identifier rubyid_remaining_arguments'>remaining_arguments</span> <span class='op'>=</span> <span class='id identifier rubyid_arguments'>arguments</span>
|
584
|
+
<span class='id identifier rubyid_res'>res</span><span class='period'>.</span><span class='id identifier rubyid_walk'>walk</span><span class='lparen'>(</span><span class='op'>&</span><span class='id identifier rubyid_block'>block</span><span class='rparen'>)</span> <span class='kw'>if</span> <span class='id identifier rubyid_block'>block</span>
|
585
|
+
<span class='id identifier rubyid_res'>res</span>
|
554
586
|
<span class='kw'>end</span></pre>
|
555
587
|
</td>
|
556
588
|
</tr>
|
@@ -562,9 +594,9 @@
|
|
562
594
|
</div>
|
563
595
|
|
564
596
|
<div id="footer">
|
565
|
-
Generated on
|
597
|
+
Generated on Sun Aug 2 18:35:09 2020 by
|
566
598
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
567
|
-
0.9.
|
599
|
+
0.9.25 (ruby-2.6.5).
|
568
600
|
</div>
|
569
601
|
|
570
602
|
</div>
|