term_utils 0.2.0 → 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +6 -0
- data/COPYING +3 -3
- data/README.md +7 -1
- data/doc/TermUtils/AP/Article.html +991 -0
- data/doc/TermUtils/AP/Element.html +1025 -0
- data/doc/TermUtils/AP/Flag.html +539 -0
- data/doc/TermUtils/AP/Level.html +638 -0
- data/doc/TermUtils/AP/NoSuchValueError.html +217 -0
- data/doc/TermUtils/AP/Parameter.html +804 -0
- data/doc/TermUtils/AP/ParseError.html +217 -0
- data/doc/TermUtils/AP/Parser.html +572 -0
- data/doc/TermUtils/AP/Result.html +1029 -0
- data/doc/TermUtils/AP/ResultView.html +597 -0
- data/doc/TermUtils/AP/Syntax.html +1051 -0
- data/doc/TermUtils/AP/SyntaxError.html +217 -0
- data/doc/TermUtils/AP.html +505 -0
- data/doc/TermUtils/FF/Config.html +1 -1
- data/doc/TermUtils/FF/Cursor/Context.html +1 -1
- data/doc/TermUtils/FF/Cursor.html +1 -1
- data/doc/TermUtils/FF/Query.html +1 -1
- data/doc/TermUtils/FF.html +1 -1
- data/doc/TermUtils/PropertyTreeNode.html +1999 -0
- data/doc/TermUtils/Tab/Column.html +1 -1
- data/doc/TermUtils/Tab/Holder.html +1 -1
- data/doc/TermUtils/Tab/Printer.html +1 -1
- data/doc/TermUtils/Tab/Table.html +1 -1
- data/doc/TermUtils/Tab.html +1 -1
- data/doc/TermUtils.html +5 -3
- data/doc/_index.html +143 -1
- data/doc/class_list.html +1 -1
- data/doc/file.README.html +8 -2
- data/doc/index.html +8 -2
- data/doc/method_list.html +638 -22
- data/doc/top-level-namespace.html +1 -1
- data/lib/term_utils/ap/article.rb +68 -0
- data/lib/term_utils/ap/element.rb +78 -0
- data/lib/term_utils/ap/flag.rb +48 -0
- data/lib/term_utils/ap/level.rb +57 -0
- data/lib/term_utils/ap/no_such_value_error.rb +27 -0
- data/lib/term_utils/ap/parameter.rb +75 -0
- data/lib/term_utils/ap/parse_error.rb +27 -0
- data/lib/term_utils/ap/parser.rb +185 -0
- data/lib/term_utils/ap/result.rb +175 -0
- data/lib/term_utils/ap/syntax.rb +112 -0
- data/lib/term_utils/ap/syntax_error.rb +27 -0
- data/lib/term_utils/ap.rb +59 -0
- data/lib/term_utils/property_tree_node.rb +200 -0
- data/lib/term_utils.rb +1 -0
- data/term_utils.gemspec +2 -2
- metadata +29 -2
@@ -0,0 +1,804 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
<html>
|
3
|
+
<head>
|
4
|
+
<meta charset="utf-8">
|
5
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
6
|
+
<title>
|
7
|
+
Class: TermUtils::AP::Parameter
|
8
|
+
|
9
|
+
— Documentation by YARD 0.9.20
|
10
|
+
|
11
|
+
</title>
|
12
|
+
|
13
|
+
<link rel="stylesheet" href="../../css/style.css" type="text/css" charset="utf-8" />
|
14
|
+
|
15
|
+
<link rel="stylesheet" href="../../css/common.css" type="text/css" charset="utf-8" />
|
16
|
+
|
17
|
+
<script type="text/javascript" charset="utf-8">
|
18
|
+
pathId = "TermUtils::AP::Parameter";
|
19
|
+
relpath = '../../';
|
20
|
+
</script>
|
21
|
+
|
22
|
+
|
23
|
+
<script type="text/javascript" charset="utf-8" src="../../js/jquery.js"></script>
|
24
|
+
|
25
|
+
<script type="text/javascript" charset="utf-8" src="../../js/app.js"></script>
|
26
|
+
|
27
|
+
|
28
|
+
</head>
|
29
|
+
<body>
|
30
|
+
<div class="nav_wrap">
|
31
|
+
<iframe id="nav" src="../../class_list.html?1"></iframe>
|
32
|
+
<div id="resizer"></div>
|
33
|
+
</div>
|
34
|
+
|
35
|
+
<div id="main" tabindex="-1">
|
36
|
+
<div id="header">
|
37
|
+
<div id="menu">
|
38
|
+
|
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
|
+
»
|
42
|
+
<span class="title">Parameter</span>
|
43
|
+
|
44
|
+
</div>
|
45
|
+
|
46
|
+
<div id="search">
|
47
|
+
|
48
|
+
<a class="full_list_link" id="class_list_link"
|
49
|
+
href="../../class_list.html">
|
50
|
+
|
51
|
+
<svg width="24" height="24">
|
52
|
+
<rect x="0" y="4" width="24" height="4" rx="1" ry="1"></rect>
|
53
|
+
<rect x="0" y="12" width="24" height="4" rx="1" ry="1"></rect>
|
54
|
+
<rect x="0" y="20" width="24" height="4" rx="1" ry="1"></rect>
|
55
|
+
</svg>
|
56
|
+
</a>
|
57
|
+
|
58
|
+
</div>
|
59
|
+
<div class="clear"></div>
|
60
|
+
</div>
|
61
|
+
|
62
|
+
<div id="content"><h1>Class: TermUtils::AP::Parameter
|
63
|
+
|
64
|
+
|
65
|
+
|
66
|
+
</h1>
|
67
|
+
<div class="box_info">
|
68
|
+
|
69
|
+
<dl>
|
70
|
+
<dt>Inherits:</dt>
|
71
|
+
<dd>
|
72
|
+
<span class="inheritName"><span class='object_link'><a href="Element.html" title="TermUtils::AP::Element (class)">Element</a></span></span>
|
73
|
+
|
74
|
+
<ul class="fullTree">
|
75
|
+
<li>Object</li>
|
76
|
+
|
77
|
+
<li class="next"><span class='object_link'><a href="Element.html" title="TermUtils::AP::Element (class)">Element</a></span></li>
|
78
|
+
|
79
|
+
<li class="next">TermUtils::AP::Parameter</li>
|
80
|
+
|
81
|
+
</ul>
|
82
|
+
<a href="#" class="inheritanceTree">show all</a>
|
83
|
+
|
84
|
+
</dd>
|
85
|
+
</dl>
|
86
|
+
|
87
|
+
|
88
|
+
|
89
|
+
|
90
|
+
|
91
|
+
|
92
|
+
|
93
|
+
|
94
|
+
|
95
|
+
|
96
|
+
|
97
|
+
<dl>
|
98
|
+
<dt>Defined in:</dt>
|
99
|
+
<dd>lib/term_utils/ap/parameter.rb</dd>
|
100
|
+
</dl>
|
101
|
+
|
102
|
+
</div>
|
103
|
+
|
104
|
+
<h2>Overview</h2><div class="docstring">
|
105
|
+
<div class="discussion">
|
106
|
+
|
107
|
+
<p>Represents a Parameter.</p>
|
108
|
+
|
109
|
+
|
110
|
+
</div>
|
111
|
+
</div>
|
112
|
+
<div class="tags">
|
113
|
+
|
114
|
+
|
115
|
+
</div>
|
116
|
+
|
117
|
+
|
118
|
+
|
119
|
+
<h2>Instance Attribute Summary <small><a href="#" class="summary_toggle">collapse</a></small></h2>
|
120
|
+
<ul class="summary">
|
121
|
+
|
122
|
+
<li class="public ">
|
123
|
+
<span class="summary_signature">
|
124
|
+
|
125
|
+
<a href="#articles-instance_method" title="#articles (instance method)">#<strong>articles</strong> ⇒ Array<TermUtils::AP::Article> </a>
|
126
|
+
|
127
|
+
|
128
|
+
|
129
|
+
</span>
|
130
|
+
|
131
|
+
|
132
|
+
|
133
|
+
|
134
|
+
|
135
|
+
|
136
|
+
|
137
|
+
|
138
|
+
|
139
|
+
|
140
|
+
|
141
|
+
|
142
|
+
<span class="summary_desc"><div class='inline'></div></span>
|
143
|
+
|
144
|
+
</li>
|
145
|
+
|
146
|
+
|
147
|
+
</ul>
|
148
|
+
|
149
|
+
|
150
|
+
|
151
|
+
|
152
|
+
|
153
|
+
<h3 class="inherited">Attributes inherited from <span class='object_link'><a href="Element.html" title="TermUtils::AP::Element (class)">Element</a></span></h3>
|
154
|
+
<p class="inherited"><span class='object_link'><a href="Element.html#flags-instance_method" title="TermUtils::AP::Element#flags (method)">#flags</a></span>, <span class='object_link'><a href="Element.html#id-instance_method" title="TermUtils::AP::Element#id (method)">#id</a></span>, <span class='object_link'><a href="Element.html#max_occurs-instance_method" title="TermUtils::AP::Element#max_occurs (method)">#max_occurs</a></span>, <span class='object_link'><a href="Element.html#min_occurs-instance_method" title="TermUtils::AP::Element#min_occurs (method)">#min_occurs</a></span></p>
|
155
|
+
|
156
|
+
|
157
|
+
|
158
|
+
<h2>
|
159
|
+
Instance Method Summary
|
160
|
+
<small><a href="#" class="summary_toggle">collapse</a></small>
|
161
|
+
</h2>
|
162
|
+
|
163
|
+
<ul class="summary">
|
164
|
+
|
165
|
+
<li class="public ">
|
166
|
+
<span class="summary_signature">
|
167
|
+
|
168
|
+
<a href="#define_article-instance_method" title="#define_article (instance method)">#<strong>define_article</strong>(opts = {}, &block) ⇒ TermUtils::AP::Article </a>
|
169
|
+
|
170
|
+
|
171
|
+
|
172
|
+
</span>
|
173
|
+
|
174
|
+
|
175
|
+
|
176
|
+
|
177
|
+
|
178
|
+
|
179
|
+
|
180
|
+
|
181
|
+
|
182
|
+
<span class="summary_desc"><div class='inline'>
|
183
|
+
<p>Adds a new Article to this one.</p>
|
184
|
+
</div></span>
|
185
|
+
|
186
|
+
</li>
|
187
|
+
|
188
|
+
|
189
|
+
<li class="public ">
|
190
|
+
<span class="summary_signature">
|
191
|
+
|
192
|
+
<a href="#fetch_articles-instance_method" title="#fetch_articles (instance method)">#<strong>fetch_articles</strong> ⇒ Array<TermUtils::AP::Article> </a>
|
193
|
+
|
194
|
+
|
195
|
+
|
196
|
+
</span>
|
197
|
+
|
198
|
+
|
199
|
+
|
200
|
+
|
201
|
+
|
202
|
+
|
203
|
+
|
204
|
+
|
205
|
+
|
206
|
+
<span class="summary_desc"><div class='inline'>
|
207
|
+
<p>Fetches all articles.</p>
|
208
|
+
</div></span>
|
209
|
+
|
210
|
+
</li>
|
211
|
+
|
212
|
+
|
213
|
+
<li class="public ">
|
214
|
+
<span class="summary_signature">
|
215
|
+
|
216
|
+
<a href="#finalize!-instance_method" title="#finalize! (instance method)">#<strong>finalize!</strong>(opts = {}) ⇒ nil </a>
|
217
|
+
|
218
|
+
|
219
|
+
|
220
|
+
</span>
|
221
|
+
|
222
|
+
|
223
|
+
|
224
|
+
|
225
|
+
|
226
|
+
|
227
|
+
|
228
|
+
|
229
|
+
|
230
|
+
<span class="summary_desc"><div class='inline'>
|
231
|
+
<p>Finalizes this one.</p>
|
232
|
+
</div></span>
|
233
|
+
|
234
|
+
</li>
|
235
|
+
|
236
|
+
|
237
|
+
<li class="public ">
|
238
|
+
<span class="summary_signature">
|
239
|
+
|
240
|
+
<a href="#initialize-instance_method" title="#initialize (instance method)">#<strong>initialize</strong>(opts = {}) ⇒ Parameter </a>
|
241
|
+
|
242
|
+
|
243
|
+
|
244
|
+
</span>
|
245
|
+
|
246
|
+
|
247
|
+
<span class="note title constructor">constructor</span>
|
248
|
+
|
249
|
+
|
250
|
+
|
251
|
+
|
252
|
+
|
253
|
+
|
254
|
+
|
255
|
+
|
256
|
+
<span class="summary_desc"><div class='inline'>
|
257
|
+
<p>Constructs a new Parameter.</p>
|
258
|
+
</div></span>
|
259
|
+
|
260
|
+
</li>
|
261
|
+
|
262
|
+
|
263
|
+
<li class="public ">
|
264
|
+
<span class="summary_signature">
|
265
|
+
|
266
|
+
<a href="#initialize_dup-instance_method" title="#initialize_dup (instance method)">#<strong>initialize_dup</strong>(other) ⇒ Object </a>
|
267
|
+
|
268
|
+
|
269
|
+
|
270
|
+
</span>
|
271
|
+
|
272
|
+
|
273
|
+
|
274
|
+
|
275
|
+
|
276
|
+
|
277
|
+
|
278
|
+
|
279
|
+
|
280
|
+
<span class="summary_desc"><div class='inline'>
|
281
|
+
<p>For dup method.</p>
|
282
|
+
</div></span>
|
283
|
+
|
284
|
+
</li>
|
285
|
+
|
286
|
+
|
287
|
+
</ul>
|
288
|
+
|
289
|
+
|
290
|
+
|
291
|
+
|
292
|
+
|
293
|
+
|
294
|
+
|
295
|
+
|
296
|
+
|
297
|
+
|
298
|
+
|
299
|
+
<h3 class="inherited">Methods inherited from <span class='object_link'><a href="Element.html" title="TermUtils::AP::Element (class)">Element</a></span></h3>
|
300
|
+
<p class="inherited"><span class='object_link'><a href="Element.html#define_flag-instance_method" title="TermUtils::AP::Element#define_flag (method)">#define_flag</a></span>, <span class='object_link'><a href="Element.html#flagged%3F-instance_method" title="TermUtils::AP::Element#flagged? (method)">#flagged?</a></span>, <span class='object_link'><a href="Element.html#multiple_occurs%3F-instance_method" title="TermUtils::AP::Element#multiple_occurs? (method)">#multiple_occurs?</a></span>, <span class='object_link'><a href="Element.html#occur_bounded%3F-instance_method" title="TermUtils::AP::Element#occur_bounded? (method)">#occur_bounded?</a></span></p>
|
301
|
+
<div id="constructor_details" class="method_details_list">
|
302
|
+
<h2>Constructor Details</h2>
|
303
|
+
|
304
|
+
<div class="method_details first">
|
305
|
+
<h3 class="signature first" id="initialize-instance_method">
|
306
|
+
|
307
|
+
#<strong>initialize</strong>(opts = {}) ⇒ <tt><span class='object_link'><a href="" title="TermUtils::AP::Parameter (class)">Parameter</a></span></tt>
|
308
|
+
|
309
|
+
|
310
|
+
|
311
|
+
|
312
|
+
|
313
|
+
</h3><div class="docstring">
|
314
|
+
<div class="discussion">
|
315
|
+
|
316
|
+
<p>Constructs a new Parameter.</p>
|
317
|
+
|
318
|
+
|
319
|
+
</div>
|
320
|
+
</div>
|
321
|
+
<div class="tags">
|
322
|
+
<p class="tag_title">Parameters:</p>
|
323
|
+
<ul class="param">
|
324
|
+
|
325
|
+
<li>
|
326
|
+
|
327
|
+
<span class='name'>opts</span>
|
328
|
+
|
329
|
+
|
330
|
+
<span class='type'>(<tt>Hash</tt>)</span>
|
331
|
+
|
332
|
+
|
333
|
+
<em class="default">(defaults to: <tt>{}</tt>)</em>
|
334
|
+
|
335
|
+
|
336
|
+
</li>
|
337
|
+
|
338
|
+
</ul>
|
339
|
+
|
340
|
+
|
341
|
+
|
342
|
+
|
343
|
+
<p class="tag_title">Options Hash (<tt>opts</tt>):</p>
|
344
|
+
<ul class="option">
|
345
|
+
|
346
|
+
<li>
|
347
|
+
<span class="name">:id</span>
|
348
|
+
<span class="type">(<tt>Symbol</tt>)</span>
|
349
|
+
<span class="default">
|
350
|
+
|
351
|
+
</span>
|
352
|
+
|
353
|
+
</li>
|
354
|
+
|
355
|
+
<li>
|
356
|
+
<span class="name">:min_occurs</span>
|
357
|
+
<span class="type">(<tt>Integer</tt>)</span>
|
358
|
+
<span class="default">
|
359
|
+
|
360
|
+
</span>
|
361
|
+
|
362
|
+
— <div class='inline'>
|
363
|
+
<p>Default value is `0`.</p>
|
364
|
+
</div>
|
365
|
+
|
366
|
+
</li>
|
367
|
+
|
368
|
+
<li>
|
369
|
+
<span class="name">:max_occurs</span>
|
370
|
+
<span class="type">(<tt>Integer</tt>)</span>
|
371
|
+
<span class="default">
|
372
|
+
|
373
|
+
</span>
|
374
|
+
|
375
|
+
— <div class='inline'>
|
376
|
+
<p>Default value is `1`.</p>
|
377
|
+
</div>
|
378
|
+
|
379
|
+
</li>
|
380
|
+
|
381
|
+
</ul>
|
382
|
+
|
383
|
+
|
384
|
+
|
385
|
+
</div><table class="source_code">
|
386
|
+
<tr>
|
387
|
+
<td>
|
388
|
+
<pre class="lines">
|
389
|
+
|
390
|
+
|
391
|
+
29
|
392
|
+
30
|
393
|
+
31
|
394
|
+
32
|
395
|
+
33
|
396
|
+
34
|
397
|
+
35</pre>
|
398
|
+
</td>
|
399
|
+
<td>
|
400
|
+
<pre class="code"><span class="info file"># File 'lib/term_utils/ap/parameter.rb', line 29</span>
|
401
|
+
|
402
|
+
<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>
|
403
|
+
<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>
|
404
|
+
<span class='ivar'>@min_occurs</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'>:min_occurs</span><span class='comma'>,</span> <span class='int'>0</span><span class='rparen'>)</span>
|
405
|
+
<span class='ivar'>@max_occurs</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'>:max_occurs</span><span class='comma'>,</span> <span class='int'>1</span><span class='rparen'>)</span>
|
406
|
+
<span class='ivar'>@flags</span> <span class='op'>=</span> <span class='lbracket'>[</span><span class='rbracket'>]</span>
|
407
|
+
<span class='ivar'>@articles</span> <span class='op'>=</span> <span class='lbracket'>[</span><span class='rbracket'>]</span>
|
408
|
+
<span class='kw'>end</span></pre>
|
409
|
+
</td>
|
410
|
+
</tr>
|
411
|
+
</table>
|
412
|
+
</div>
|
413
|
+
|
414
|
+
</div>
|
415
|
+
|
416
|
+
<div id="instance_attr_details" class="attr_details">
|
417
|
+
<h2>Instance Attribute Details</h2>
|
418
|
+
|
419
|
+
|
420
|
+
<span id="articles=-instance_method"></span>
|
421
|
+
<div class="method_details first">
|
422
|
+
<h3 class="signature first" id="articles-instance_method">
|
423
|
+
|
424
|
+
#<strong>articles</strong> ⇒ <tt>Array<<span class='object_link'><a href="Article.html" title="TermUtils::AP::Article (class)">TermUtils::AP::Article</a></span>></tt>
|
425
|
+
|
426
|
+
|
427
|
+
|
428
|
+
|
429
|
+
|
430
|
+
</h3><div class="docstring">
|
431
|
+
<div class="discussion">
|
432
|
+
|
433
|
+
|
434
|
+
</div>
|
435
|
+
</div>
|
436
|
+
<div class="tags">
|
437
|
+
|
438
|
+
<p class="tag_title">Returns:</p>
|
439
|
+
<ul class="return">
|
440
|
+
|
441
|
+
<li>
|
442
|
+
|
443
|
+
|
444
|
+
<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>
|
445
|
+
|
446
|
+
|
447
|
+
|
448
|
+
</li>
|
449
|
+
|
450
|
+
</ul>
|
451
|
+
|
452
|
+
</div><table class="source_code">
|
453
|
+
<tr>
|
454
|
+
<td>
|
455
|
+
<pre class="lines">
|
456
|
+
|
457
|
+
|
458
|
+
23
|
459
|
+
24
|
460
|
+
25</pre>
|
461
|
+
</td>
|
462
|
+
<td>
|
463
|
+
<pre class="code"><span class="info file"># File 'lib/term_utils/ap/parameter.rb', line 23</span>
|
464
|
+
|
465
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_articles'>articles</span>
|
466
|
+
<span class='ivar'>@articles</span>
|
467
|
+
<span class='kw'>end</span></pre>
|
468
|
+
</td>
|
469
|
+
</tr>
|
470
|
+
</table>
|
471
|
+
</div>
|
472
|
+
|
473
|
+
</div>
|
474
|
+
|
475
|
+
|
476
|
+
<div id="instance_method_details" class="method_details_list">
|
477
|
+
<h2>Instance Method Details</h2>
|
478
|
+
|
479
|
+
|
480
|
+
<div class="method_details first">
|
481
|
+
<h3 class="signature first" id="define_article-instance_method">
|
482
|
+
|
483
|
+
#<strong>define_article</strong>(opts = {}, &block) ⇒ <tt><span class='object_link'><a href="Article.html" title="TermUtils::AP::Article (class)">TermUtils::AP::Article</a></span></tt>
|
484
|
+
|
485
|
+
|
486
|
+
|
487
|
+
|
488
|
+
|
489
|
+
</h3><div class="docstring">
|
490
|
+
<div class="discussion">
|
491
|
+
|
492
|
+
<p>Adds a new Article to this one.</p>
|
493
|
+
|
494
|
+
|
495
|
+
</div>
|
496
|
+
</div>
|
497
|
+
<div class="tags">
|
498
|
+
<p class="tag_title">Parameters:</p>
|
499
|
+
<ul class="param">
|
500
|
+
|
501
|
+
<li>
|
502
|
+
|
503
|
+
<span class='name'>opts</span>
|
504
|
+
|
505
|
+
|
506
|
+
<span class='type'>(<tt>Hash</tt>)</span>
|
507
|
+
|
508
|
+
|
509
|
+
<em class="default">(defaults to: <tt>{}</tt>)</em>
|
510
|
+
|
511
|
+
|
512
|
+
</li>
|
513
|
+
|
514
|
+
</ul>
|
515
|
+
|
516
|
+
|
517
|
+
|
518
|
+
|
519
|
+
<p class="tag_title">Options Hash (<tt>opts</tt>):</p>
|
520
|
+
<ul class="option">
|
521
|
+
|
522
|
+
<li>
|
523
|
+
<span class="name">:id</span>
|
524
|
+
<span class="type">(<tt>Symbol</tt>)</span>
|
525
|
+
<span class="default">
|
526
|
+
|
527
|
+
</span>
|
528
|
+
|
529
|
+
</li>
|
530
|
+
|
531
|
+
<li>
|
532
|
+
<span class="name">:min_occurs</span>
|
533
|
+
<span class="type">(<tt>Integer</tt>)</span>
|
534
|
+
<span class="default">
|
535
|
+
|
536
|
+
</span>
|
537
|
+
|
538
|
+
— <div class='inline'>
|
539
|
+
<p>Default value is `1`.</p>
|
540
|
+
</div>
|
541
|
+
|
542
|
+
</li>
|
543
|
+
|
544
|
+
<li>
|
545
|
+
<span class="name">:max_occurs</span>
|
546
|
+
<span class="type">(<tt>Integer</tt>)</span>
|
547
|
+
<span class="default">
|
548
|
+
|
549
|
+
</span>
|
550
|
+
|
551
|
+
— <div class='inline'>
|
552
|
+
<p>Default value is `1`.</p>
|
553
|
+
</div>
|
554
|
+
|
555
|
+
</li>
|
556
|
+
|
557
|
+
<li>
|
558
|
+
<span class="name">:type</span>
|
559
|
+
<span class="type">(<tt>Symbol</tt>)</span>
|
560
|
+
<span class="default">
|
561
|
+
|
562
|
+
</span>
|
563
|
+
|
564
|
+
— <div class='inline'>
|
565
|
+
<p>`:integer`, `:string`.</p>
|
566
|
+
</div>
|
567
|
+
|
568
|
+
</li>
|
569
|
+
|
570
|
+
<li>
|
571
|
+
<span class="name">:format</span>
|
572
|
+
<span class="type">(<tt>Symbol</tt>)</span>
|
573
|
+
<span class="default">
|
574
|
+
|
575
|
+
</span>
|
576
|
+
|
577
|
+
</li>
|
578
|
+
|
579
|
+
</ul>
|
580
|
+
|
581
|
+
|
582
|
+
|
583
|
+
|
584
|
+
<p class="tag_title">Returns:</p>
|
585
|
+
<ul class="return">
|
586
|
+
|
587
|
+
<li>
|
588
|
+
|
589
|
+
|
590
|
+
<span class='type'>(<tt><span class='object_link'><a href="Article.html" title="TermUtils::AP::Article (class)">TermUtils::AP::Article</a></span></tt>)</span>
|
591
|
+
|
592
|
+
|
593
|
+
|
594
|
+
</li>
|
595
|
+
|
596
|
+
</ul>
|
597
|
+
|
598
|
+
</div><table class="source_code">
|
599
|
+
<tr>
|
600
|
+
<td>
|
601
|
+
<pre class="lines">
|
602
|
+
|
603
|
+
|
604
|
+
62
|
605
|
+
63
|
606
|
+
64
|
607
|
+
65
|
608
|
+
66
|
609
|
+
67</pre>
|
610
|
+
</td>
|
611
|
+
<td>
|
612
|
+
<pre class="code"><span class="info file"># File 'lib/term_utils/ap/parameter.rb', line 62</span>
|
613
|
+
|
614
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_define_article'>define_article</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='comma'>,</span> <span class='op'>&</span><span class='id identifier rubyid_block'>block</span><span class='rparen'>)</span>
|
615
|
+
<span class='id identifier rubyid_new_article'>new_article</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="Article.html" title="TermUtils::AP::Article (class)">Article</a></span></span><span class='period'>.</span><span class='id identifier rubyid_new'><span class='object_link'><a href="Article.html#initialize-instance_method" title="TermUtils::AP::Article#initialize (method)">new</a></span></span><span class='lparen'>(</span><span class='id identifier rubyid_opts'>opts</span><span class='rparen'>)</span>
|
616
|
+
<span class='ivar'>@articles</span> <span class='op'><<</span> <span class='id identifier rubyid_new_article'>new_article</span>
|
617
|
+
<span class='id identifier rubyid_block'>block</span><span class='period'>.</span><span class='id identifier rubyid_call'>call</span><span class='lparen'>(</span><span class='id identifier rubyid_new_article'>new_article</span><span class='rparen'>)</span> <span class='kw'>if</span> <span class='id identifier rubyid_block'>block</span>
|
618
|
+
<span class='id identifier rubyid_new_article'>new_article</span>
|
619
|
+
<span class='kw'>end</span></pre>
|
620
|
+
</td>
|
621
|
+
</tr>
|
622
|
+
</table>
|
623
|
+
</div>
|
624
|
+
|
625
|
+
<div class="method_details ">
|
626
|
+
<h3 class="signature " id="fetch_articles-instance_method">
|
627
|
+
|
628
|
+
#<strong>fetch_articles</strong> ⇒ <tt>Array<<span class='object_link'><a href="Article.html" title="TermUtils::AP::Article (class)">TermUtils::AP::Article</a></span>></tt>
|
629
|
+
|
630
|
+
|
631
|
+
|
632
|
+
|
633
|
+
|
634
|
+
</h3><div class="docstring">
|
635
|
+
<div class="discussion">
|
636
|
+
|
637
|
+
<p>Fetches all articles.</p>
|
638
|
+
|
639
|
+
|
640
|
+
</div>
|
641
|
+
</div>
|
642
|
+
<div class="tags">
|
643
|
+
|
644
|
+
<p class="tag_title">Returns:</p>
|
645
|
+
<ul class="return">
|
646
|
+
|
647
|
+
<li>
|
648
|
+
|
649
|
+
|
650
|
+
<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>
|
651
|
+
|
652
|
+
|
653
|
+
|
654
|
+
</li>
|
655
|
+
|
656
|
+
</ul>
|
657
|
+
|
658
|
+
</div><table class="source_code">
|
659
|
+
<tr>
|
660
|
+
<td>
|
661
|
+
<pre class="lines">
|
662
|
+
|
663
|
+
|
664
|
+
70
|
665
|
+
71
|
666
|
+
72</pre>
|
667
|
+
</td>
|
668
|
+
<td>
|
669
|
+
<pre class="code"><span class="info file"># File 'lib/term_utils/ap/parameter.rb', line 70</span>
|
670
|
+
|
671
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_fetch_articles'>fetch_articles</span>
|
672
|
+
<span class='ivar'>@articles</span><span class='period'>.</span><span class='id identifier rubyid_collect'>collect</span> <span class='lbrace'>{</span> <span class='op'>|</span><span class='id identifier rubyid_a'>a</span><span class='op'>|</span> <span class='id identifier rubyid_a'>a</span><span class='period'>.</span><span class='id identifier rubyid_dup'>dup</span> <span class='rbrace'>}</span>
|
673
|
+
<span class='kw'>end</span></pre>
|
674
|
+
</td>
|
675
|
+
</tr>
|
676
|
+
</table>
|
677
|
+
</div>
|
678
|
+
|
679
|
+
<div class="method_details ">
|
680
|
+
<h3 class="signature " id="finalize!-instance_method">
|
681
|
+
|
682
|
+
#<strong>finalize!</strong>(opts = {}) ⇒ <tt>nil</tt>
|
683
|
+
|
684
|
+
|
685
|
+
|
686
|
+
|
687
|
+
|
688
|
+
</h3><div class="docstring">
|
689
|
+
<div class="discussion">
|
690
|
+
|
691
|
+
<p>Finalizes this one. Internal use.</p>
|
692
|
+
|
693
|
+
|
694
|
+
</div>
|
695
|
+
</div>
|
696
|
+
<div class="tags">
|
697
|
+
|
698
|
+
<p class="tag_title">Returns:</p>
|
699
|
+
<ul class="return">
|
700
|
+
|
701
|
+
<li>
|
702
|
+
|
703
|
+
|
704
|
+
<span class='type'>(<tt>nil</tt>)</span>
|
705
|
+
|
706
|
+
|
707
|
+
|
708
|
+
</li>
|
709
|
+
|
710
|
+
</ul>
|
711
|
+
|
712
|
+
</div><table class="source_code">
|
713
|
+
<tr>
|
714
|
+
<td>
|
715
|
+
<pre class="lines">
|
716
|
+
|
717
|
+
|
718
|
+
48
|
719
|
+
49
|
720
|
+
50
|
721
|
+
51
|
722
|
+
52
|
723
|
+
53</pre>
|
724
|
+
</td>
|
725
|
+
<td>
|
726
|
+
<pre class="code"><span class="info file"># File 'lib/term_utils/ap/parameter.rb', line 48</span>
|
727
|
+
|
728
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_finalize!'>finalize!</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>
|
729
|
+
<span class='kw'>super</span>
|
730
|
+
<span class='ivar'>@articles</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_a'>a</span><span class='op'>|</span>
|
731
|
+
<span class='id identifier rubyid_a'>a</span><span class='period'>.</span><span class='id identifier rubyid_finalize!'>finalize!</span><span class='lparen'>(</span><span class='id identifier rubyid_opts'>opts</span><span class='rparen'>)</span>
|
732
|
+
<span class='kw'>end</span>
|
733
|
+
<span class='kw'>end</span></pre>
|
734
|
+
</td>
|
735
|
+
</tr>
|
736
|
+
</table>
|
737
|
+
</div>
|
738
|
+
|
739
|
+
<div class="method_details ">
|
740
|
+
<h3 class="signature " id="initialize_dup-instance_method">
|
741
|
+
|
742
|
+
#<strong>initialize_dup</strong>(other) ⇒ <tt>Object</tt>
|
743
|
+
|
744
|
+
|
745
|
+
|
746
|
+
|
747
|
+
|
748
|
+
</h3><div class="docstring">
|
749
|
+
<div class="discussion">
|
750
|
+
|
751
|
+
<p>For dup method.</p>
|
752
|
+
|
753
|
+
|
754
|
+
</div>
|
755
|
+
</div>
|
756
|
+
<div class="tags">
|
757
|
+
|
758
|
+
|
759
|
+
</div><table class="source_code">
|
760
|
+
<tr>
|
761
|
+
<td>
|
762
|
+
<pre class="lines">
|
763
|
+
|
764
|
+
|
765
|
+
37
|
766
|
+
38
|
767
|
+
39
|
768
|
+
40
|
769
|
+
41
|
770
|
+
42
|
771
|
+
43
|
772
|
+
44
|
773
|
+
45</pre>
|
774
|
+
</td>
|
775
|
+
<td>
|
776
|
+
<pre class="code"><span class="info file"># File 'lib/term_utils/ap/parameter.rb', line 37</span>
|
777
|
+
|
778
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_initialize_dup'>initialize_dup</span><span class='lparen'>(</span><span class='id identifier rubyid_other'>other</span><span class='rparen'>)</span>
|
779
|
+
<span class='kw'>if</span> <span class='id identifier rubyid_other'>other</span><span class='period'>.</span><span class='id identifier rubyid_articles'>articles</span>
|
780
|
+
<span class='ivar'>@articles</span> <span class='op'>=</span> <span class='lbracket'>[</span><span class='rbracket'>]</span>
|
781
|
+
<span class='id identifier rubyid_other'>other</span><span class='period'>.</span><span class='id identifier rubyid_articles'>articles</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_a'>a</span><span class='op'>|</span>
|
782
|
+
<span class='ivar'>@articles</span> <span class='op'><<</span> <span class='id identifier rubyid_a'>a</span><span class='period'>.</span><span class='id identifier rubyid_dup'>dup</span>
|
783
|
+
<span class='kw'>end</span>
|
784
|
+
<span class='kw'>end</span>
|
785
|
+
<span class='kw'>super</span>
|
786
|
+
<span class='kw'>end</span></pre>
|
787
|
+
</td>
|
788
|
+
</tr>
|
789
|
+
</table>
|
790
|
+
</div>
|
791
|
+
|
792
|
+
</div>
|
793
|
+
|
794
|
+
</div>
|
795
|
+
|
796
|
+
<div id="footer">
|
797
|
+
Generated on Sun Nov 10 18:36:20 2019 by
|
798
|
+
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
799
|
+
0.9.20 (ruby-2.6.5).
|
800
|
+
</div>
|
801
|
+
|
802
|
+
</div>
|
803
|
+
</body>
|
804
|
+
</html>
|