como 0.0.2 → 0.1.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.
- data/CHANGELOG.rdoc +12 -0
- data/README.rdoc +11 -5
- data/Rakefile +6 -1
- data/doc/Como/ArgsParseState.html +912 -0
- data/doc/Como/ComoCommon.html +305 -0
- data/doc/Como/MainOpt.html +636 -0
- data/doc/Como/MasterOpt.html +636 -0
- data/doc/Como/Opt/ErrorWithData.html +304 -0
- data/doc/Como/Opt/InvalidOption.html +158 -0
- data/doc/Como/Opt/MissingArgument.html +158 -0
- data/doc/Como/Opt.html +6098 -0
- data/doc/Como/RuleCheck.html +933 -0
- data/doc/Como/RuleDisplay.html +1193 -0
- data/doc/Como/Spec.html +1750 -0
- data/doc/Como.html +625 -0
- data/doc/_index.html +242 -0
- data/doc/class_list.html +53 -0
- data/doc/css/common.css +1 -0
- data/doc/css/full_list.css +57 -0
- data/doc/css/style.css +338 -0
- data/doc/file.CHANGELOG.html +90 -0
- data/doc/file.README.html +94 -0
- data/doc/file.como.html +1962 -0
- data/doc/file_list.html +58 -0
- data/doc/frames.html +28 -0
- data/doc/index.html +94 -0
- data/doc/js/app.js +214 -0
- data/doc/js/full_list.js +178 -0
- data/doc/js/jquery.js +4 -0
- data/doc/method_list.html +838 -0
- data/doc/top-level-namespace.html +112 -0
- data/lib/como.rb +1660 -661
- data/test/como_compatible +37 -0
- data/test/como_config +44 -0
- data/test/como_options +36 -0
- data/test/como_queries +44 -0
- data/test/como_rule_1 +28 -0
- data/test/como_rule_2 +28 -0
- data/test/como_subcmd +72 -0
- data/test/como_subcmd_config +88 -0
- data/test/golden/compatible.txt +438 -0
- data/test/golden/config.txt +319 -0
- data/test/golden/options.txt +438 -0
- data/test/golden/queries.txt +78 -0
- data/test/golden/rule_1.txt +454 -0
- data/test/golden/rule_2.txt +476 -0
- data/test/golden/subcmd.txt +360 -0
- data/test/golden/subcmd_config.txt +534 -0
- data/test/test_como.rb +22 -328
- data/test/test_compatible +28 -0
- data/test/test_config +12 -0
- data/test/test_options +28 -0
- data/test/test_queries +7 -0
- data/test/test_rule_1 +27 -0
- data/test/test_rule_2 +27 -0
- data/test/test_subcmd +30 -0
- data/test/test_subcmd_config +31 -0
- metadata +62 -6
@@ -0,0 +1,912 @@
|
|
1
|
+
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
2
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
3
|
+
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
4
|
+
<head>
|
5
|
+
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
6
|
+
<title>
|
7
|
+
Class: Como::ArgsParseState
|
8
|
+
|
9
|
+
— Documentation by YARD 0.8.6.1
|
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
|
+
hasFrames = window.top.frames.main ? true : false;
|
19
|
+
relpath = '../';
|
20
|
+
framesUrl = "../frames.html#!" + escape(window.location.href);
|
21
|
+
</script>
|
22
|
+
|
23
|
+
|
24
|
+
<script type="text/javascript" charset="utf-8" src="../js/jquery.js"></script>
|
25
|
+
|
26
|
+
<script type="text/javascript" charset="utf-8" src="../js/app.js"></script>
|
27
|
+
|
28
|
+
|
29
|
+
</head>
|
30
|
+
<body>
|
31
|
+
<div id="header">
|
32
|
+
<div id="menu">
|
33
|
+
|
34
|
+
<a href="../_index.html">Index (A)</a> »
|
35
|
+
<span class='title'><span class='object_link'><a href="../Como.html" title="Como (module)">Como</a></span></span>
|
36
|
+
»
|
37
|
+
<span class="title">ArgsParseState</span>
|
38
|
+
|
39
|
+
|
40
|
+
<div class="noframes"><span class="title">(</span><a href="." target="_top">no frames</a><span class="title">)</span></div>
|
41
|
+
</div>
|
42
|
+
|
43
|
+
<div id="search">
|
44
|
+
|
45
|
+
<a class="full_list_link" id="class_list_link"
|
46
|
+
href="../class_list.html">
|
47
|
+
Class List
|
48
|
+
</a>
|
49
|
+
|
50
|
+
<a class="full_list_link" id="method_list_link"
|
51
|
+
href="../method_list.html">
|
52
|
+
Method List
|
53
|
+
</a>
|
54
|
+
|
55
|
+
<a class="full_list_link" id="file_list_link"
|
56
|
+
href="../file_list.html">
|
57
|
+
File List
|
58
|
+
</a>
|
59
|
+
|
60
|
+
</div>
|
61
|
+
<div class="clear"></div>
|
62
|
+
</div>
|
63
|
+
|
64
|
+
<iframe id="search_frame"></iframe>
|
65
|
+
|
66
|
+
<div id="content"><h1>Class: Como::ArgsParseState
|
67
|
+
|
68
|
+
|
69
|
+
|
70
|
+
</h1>
|
71
|
+
|
72
|
+
<dl class="box">
|
73
|
+
|
74
|
+
<dt class="r1">Inherits:</dt>
|
75
|
+
<dd class="r1">
|
76
|
+
<span class="inheritName">Object</span>
|
77
|
+
|
78
|
+
<ul class="fullTree">
|
79
|
+
<li>Object</li>
|
80
|
+
|
81
|
+
<li class="next">Como::ArgsParseState</li>
|
82
|
+
|
83
|
+
</ul>
|
84
|
+
<a href="#" class="inheritanceTree">show all</a>
|
85
|
+
|
86
|
+
</dd>
|
87
|
+
|
88
|
+
|
89
|
+
|
90
|
+
|
91
|
+
|
92
|
+
|
93
|
+
|
94
|
+
|
95
|
+
|
96
|
+
<dt class="r2 last">Defined in:</dt>
|
97
|
+
<dd class="r2 last">lib/como.rb</dd>
|
98
|
+
|
99
|
+
</dl>
|
100
|
+
<div class="clear"></div>
|
101
|
+
|
102
|
+
<h2>Overview</h2><div class="docstring">
|
103
|
+
<div class="discussion">
|
104
|
+
|
105
|
+
<p>Command argument parsing state.</p>
|
106
|
+
|
107
|
+
|
108
|
+
</div>
|
109
|
+
</div>
|
110
|
+
<div class="tags">
|
111
|
+
|
112
|
+
|
113
|
+
</div>
|
114
|
+
|
115
|
+
|
116
|
+
|
117
|
+
|
118
|
+
|
119
|
+
|
120
|
+
|
121
|
+
<h2>
|
122
|
+
Instance Method Summary
|
123
|
+
<small>(<a href="#" class="summary_toggle">collapse</a>)</small>
|
124
|
+
</h2>
|
125
|
+
|
126
|
+
<ul class="summary">
|
127
|
+
|
128
|
+
<li class="public ">
|
129
|
+
<span class="summary_signature">
|
130
|
+
|
131
|
+
<a href="#done%3F-instance_method" title="#done? (instance method)">- (Boolean) <strong>done?</strong> </a>
|
132
|
+
|
133
|
+
|
134
|
+
|
135
|
+
</span>
|
136
|
+
|
137
|
+
|
138
|
+
|
139
|
+
|
140
|
+
|
141
|
+
|
142
|
+
|
143
|
+
|
144
|
+
|
145
|
+
<span class="summary_desc"><div class='inline'>
|
146
|
+
<p>Parser at argument list end?.</p>
|
147
|
+
</div></span>
|
148
|
+
|
149
|
+
</li>
|
150
|
+
|
151
|
+
|
152
|
+
<li class="public ">
|
153
|
+
<span class="summary_signature">
|
154
|
+
|
155
|
+
<a href="#get-instance_method" title="#get (instance method)">- (Object) <strong>get</strong>(idx = @idx) </a>
|
156
|
+
|
157
|
+
|
158
|
+
|
159
|
+
</span>
|
160
|
+
|
161
|
+
|
162
|
+
|
163
|
+
|
164
|
+
|
165
|
+
|
166
|
+
|
167
|
+
|
168
|
+
|
169
|
+
<span class="summary_desc"><div class='inline'>
|
170
|
+
<p>Get current argument.</p>
|
171
|
+
</div></span>
|
172
|
+
|
173
|
+
</li>
|
174
|
+
|
175
|
+
|
176
|
+
<li class="public ">
|
177
|
+
<span class="summary_signature">
|
178
|
+
|
179
|
+
<a href="#initialize-instance_method" title="#initialize (instance method)">- (ArgsParseState) <strong>initialize</strong>(list) </a>
|
180
|
+
|
181
|
+
|
182
|
+
|
183
|
+
</span>
|
184
|
+
|
185
|
+
|
186
|
+
<span class="note title constructor">constructor</span>
|
187
|
+
|
188
|
+
|
189
|
+
|
190
|
+
|
191
|
+
|
192
|
+
|
193
|
+
|
194
|
+
|
195
|
+
<span class="summary_desc"><div class='inline'>
|
196
|
+
<p>A new instance of ArgsParseState.</p>
|
197
|
+
</div></span>
|
198
|
+
|
199
|
+
</li>
|
200
|
+
|
201
|
+
|
202
|
+
<li class="public ">
|
203
|
+
<span class="summary_signature">
|
204
|
+
|
205
|
+
<a href="#isOpt-instance_method" title="#isOpt (instance method)">- (Object) <strong>isOpt</strong>(str = get) </a>
|
206
|
+
|
207
|
+
|
208
|
+
|
209
|
+
</span>
|
210
|
+
|
211
|
+
|
212
|
+
|
213
|
+
|
214
|
+
|
215
|
+
|
216
|
+
|
217
|
+
|
218
|
+
|
219
|
+
<span class="summary_desc"><div class='inline'>
|
220
|
+
<p>Test whether str is an option.</p>
|
221
|
+
</div></span>
|
222
|
+
|
223
|
+
</li>
|
224
|
+
|
225
|
+
|
226
|
+
<li class="public ">
|
227
|
+
<span class="summary_signature">
|
228
|
+
|
229
|
+
<a href="#isOptTerm-instance_method" title="#isOptTerm (instance method)">- (Object) <strong>isOptTerm</strong>(str = get) </a>
|
230
|
+
|
231
|
+
|
232
|
+
|
233
|
+
</span>
|
234
|
+
|
235
|
+
|
236
|
+
|
237
|
+
|
238
|
+
|
239
|
+
|
240
|
+
|
241
|
+
|
242
|
+
|
243
|
+
<span class="summary_desc"><div class='inline'>
|
244
|
+
<p>Test whether str is an option list terminator.</p>
|
245
|
+
</div></span>
|
246
|
+
|
247
|
+
</li>
|
248
|
+
|
249
|
+
|
250
|
+
<li class="public ">
|
251
|
+
<span class="summary_signature">
|
252
|
+
|
253
|
+
<a href="#last-instance_method" title="#last (instance method)">- (Object) <strong>last</strong>(idx = @idx) </a>
|
254
|
+
|
255
|
+
|
256
|
+
|
257
|
+
</span>
|
258
|
+
|
259
|
+
|
260
|
+
|
261
|
+
|
262
|
+
|
263
|
+
|
264
|
+
|
265
|
+
|
266
|
+
|
267
|
+
<span class="summary_desc"><div class='inline'>
|
268
|
+
<p>Get last argument.</p>
|
269
|
+
</div></span>
|
270
|
+
|
271
|
+
</li>
|
272
|
+
|
273
|
+
|
274
|
+
<li class="public ">
|
275
|
+
<span class="summary_signature">
|
276
|
+
|
277
|
+
<a href="#next-instance_method" title="#next (instance method)">- (Object) <strong>next</strong> </a>
|
278
|
+
|
279
|
+
|
280
|
+
|
281
|
+
</span>
|
282
|
+
|
283
|
+
|
284
|
+
|
285
|
+
|
286
|
+
|
287
|
+
|
288
|
+
|
289
|
+
|
290
|
+
|
291
|
+
<span class="summary_desc"><div class='inline'>
|
292
|
+
<p>Step to next argument.</p>
|
293
|
+
</div></span>
|
294
|
+
|
295
|
+
</li>
|
296
|
+
|
297
|
+
|
298
|
+
<li class="public ">
|
299
|
+
<span class="summary_signature">
|
300
|
+
|
301
|
+
<a href="#prev-instance_method" title="#prev (instance method)">- (Object) <strong>prev</strong> </a>
|
302
|
+
|
303
|
+
|
304
|
+
|
305
|
+
</span>
|
306
|
+
|
307
|
+
|
308
|
+
|
309
|
+
|
310
|
+
|
311
|
+
|
312
|
+
|
313
|
+
|
314
|
+
|
315
|
+
<span class="summary_desc"><div class='inline'>
|
316
|
+
<p>Step to previous argument.</p>
|
317
|
+
</div></span>
|
318
|
+
|
319
|
+
</li>
|
320
|
+
|
321
|
+
|
322
|
+
<li class="public ">
|
323
|
+
<span class="summary_signature">
|
324
|
+
|
325
|
+
<a href="#rest-instance_method" title="#rest (instance method)">- (Object) <strong>rest</strong>(idx = @idx) </a>
|
326
|
+
|
327
|
+
|
328
|
+
|
329
|
+
</span>
|
330
|
+
|
331
|
+
|
332
|
+
|
333
|
+
|
334
|
+
|
335
|
+
|
336
|
+
|
337
|
+
|
338
|
+
|
339
|
+
<span class="summary_desc"><div class='inline'>
|
340
|
+
<p>Get rest of the arguments.</p>
|
341
|
+
</div></span>
|
342
|
+
|
343
|
+
</li>
|
344
|
+
|
345
|
+
|
346
|
+
<li class="public ">
|
347
|
+
<span class="summary_signature">
|
348
|
+
|
349
|
+
<a href="#set-instance_method" title="#set (instance method)">- (Object) <strong>set</strong>(list) </a>
|
350
|
+
|
351
|
+
|
352
|
+
|
353
|
+
</span>
|
354
|
+
|
355
|
+
|
356
|
+
|
357
|
+
|
358
|
+
|
359
|
+
|
360
|
+
|
361
|
+
|
362
|
+
|
363
|
+
<span class="summary_desc"><div class='inline'>
|
364
|
+
<p>Set list of arguments.</p>
|
365
|
+
</div></span>
|
366
|
+
|
367
|
+
</li>
|
368
|
+
|
369
|
+
|
370
|
+
<li class="public ">
|
371
|
+
<span class="summary_signature">
|
372
|
+
|
373
|
+
<a href="#toValue-instance_method" title="#toValue (instance method)">- (Object) <strong>toValue</strong>(str = get) </a>
|
374
|
+
|
375
|
+
|
376
|
+
|
377
|
+
</span>
|
378
|
+
|
379
|
+
|
380
|
+
|
381
|
+
|
382
|
+
|
383
|
+
|
384
|
+
|
385
|
+
|
386
|
+
|
387
|
+
<span class="summary_desc"><div class='inline'>
|
388
|
+
<p>Format value string if escaped.</p>
|
389
|
+
</div></span>
|
390
|
+
|
391
|
+
</li>
|
392
|
+
|
393
|
+
|
394
|
+
</ul>
|
395
|
+
|
396
|
+
|
397
|
+
<div id="constructor_details" class="method_details_list">
|
398
|
+
<h2>Constructor Details</h2>
|
399
|
+
|
400
|
+
<div class="method_details first">
|
401
|
+
<h3 class="signature first" id="initialize-instance_method">
|
402
|
+
|
403
|
+
- (<tt><span class='object_link'><a href="" title="Como::ArgsParseState (class)">ArgsParseState</a></span></tt>) <strong>initialize</strong>(list)
|
404
|
+
|
405
|
+
|
406
|
+
|
407
|
+
|
408
|
+
|
409
|
+
</h3><div class="docstring">
|
410
|
+
<div class="discussion">
|
411
|
+
|
412
|
+
<p>A new instance of ArgsParseState</p>
|
413
|
+
|
414
|
+
|
415
|
+
</div>
|
416
|
+
</div>
|
417
|
+
<div class="tags">
|
418
|
+
<p class="tag_title">Parameters:</p>
|
419
|
+
<ul class="param">
|
420
|
+
|
421
|
+
<li>
|
422
|
+
|
423
|
+
<span class='name'>list</span>
|
424
|
+
|
425
|
+
|
426
|
+
<span class='type'>(<tt>Array<String></tt>)</span>
|
427
|
+
|
428
|
+
|
429
|
+
|
430
|
+
—
|
431
|
+
<div class='inline'>
|
432
|
+
<p>List of Command Line Arguments (default: ARGV).</p>
|
433
|
+
</div>
|
434
|
+
|
435
|
+
</li>
|
436
|
+
|
437
|
+
</ul>
|
438
|
+
|
439
|
+
|
440
|
+
</div><table class="source_code">
|
441
|
+
<tr>
|
442
|
+
<td>
|
443
|
+
<pre class="lines">
|
444
|
+
|
445
|
+
|
446
|
+
1779
|
447
|
+
1780
|
448
|
+
1781
|
449
|
+
1782</pre>
|
450
|
+
</td>
|
451
|
+
<td>
|
452
|
+
<pre class="code"><span class="info file"># File 'lib/como.rb', line 1779</span>
|
453
|
+
|
454
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span><span class='lparen'>(</span> <span class='id identifier rubyid_list'>list</span> <span class='rparen'>)</span>
|
455
|
+
<span class='id identifier rubyid_set'>set</span><span class='lparen'>(</span> <span class='id identifier rubyid_list'>list</span> <span class='rparen'>)</span>
|
456
|
+
<span class='ivar'>@idx</span> <span class='op'>=</span> <span class='int'>0</span>
|
457
|
+
<span class='kw'>end</span></pre>
|
458
|
+
</td>
|
459
|
+
</tr>
|
460
|
+
</table>
|
461
|
+
</div>
|
462
|
+
|
463
|
+
</div>
|
464
|
+
|
465
|
+
|
466
|
+
<div id="instance_method_details" class="method_details_list">
|
467
|
+
<h2>Instance Method Details</h2>
|
468
|
+
|
469
|
+
|
470
|
+
<div class="method_details first">
|
471
|
+
<h3 class="signature first" id="done?-instance_method">
|
472
|
+
|
473
|
+
- (<tt>Boolean</tt>) <strong>done?</strong>
|
474
|
+
|
475
|
+
|
476
|
+
|
477
|
+
|
478
|
+
|
479
|
+
</h3><div class="docstring">
|
480
|
+
<div class="discussion">
|
481
|
+
|
482
|
+
<p>Parser at argument list end?</p>
|
483
|
+
|
484
|
+
|
485
|
+
</div>
|
486
|
+
</div>
|
487
|
+
<div class="tags">
|
488
|
+
|
489
|
+
<p class="tag_title">Returns:</p>
|
490
|
+
<ul class="return">
|
491
|
+
|
492
|
+
<li>
|
493
|
+
|
494
|
+
|
495
|
+
<span class='type'>(<tt>Boolean</tt>)</span>
|
496
|
+
|
497
|
+
|
498
|
+
|
499
|
+
</li>
|
500
|
+
|
501
|
+
</ul>
|
502
|
+
|
503
|
+
</div><table class="source_code">
|
504
|
+
<tr>
|
505
|
+
<td>
|
506
|
+
<pre class="lines">
|
507
|
+
|
508
|
+
|
509
|
+
1815
|
510
|
+
1816
|
511
|
+
1817</pre>
|
512
|
+
</td>
|
513
|
+
<td>
|
514
|
+
<pre class="code"><span class="info file"># File 'lib/como.rb', line 1815</span>
|
515
|
+
|
516
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_done?'>done?</span>
|
517
|
+
<span class='ivar'>@idx</span> <span class='op'>>=</span> <span class='ivar'>@list</span><span class='period'>.</span><span class='id identifier rubyid_length'>length</span>
|
518
|
+
<span class='kw'>end</span></pre>
|
519
|
+
</td>
|
520
|
+
</tr>
|
521
|
+
</table>
|
522
|
+
</div>
|
523
|
+
|
524
|
+
<div class="method_details ">
|
525
|
+
<h3 class="signature " id="get-instance_method">
|
526
|
+
|
527
|
+
- (<tt>Object</tt>) <strong>get</strong>(idx = @idx)
|
528
|
+
|
529
|
+
|
530
|
+
|
531
|
+
|
532
|
+
|
533
|
+
</h3><div class="docstring">
|
534
|
+
<div class="discussion">
|
535
|
+
|
536
|
+
<p>Get current argument.</p>
|
537
|
+
|
538
|
+
|
539
|
+
</div>
|
540
|
+
</div>
|
541
|
+
<div class="tags">
|
542
|
+
|
543
|
+
|
544
|
+
</div><table class="source_code">
|
545
|
+
<tr>
|
546
|
+
<td>
|
547
|
+
<pre class="lines">
|
548
|
+
|
549
|
+
|
550
|
+
1800
|
551
|
+
1801
|
552
|
+
1802</pre>
|
553
|
+
</td>
|
554
|
+
<td>
|
555
|
+
<pre class="code"><span class="info file"># File 'lib/como.rb', line 1800</span>
|
556
|
+
|
557
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_get'>get</span><span class='lparen'>(</span> <span class='id identifier rubyid_idx'>idx</span> <span class='op'>=</span> <span class='ivar'>@idx</span> <span class='rparen'>)</span>
|
558
|
+
<span class='ivar'>@args</span><span class='lbracket'>[</span> <span class='id identifier rubyid_idx'>idx</span> <span class='rbracket'>]</span>
|
559
|
+
<span class='kw'>end</span></pre>
|
560
|
+
</td>
|
561
|
+
</tr>
|
562
|
+
</table>
|
563
|
+
</div>
|
564
|
+
|
565
|
+
<div class="method_details ">
|
566
|
+
<h3 class="signature " id="isOpt-instance_method">
|
567
|
+
|
568
|
+
- (<tt>Object</tt>) <strong>isOpt</strong>(str = get)
|
569
|
+
|
570
|
+
|
571
|
+
|
572
|
+
|
573
|
+
|
574
|
+
</h3><div class="docstring">
|
575
|
+
<div class="discussion">
|
576
|
+
|
577
|
+
<p>Test whether str is an option.</p>
|
578
|
+
|
579
|
+
|
580
|
+
</div>
|
581
|
+
</div>
|
582
|
+
<div class="tags">
|
583
|
+
|
584
|
+
|
585
|
+
</div><table class="source_code">
|
586
|
+
<tr>
|
587
|
+
<td>
|
588
|
+
<pre class="lines">
|
589
|
+
|
590
|
+
|
591
|
+
1821
|
592
|
+
1822
|
593
|
+
1823</pre>
|
594
|
+
</td>
|
595
|
+
<td>
|
596
|
+
<pre class="code"><span class="info file"># File 'lib/como.rb', line 1821</span>
|
597
|
+
|
598
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_isOpt'>isOpt</span><span class='lparen'>(</span> <span class='id identifier rubyid_str'>str</span> <span class='op'>=</span> <span class='id identifier rubyid_get'>get</span> <span class='rparen'>)</span>
|
599
|
+
<span class='id identifier rubyid_str'>str</span><span class='lbracket'>[</span><span class='int'>0</span><span class='op'>..</span><span class='int'>0</span><span class='rbracket'>]</span> <span class='op'>==</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>-</span><span class='tstring_end'>"</span></span>
|
600
|
+
<span class='kw'>end</span></pre>
|
601
|
+
</td>
|
602
|
+
</tr>
|
603
|
+
</table>
|
604
|
+
</div>
|
605
|
+
|
606
|
+
<div class="method_details ">
|
607
|
+
<h3 class="signature " id="isOptTerm-instance_method">
|
608
|
+
|
609
|
+
- (<tt>Object</tt>) <strong>isOptTerm</strong>(str = get)
|
610
|
+
|
611
|
+
|
612
|
+
|
613
|
+
|
614
|
+
|
615
|
+
</h3><div class="docstring">
|
616
|
+
<div class="discussion">
|
617
|
+
|
618
|
+
<p>Test whether str is an option list terminator.</p>
|
619
|
+
|
620
|
+
|
621
|
+
</div>
|
622
|
+
</div>
|
623
|
+
<div class="tags">
|
624
|
+
|
625
|
+
|
626
|
+
</div><table class="source_code">
|
627
|
+
<tr>
|
628
|
+
<td>
|
629
|
+
<pre class="lines">
|
630
|
+
|
631
|
+
|
632
|
+
1826
|
633
|
+
1827
|
634
|
+
1828</pre>
|
635
|
+
</td>
|
636
|
+
<td>
|
637
|
+
<pre class="code"><span class="info file"># File 'lib/como.rb', line 1826</span>
|
638
|
+
|
639
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_isOptTerm'>isOptTerm</span><span class='lparen'>(</span> <span class='id identifier rubyid_str'>str</span> <span class='op'>=</span> <span class='id identifier rubyid_get'>get</span> <span class='rparen'>)</span>
|
640
|
+
<span class='id identifier rubyid_str'>str</span> <span class='op'>==</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>--</span><span class='tstring_end'>"</span></span>
|
641
|
+
<span class='kw'>end</span></pre>
|
642
|
+
</td>
|
643
|
+
</tr>
|
644
|
+
</table>
|
645
|
+
</div>
|
646
|
+
|
647
|
+
<div class="method_details ">
|
648
|
+
<h3 class="signature " id="last-instance_method">
|
649
|
+
|
650
|
+
- (<tt>Object</tt>) <strong>last</strong>(idx = @idx)
|
651
|
+
|
652
|
+
|
653
|
+
|
654
|
+
|
655
|
+
|
656
|
+
</h3><div class="docstring">
|
657
|
+
<div class="discussion">
|
658
|
+
|
659
|
+
<p>Get last argument.</p>
|
660
|
+
|
661
|
+
|
662
|
+
</div>
|
663
|
+
</div>
|
664
|
+
<div class="tags">
|
665
|
+
|
666
|
+
|
667
|
+
</div><table class="source_code">
|
668
|
+
<tr>
|
669
|
+
<td>
|
670
|
+
<pre class="lines">
|
671
|
+
|
672
|
+
|
673
|
+
1805
|
674
|
+
1806
|
675
|
+
1807</pre>
|
676
|
+
</td>
|
677
|
+
<td>
|
678
|
+
<pre class="code"><span class="info file"># File 'lib/como.rb', line 1805</span>
|
679
|
+
|
680
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_last'>last</span><span class='lparen'>(</span> <span class='id identifier rubyid_idx'>idx</span> <span class='op'>=</span> <span class='ivar'>@idx</span> <span class='rparen'>)</span>
|
681
|
+
<span class='id identifier rubyid_idx'>idx</span> <span class='op'>==</span> <span class='lparen'>(</span> <span class='ivar'>@args</span><span class='period'>.</span><span class='id identifier rubyid_length'>length</span><span class='op'>-</span><span class='int'>1</span> <span class='rparen'>)</span>
|
682
|
+
<span class='kw'>end</span></pre>
|
683
|
+
</td>
|
684
|
+
</tr>
|
685
|
+
</table>
|
686
|
+
</div>
|
687
|
+
|
688
|
+
<div class="method_details ">
|
689
|
+
<h3 class="signature " id="next-instance_method">
|
690
|
+
|
691
|
+
- (<tt>Object</tt>) <strong>next</strong>
|
692
|
+
|
693
|
+
|
694
|
+
|
695
|
+
|
696
|
+
|
697
|
+
</h3><div class="docstring">
|
698
|
+
<div class="discussion">
|
699
|
+
|
700
|
+
<p>Step to next argument.</p>
|
701
|
+
|
702
|
+
|
703
|
+
</div>
|
704
|
+
</div>
|
705
|
+
<div class="tags">
|
706
|
+
|
707
|
+
|
708
|
+
</div><table class="source_code">
|
709
|
+
<tr>
|
710
|
+
<td>
|
711
|
+
<pre class="lines">
|
712
|
+
|
713
|
+
|
714
|
+
1790
|
715
|
+
1791
|
716
|
+
1792</pre>
|
717
|
+
</td>
|
718
|
+
<td>
|
719
|
+
<pre class="code"><span class="info file"># File 'lib/como.rb', line 1790</span>
|
720
|
+
|
721
|
+
<span class='kw'>def</span> <span class='kw'>next</span>
|
722
|
+
<span class='ivar'>@idx</span> <span class='op'>+=</span> <span class='int'>1</span>
|
723
|
+
<span class='kw'>end</span></pre>
|
724
|
+
</td>
|
725
|
+
</tr>
|
726
|
+
</table>
|
727
|
+
</div>
|
728
|
+
|
729
|
+
<div class="method_details ">
|
730
|
+
<h3 class="signature " id="prev-instance_method">
|
731
|
+
|
732
|
+
- (<tt>Object</tt>) <strong>prev</strong>
|
733
|
+
|
734
|
+
|
735
|
+
|
736
|
+
|
737
|
+
|
738
|
+
</h3><div class="docstring">
|
739
|
+
<div class="discussion">
|
740
|
+
|
741
|
+
<p>Step to previous argument.</p>
|
742
|
+
|
743
|
+
|
744
|
+
</div>
|
745
|
+
</div>
|
746
|
+
<div class="tags">
|
747
|
+
|
748
|
+
|
749
|
+
</div><table class="source_code">
|
750
|
+
<tr>
|
751
|
+
<td>
|
752
|
+
<pre class="lines">
|
753
|
+
|
754
|
+
|
755
|
+
1795
|
756
|
+
1796
|
757
|
+
1797</pre>
|
758
|
+
</td>
|
759
|
+
<td>
|
760
|
+
<pre class="code"><span class="info file"># File 'lib/como.rb', line 1795</span>
|
761
|
+
|
762
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_prev'>prev</span>
|
763
|
+
<span class='ivar'>@idx</span> <span class='op'>-=</span> <span class='int'>1</span>
|
764
|
+
<span class='kw'>end</span></pre>
|
765
|
+
</td>
|
766
|
+
</tr>
|
767
|
+
</table>
|
768
|
+
</div>
|
769
|
+
|
770
|
+
<div class="method_details ">
|
771
|
+
<h3 class="signature " id="rest-instance_method">
|
772
|
+
|
773
|
+
- (<tt>Object</tt>) <strong>rest</strong>(idx = @idx)
|
774
|
+
|
775
|
+
|
776
|
+
|
777
|
+
|
778
|
+
|
779
|
+
</h3><div class="docstring">
|
780
|
+
<div class="discussion">
|
781
|
+
|
782
|
+
<p>Get rest of the arguments.</p>
|
783
|
+
|
784
|
+
|
785
|
+
</div>
|
786
|
+
</div>
|
787
|
+
<div class="tags">
|
788
|
+
|
789
|
+
|
790
|
+
</div><table class="source_code">
|
791
|
+
<tr>
|
792
|
+
<td>
|
793
|
+
<pre class="lines">
|
794
|
+
|
795
|
+
|
796
|
+
1810
|
797
|
+
1811
|
798
|
+
1812</pre>
|
799
|
+
</td>
|
800
|
+
<td>
|
801
|
+
<pre class="code"><span class="info file"># File 'lib/como.rb', line 1810</span>
|
802
|
+
|
803
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_rest'>rest</span><span class='lparen'>(</span> <span class='id identifier rubyid_idx'>idx</span> <span class='op'>=</span> <span class='ivar'>@idx</span> <span class='rparen'>)</span>
|
804
|
+
<span class='ivar'>@args</span><span class='lbracket'>[</span> <span class='id identifier rubyid_idx'>idx</span><span class='op'>..</span><span class='op'>-</span><span class='int'>1</span> <span class='rbracket'>]</span>
|
805
|
+
<span class='kw'>end</span></pre>
|
806
|
+
</td>
|
807
|
+
</tr>
|
808
|
+
</table>
|
809
|
+
</div>
|
810
|
+
|
811
|
+
<div class="method_details ">
|
812
|
+
<h3 class="signature " id="set-instance_method">
|
813
|
+
|
814
|
+
- (<tt>Object</tt>) <strong>set</strong>(list)
|
815
|
+
|
816
|
+
|
817
|
+
|
818
|
+
|
819
|
+
|
820
|
+
</h3><div class="docstring">
|
821
|
+
<div class="discussion">
|
822
|
+
|
823
|
+
<p>Set list of arguments.</p>
|
824
|
+
|
825
|
+
|
826
|
+
</div>
|
827
|
+
</div>
|
828
|
+
<div class="tags">
|
829
|
+
|
830
|
+
|
831
|
+
</div><table class="source_code">
|
832
|
+
<tr>
|
833
|
+
<td>
|
834
|
+
<pre class="lines">
|
835
|
+
|
836
|
+
|
837
|
+
1785
|
838
|
+
1786
|
839
|
+
1787</pre>
|
840
|
+
</td>
|
841
|
+
<td>
|
842
|
+
<pre class="code"><span class="info file"># File 'lib/como.rb', line 1785</span>
|
843
|
+
|
844
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_set'>set</span><span class='lparen'>(</span> <span class='id identifier rubyid_list'>list</span> <span class='rparen'>)</span>
|
845
|
+
<span class='ivar'>@args</span> <span class='op'>=</span> <span class='id identifier rubyid_list'>list</span>
|
846
|
+
<span class='kw'>end</span></pre>
|
847
|
+
</td>
|
848
|
+
</tr>
|
849
|
+
</table>
|
850
|
+
</div>
|
851
|
+
|
852
|
+
<div class="method_details ">
|
853
|
+
<h3 class="signature " id="toValue-instance_method">
|
854
|
+
|
855
|
+
- (<tt>Object</tt>) <strong>toValue</strong>(str = get)
|
856
|
+
|
857
|
+
|
858
|
+
|
859
|
+
|
860
|
+
|
861
|
+
</h3><div class="docstring">
|
862
|
+
<div class="discussion">
|
863
|
+
|
864
|
+
<p>Format value string if escaped.</p>
|
865
|
+
|
866
|
+
|
867
|
+
</div>
|
868
|
+
</div>
|
869
|
+
<div class="tags">
|
870
|
+
|
871
|
+
|
872
|
+
</div><table class="source_code">
|
873
|
+
<tr>
|
874
|
+
<td>
|
875
|
+
<pre class="lines">
|
876
|
+
|
877
|
+
|
878
|
+
1831
|
879
|
+
1832
|
880
|
+
1833
|
881
|
+
1834
|
882
|
+
1835
|
883
|
+
1836
|
884
|
+
1837</pre>
|
885
|
+
</td>
|
886
|
+
<td>
|
887
|
+
<pre class="code"><span class="info file"># File 'lib/como.rb', line 1831</span>
|
888
|
+
|
889
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_toValue'>toValue</span><span class='lparen'>(</span> <span class='id identifier rubyid_str'>str</span> <span class='op'>=</span> <span class='id identifier rubyid_get'>get</span> <span class='rparen'>)</span>
|
890
|
+
<span class='kw'>if</span> <span class='id identifier rubyid_str'>str</span><span class='lbracket'>[</span><span class='int'>0</span><span class='op'>..</span><span class='int'>0</span><span class='rbracket'>]</span> <span class='op'>==</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>\\</span><span class='tstring_end'>"</span></span>
|
891
|
+
<span class='id identifier rubyid_str'>str</span><span class='lbracket'>[</span><span class='int'>1</span><span class='op'>..</span><span class='op'>-</span><span class='int'>1</span><span class='rbracket'>]</span>
|
892
|
+
<span class='kw'>else</span>
|
893
|
+
<span class='id identifier rubyid_str'>str</span>
|
894
|
+
<span class='kw'>end</span>
|
895
|
+
<span class='kw'>end</span></pre>
|
896
|
+
</td>
|
897
|
+
</tr>
|
898
|
+
</table>
|
899
|
+
</div>
|
900
|
+
|
901
|
+
</div>
|
902
|
+
|
903
|
+
</div>
|
904
|
+
|
905
|
+
<div id="footer">
|
906
|
+
Generated on Mon Dec 30 13:50:52 2013 by
|
907
|
+
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
908
|
+
0.8.6.1 (ruby-1.9.3).
|
909
|
+
</div>
|
910
|
+
|
911
|
+
</body>
|
912
|
+
</html>
|