bovem 2.4.1 → 3.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (70) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +2 -1
  3. data/Gemfile +1 -1
  4. data/README.md +98 -2
  5. data/bovem.gemspec +3 -3
  6. data/doc/Bovem.html +25 -6
  7. data/doc/Bovem/Application.html +3057 -0
  8. data/doc/Bovem/Command.html +7031 -0
  9. data/doc/Bovem/CommandMethods.html +125 -0
  10. data/doc/Bovem/CommandMethods/Children.html +1285 -0
  11. data/doc/Bovem/CommandMethods/Help.html +209 -0
  12. data/doc/Bovem/Configuration.html +3 -3
  13. data/doc/Bovem/Console.html +8 -8
  14. data/doc/Bovem/ConsoleMethods.html +3 -3
  15. data/doc/Bovem/ConsoleMethods/Interactions.html +3 -3
  16. data/doc/Bovem/ConsoleMethods/Interactions/ClassMethods.html +3 -3
  17. data/doc/Bovem/ConsoleMethods/Logging.html +4 -4
  18. data/doc/Bovem/ConsoleMethods/Logging/ClassMethods.html +3 -3
  19. data/doc/Bovem/ConsoleMethods/Output.html +3 -3
  20. data/doc/Bovem/ConsoleMethods/StyleHandling.html +4 -4
  21. data/doc/Bovem/ConsoleMethods/StyleHandling/ClassMethods.html +8 -8
  22. data/doc/Bovem/Errors.html +4 -4
  23. data/doc/Bovem/Errors/Error.html +631 -0
  24. data/doc/Bovem/Errors/InvalidConfiguration.html +3 -3
  25. data/doc/Bovem/Errors/InvalidLogger.html +3 -3
  26. data/doc/Bovem/Localizer.html +376 -0
  27. data/doc/Bovem/Logger.html +64 -160
  28. data/doc/Bovem/Option.html +7009 -0
  29. data/doc/Bovem/Parser.html +276 -0
  30. data/doc/Bovem/ParserMethods.html +125 -0
  31. data/doc/Bovem/ParserMethods/General.html +134 -0
  32. data/doc/Bovem/ParserMethods/General/ClassMethods.html +574 -0
  33. data/doc/Bovem/Shell.html +8 -8
  34. data/doc/Bovem/ShellMethods.html +3 -3
  35. data/doc/Bovem/ShellMethods/Directories.html +3 -3
  36. data/doc/Bovem/ShellMethods/Execute.html +3 -3
  37. data/doc/Bovem/ShellMethods/General.html +3 -3
  38. data/doc/Bovem/ShellMethods/Read.html +3 -3
  39. data/doc/Bovem/ShellMethods/Write.html +3 -3
  40. data/doc/Bovem/Version.html +6 -6
  41. data/doc/_index.html +119 -11
  42. data/doc/class_list.html +1 -1
  43. data/doc/file.README.html +98 -5
  44. data/doc/frames.html +1 -1
  45. data/doc/index.html +98 -5
  46. data/doc/method_list.html +476 -26
  47. data/doc/top-level-namespace.html +3 -3
  48. data/lib/bovem.rb +8 -1
  49. data/lib/bovem/application.rb +158 -0
  50. data/lib/bovem/command.rb +529 -0
  51. data/lib/bovem/console.rb +8 -8
  52. data/lib/bovem/errors.rb +27 -0
  53. data/lib/bovem/localizer.rb +27 -0
  54. data/lib/bovem/logger.rb +2 -8
  55. data/lib/bovem/option.rb +250 -0
  56. data/lib/bovem/parser.rb +317 -0
  57. data/lib/bovem/shell.rb +2 -2
  58. data/lib/bovem/version.rb +3 -3
  59. data/locales/en.yml +33 -0
  60. data/locales/it.yml +33 -0
  61. data/spec/bovem/application_spec.rb +170 -0
  62. data/spec/bovem/command_spec.rb +526 -0
  63. data/spec/bovem/configuration_spec.rb +4 -4
  64. data/spec/bovem/console_spec.rb +22 -22
  65. data/spec/bovem/errors_spec.rb +18 -0
  66. data/spec/bovem/logger_spec.rb +22 -12
  67. data/spec/bovem/option_spec.rb +307 -0
  68. data/spec/bovem/parser_spec.rb +126 -0
  69. data/spec/bovem/shell_spec.rb +4 -4
  70. metadata +32 -5
@@ -0,0 +1,125 @@
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
+ Module: Bovem::CommandMethods
8
+
9
+ &mdash; Documentation by YARD 0.8.7
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 (C)</a> &raquo;
35
+ <span class='title'><span class='object_link'><a href="../Bovem.html" title="Bovem (module)">Bovem</a></span></span>
36
+ &raquo;
37
+ <span class="title">CommandMethods</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>Module: Bovem::CommandMethods
67
+
68
+
69
+
70
+ </h1>
71
+
72
+ <dl class="box">
73
+
74
+
75
+
76
+
77
+
78
+
79
+
80
+
81
+ <dt class="r1 last">Defined in:</dt>
82
+ <dd class="r1 last">lib/bovem/command.rb</dd>
83
+
84
+ </dl>
85
+ <div class="clear"></div>
86
+
87
+ <h2>Overview</h2><div class="docstring">
88
+ <div class="discussion">
89
+ <p>Methods for the <span class='object_link'><a href="Command.html" title="Bovem::Command (class)">Command</a></span> class.</p>
90
+
91
+
92
+ </div>
93
+ </div>
94
+ <div class="tags">
95
+
96
+
97
+ </div><h2>Defined Under Namespace</h2>
98
+ <p class="children">
99
+
100
+
101
+ <strong class="modules">Modules:</strong> <span class='object_link'><a href="CommandMethods/Children.html" title="Bovem::CommandMethods::Children (module)">Children</a></span>, <span class='object_link'><a href="CommandMethods/Help.html" title="Bovem::CommandMethods::Help (module)">Help</a></span>
102
+
103
+
104
+
105
+
106
+ </p>
107
+
108
+
109
+
110
+
111
+
112
+
113
+
114
+
115
+
116
+ </div>
117
+
118
+ <div id="footer">
119
+ Generated on Sat Aug 3 13:50:14 2013 by
120
+ <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
121
+ 0.8.7 (ruby-2.0.0).
122
+ </div>
123
+
124
+ </body>
125
+ </html>
@@ -0,0 +1,1285 @@
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
+ Module: Bovem::CommandMethods::Children
8
+
9
+ &mdash; Documentation by YARD 0.8.7
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 (C)</a> &raquo;
35
+ <span class='title'><span class='object_link'><a href="../../Bovem.html" title="Bovem (module)">Bovem</a></span></span> &raquo; <span class='title'><span class='object_link'><a href="../CommandMethods.html" title="Bovem::CommandMethods (module)">CommandMethods</a></span></span>
36
+ &raquo;
37
+ <span class="title">Children</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>Module: Bovem::CommandMethods::Children
67
+
68
+
69
+
70
+ </h1>
71
+
72
+ <dl class="box">
73
+
74
+
75
+
76
+
77
+
78
+
79
+
80
+ <dt class="r1">Included in:</dt>
81
+ <dd class="r1"><span class='object_link'><a href="../Command.html" title="Bovem::Command (class)">Bovem::Command</a></span></dd>
82
+
83
+
84
+
85
+ <dt class="r2 last">Defined in:</dt>
86
+ <dd class="r2 last">lib/bovem/command.rb</dd>
87
+
88
+ </dl>
89
+ <div class="clear"></div>
90
+
91
+ <h2>Overview</h2><div class="docstring">
92
+ <div class="discussion">
93
+ <p>Methods to manage options and subcommands.</p>
94
+
95
+
96
+ </div>
97
+ </div>
98
+ <div class="tags">
99
+
100
+
101
+ </div>
102
+
103
+
104
+
105
+ <h2>Instance Attribute Summary <small>(<a href="#" class="summary_toggle">collapse</a>)</small></h2>
106
+ <ul class="summary">
107
+
108
+ <li class="public ">
109
+ <span class="summary_signature">
110
+
111
+ <a href="#commands-instance_method" title="#commands (instance method)">- (HashWithIndifferentAccess) <strong>commands</strong> </a>
112
+
113
+
114
+
115
+ </span>
116
+
117
+
118
+
119
+
120
+ <span class="note title readonly">readonly</span>
121
+
122
+
123
+
124
+
125
+
126
+
127
+
128
+
129
+
130
+ <span class="summary_desc"><div class='inline'><p>Returns the list of subcommands of this command.</p>
131
+ </div></span>
132
+
133
+ </li>
134
+
135
+
136
+ <li class="public ">
137
+ <span class="summary_signature">
138
+
139
+ <a href="#options-instance_method" title="#options (instance method)">- (HashWithIndifferentAccess) <strong>options</strong> </a>
140
+
141
+
142
+
143
+ </span>
144
+
145
+
146
+
147
+
148
+ <span class="note title readonly">readonly</span>
149
+
150
+
151
+
152
+
153
+
154
+
155
+
156
+
157
+
158
+ <span class="summary_desc"><div class='inline'><p>Returns the list of options of this command.</p>
159
+ </div></span>
160
+
161
+ </li>
162
+
163
+
164
+ </ul>
165
+
166
+
167
+
168
+
169
+
170
+ <h2>
171
+ Instance Method Summary
172
+ <small>(<a href="#" class="summary_toggle">collapse</a>)</small>
173
+ </h2>
174
+
175
+ <ul class="summary">
176
+
177
+ <li class="public ">
178
+ <span class="summary_signature">
179
+
180
+ <a href="#argument-instance_method" title="#argument (instance method)">- (Object) <strong>argument</strong>(value) </a>
181
+
182
+
183
+
184
+ </span>
185
+
186
+
187
+
188
+
189
+
190
+
191
+
192
+
193
+
194
+ <span class="summary_desc"><div class='inline'><p>Adds a new argument to this command.</p>
195
+ </div></span>
196
+
197
+ </li>
198
+
199
+
200
+ <li class="public ">
201
+ <span class="summary_signature">
202
+
203
+ <a href="#arguments-instance_method" title="#arguments (instance method)">- (Array) <strong>arguments</strong> </a>
204
+
205
+
206
+
207
+ </span>
208
+
209
+
210
+
211
+
212
+
213
+
214
+
215
+
216
+
217
+ <span class="summary_desc"><div class='inline'><p>Returns the list of arguments of this command.</p>
218
+ </div></span>
219
+
220
+ </li>
221
+
222
+
223
+ <li class="public ">
224
+ <span class="summary_signature">
225
+
226
+ <a href="#clear_commands-instance_method" title="#clear_commands (instance method)">- (Hash) <strong>clear_commands</strong> </a>
227
+
228
+
229
+
230
+ </span>
231
+
232
+
233
+
234
+
235
+
236
+
237
+
238
+
239
+
240
+ <span class="summary_desc"><div class='inline'><p>Clear all subcommands of this commands.</p>
241
+ </div></span>
242
+
243
+ </li>
244
+
245
+
246
+ <li class="public ">
247
+ <span class="summary_signature">
248
+
249
+ <a href="#clear_options-instance_method" title="#clear_options (instance method)">- (Hash) <strong>clear_options</strong> </a>
250
+
251
+
252
+
253
+ </span>
254
+
255
+
256
+
257
+
258
+
259
+
260
+
261
+
262
+
263
+ <span class="summary_desc"><div class='inline'><p>Clear all the options of this commands.</p>
264
+ </div></span>
265
+
266
+ </li>
267
+
268
+
269
+ <li class="public ">
270
+ <span class="summary_signature">
271
+
272
+ <a href="#command-instance_method" title="#command (instance method)">- (Command) <strong>command</strong>(name, options = {}, &amp;block) </a>
273
+
274
+
275
+
276
+ </span>
277
+
278
+
279
+
280
+
281
+
282
+
283
+
284
+
285
+
286
+ <span class="summary_desc"><div class='inline'><p>Adds a new subcommand to this command.</p>
287
+ </div></span>
288
+
289
+ </li>
290
+
291
+
292
+ <li class="public ">
293
+ <span class="summary_signature">
294
+
295
+ <a href="#get_options-instance_method" title="#get_options (instance method)">- (HashWithIndifferentAccess) <strong>get_options</strong>(unprovided = false, application = &quot;application_&quot;, prefix = &quot;&quot;, *whitelist) </a>
296
+
297
+
298
+
299
+ </span>
300
+
301
+
302
+
303
+
304
+
305
+
306
+
307
+
308
+
309
+ <span class="summary_desc"><div class='inline'><p>Get the list of the options of this command as an hash, where the keys are the options and the values are either the user inputs or the defaults values.</p>
310
+ </div></span>
311
+
312
+ </li>
313
+
314
+
315
+ <li class="public ">
316
+ <span class="summary_signature">
317
+
318
+ <a href="#has_commands%3F-instance_method" title="#has_commands? (instance method)">- (Boolean) <strong>has_commands?</strong> </a>
319
+
320
+
321
+
322
+ </span>
323
+
324
+
325
+
326
+
327
+
328
+
329
+
330
+
331
+
332
+ <span class="summary_desc"><div class='inline'><p>Check if this command has subcommands.</p>
333
+ </div></span>
334
+
335
+ </li>
336
+
337
+
338
+ <li class="public ">
339
+ <span class="summary_signature">
340
+
341
+ <a href="#has_options%3F-instance_method" title="#has_options? (instance method)">- (Boolean) <strong>has_options?</strong> </a>
342
+
343
+
344
+
345
+ </span>
346
+
347
+
348
+
349
+
350
+
351
+
352
+
353
+
354
+
355
+ <span class="summary_desc"><div class='inline'><p>Check if this command has options.</p>
356
+ </div></span>
357
+
358
+ </li>
359
+
360
+
361
+ <li class="public ">
362
+ <span class="summary_signature">
363
+
364
+ <a href="#option-instance_method" title="#option (instance method)">- (Option) <strong>option</strong>(name, forms = [], options = {}, &amp;action) </a>
365
+
366
+
367
+
368
+ </span>
369
+
370
+
371
+
372
+
373
+
374
+
375
+
376
+
377
+
378
+ <span class="summary_desc"><div class='inline'><p>Adds a new option to this command.</p>
379
+ </div></span>
380
+
381
+ </li>
382
+
383
+
384
+ </ul>
385
+
386
+
387
+
388
+ <div id="instance_attr_details" class="attr_details">
389
+ <h2>Instance Attribute Details</h2>
390
+
391
+
392
+ <span id=""></span>
393
+ <div class="method_details first">
394
+ <h3 class="signature first" id="commands-instance_method">
395
+
396
+ - (<tt>HashWithIndifferentAccess</tt>) <strong>commands</strong> <span class="extras">(readonly)</span>
397
+
398
+
399
+
400
+
401
+
402
+ </h3><div class="docstring">
403
+ <div class="discussion">
404
+ <p>Returns the list of subcommands of this command.</p>
405
+
406
+
407
+ </div>
408
+ </div>
409
+ <div class="tags">
410
+
411
+ <p class="tag_title">Returns:</p>
412
+ <ul class="return">
413
+
414
+ <li>
415
+
416
+
417
+ <span class='type'>(<tt>HashWithIndifferentAccess</tt>)</span>
418
+
419
+
420
+
421
+ &mdash;
422
+ <div class='inline'><p>The list of subcommands of this command.</p>
423
+ </div>
424
+
425
+ </li>
426
+
427
+ </ul>
428
+
429
+ </div><table class="source_code">
430
+ <tr>
431
+ <td>
432
+ <pre class="lines">
433
+
434
+
435
+ 181
436
+ 182
437
+ 183</pre>
438
+ </td>
439
+ <td>
440
+ <pre class="code"><span class="info file"># File 'lib/bovem/command.rb', line 181</span>
441
+
442
+ <span class='kw'>def</span> <span class='id identifier rubyid_commands'>commands</span>
443
+ <span class='ivar'>@commands</span>
444
+ <span class='kw'>end</span></pre>
445
+ </td>
446
+ </tr>
447
+ </table>
448
+ </div>
449
+
450
+
451
+ <span id=""></span>
452
+ <div class="method_details ">
453
+ <h3 class="signature " id="options-instance_method">
454
+
455
+ - (<tt>HashWithIndifferentAccess</tt>) <strong>options</strong> <span class="extras">(readonly)</span>
456
+
457
+
458
+
459
+
460
+
461
+ </h3><div class="docstring">
462
+ <div class="discussion">
463
+ <p>Returns the list of options of this command.</p>
464
+
465
+
466
+ </div>
467
+ </div>
468
+ <div class="tags">
469
+
470
+ <p class="tag_title">Returns:</p>
471
+ <ul class="return">
472
+
473
+ <li>
474
+
475
+
476
+ <span class='type'>(<tt>HashWithIndifferentAccess</tt>)</span>
477
+
478
+
479
+
480
+ &mdash;
481
+ <div class='inline'><p>The list of options of this command.</p>
482
+ </div>
483
+
484
+ </li>
485
+
486
+ </ul>
487
+
488
+ </div><table class="source_code">
489
+ <tr>
490
+ <td>
491
+ <pre class="lines">
492
+
493
+
494
+ 202
495
+ 203
496
+ 204</pre>
497
+ </td>
498
+ <td>
499
+ <pre class="code"><span class="info file"># File 'lib/bovem/command.rb', line 202</span>
500
+
501
+ <span class='kw'>def</span> <span class='id identifier rubyid_options'>options</span>
502
+ <span class='ivar'>@options</span>
503
+ <span class='kw'>end</span></pre>
504
+ </td>
505
+ </tr>
506
+ </table>
507
+ </div>
508
+
509
+ </div>
510
+
511
+
512
+ <div id="instance_method_details" class="method_details_list">
513
+ <h2>Instance Method Details</h2>
514
+
515
+
516
+ <div class="method_details first">
517
+ <h3 class="signature first" id="argument-instance_method">
518
+
519
+ - (<tt>Object</tt>) <strong>argument</strong>(value)
520
+
521
+
522
+
523
+
524
+
525
+ </h3><div class="docstring">
526
+ <div class="discussion">
527
+ <p>Adds a new argument to this command.</p>
528
+
529
+
530
+ </div>
531
+ </div>
532
+ <div class="tags">
533
+ <p class="tag_title">Parameters:</p>
534
+ <ul class="param">
535
+
536
+ <li>
537
+
538
+ <span class='name'>value</span>
539
+
540
+
541
+ <span class='type'>(<tt>String</tt>)</span>
542
+
543
+
544
+
545
+ &mdash;
546
+ <div class='inline'><p>The argument to add.</p>
547
+ </div>
548
+
549
+ </li>
550
+
551
+ </ul>
552
+
553
+
554
+ </div><table class="source_code">
555
+ <tr>
556
+ <td>
557
+ <pre class="lines">
558
+
559
+
560
+ 222
561
+ 223
562
+ 224
563
+ 225</pre>
564
+ </td>
565
+ <td>
566
+ <pre class="code"><span class="info file"># File 'lib/bovem/command.rb', line 222</span>
567
+
568
+ <span class='kw'>def</span> <span class='id identifier rubyid_argument'>argument</span><span class='lparen'>(</span><span class='id identifier rubyid_value'>value</span><span class='rparen'>)</span>
569
+ <span class='ivar'>@args</span> <span class='op'>||=</span> <span class='lbracket'>[</span><span class='rbracket'>]</span>
570
+ <span class='ivar'>@args</span> <span class='op'>&lt;&lt;</span> <span class='id identifier rubyid_value'>value</span>
571
+ <span class='kw'>end</span></pre>
572
+ </td>
573
+ </tr>
574
+ </table>
575
+ </div>
576
+
577
+ <div class="method_details ">
578
+ <h3 class="signature " id="arguments-instance_method">
579
+
580
+ - (<tt>Array</tt>) <strong>arguments</strong>
581
+
582
+
583
+
584
+
585
+
586
+ </h3><div class="docstring">
587
+ <div class="discussion">
588
+ <p>Returns the list of arguments of this command.</p>
589
+
590
+
591
+ </div>
592
+ </div>
593
+ <div class="tags">
594
+
595
+ <p class="tag_title">Returns:</p>
596
+ <ul class="return">
597
+
598
+ <li>
599
+
600
+
601
+ <span class='type'>(<tt>Array</tt>)</span>
602
+
603
+
604
+
605
+ &mdash;
606
+ <div class='inline'><p>The list of arguments of this command.</p>
607
+ </div>
608
+
609
+ </li>
610
+
611
+ </ul>
612
+
613
+ </div><table class="source_code">
614
+ <tr>
615
+ <td>
616
+ <pre class="lines">
617
+
618
+
619
+ 230
620
+ 231
621
+ 232</pre>
622
+ </td>
623
+ <td>
624
+ <pre class="code"><span class="info file"># File 'lib/bovem/command.rb', line 230</span>
625
+
626
+ <span class='kw'>def</span> <span class='id identifier rubyid_arguments'>arguments</span>
627
+ <span class='ivar'>@args</span> <span class='op'>||</span> <span class='lbracket'>[</span><span class='rbracket'>]</span>
628
+ <span class='kw'>end</span></pre>
629
+ </td>
630
+ </tr>
631
+ </table>
632
+ </div>
633
+
634
+ <div class="method_details ">
635
+ <h3 class="signature " id="clear_commands-instance_method">
636
+
637
+ - (<tt>Hash</tt>) <strong>clear_commands</strong>
638
+
639
+
640
+
641
+
642
+
643
+ </h3><div class="docstring">
644
+ <div class="discussion">
645
+ <p>Clear all subcommands of this commands.</p>
646
+
647
+
648
+ </div>
649
+ </div>
650
+ <div class="tags">
651
+
652
+ <p class="tag_title">Returns:</p>
653
+ <ul class="return">
654
+
655
+ <li>
656
+
657
+
658
+ <span class='type'>(<tt>Hash</tt>)</span>
659
+
660
+
661
+
662
+ &mdash;
663
+ <div class='inline'><p>The new (empty) list of subcommands of this command.</p>
664
+ </div>
665
+
666
+ </li>
667
+
668
+ </ul>
669
+
670
+ </div><table class="source_code">
671
+ <tr>
672
+ <td>
673
+ <pre class="lines">
674
+
675
+
676
+ 188
677
+ 189
678
+ 190</pre>
679
+ </td>
680
+ <td>
681
+ <pre class="code"><span class="info file"># File 'lib/bovem/command.rb', line 188</span>
682
+
683
+ <span class='kw'>def</span> <span class='id identifier rubyid_clear_commands'>clear_commands</span>
684
+ <span class='ivar'>@commands</span> <span class='op'>=</span> <span class='lbrace'>{</span><span class='rbrace'>}</span>
685
+ <span class='kw'>end</span></pre>
686
+ </td>
687
+ </tr>
688
+ </table>
689
+ </div>
690
+
691
+ <div class="method_details ">
692
+ <h3 class="signature " id="clear_options-instance_method">
693
+
694
+ - (<tt>Hash</tt>) <strong>clear_options</strong>
695
+
696
+
697
+
698
+
699
+
700
+ </h3><div class="docstring">
701
+ <div class="discussion">
702
+ <p>Clear all the options of this commands.</p>
703
+
704
+
705
+ </div>
706
+ </div>
707
+ <div class="tags">
708
+
709
+ <p class="tag_title">Returns:</p>
710
+ <ul class="return">
711
+
712
+ <li>
713
+
714
+
715
+ <span class='type'>(<tt>Hash</tt>)</span>
716
+
717
+
718
+
719
+ &mdash;
720
+ <div class='inline'><p>The new (empty) list of the options of this command.</p>
721
+ </div>
722
+
723
+ </li>
724
+
725
+ </ul>
726
+
727
+ </div><table class="source_code">
728
+ <tr>
729
+ <td>
730
+ <pre class="lines">
731
+
732
+
733
+ 208
734
+ 209
735
+ 210</pre>
736
+ </td>
737
+ <td>
738
+ <pre class="code"><span class="info file"># File 'lib/bovem/command.rb', line 208</span>
739
+
740
+ <span class='kw'>def</span> <span class='id identifier rubyid_clear_options'>clear_options</span>
741
+ <span class='ivar'>@options</span> <span class='op'>=</span> <span class='lbrace'>{</span><span class='rbrace'>}</span>
742
+ <span class='kw'>end</span></pre>
743
+ </td>
744
+ </tr>
745
+ </table>
746
+ </div>
747
+
748
+ <div class="method_details ">
749
+ <h3 class="signature " id="command-instance_method">
750
+
751
+ - (<tt><span class='object_link'><a href="../Command.html" title="Bovem::Command (class)">Command</a></span></tt>) <strong>command</strong>(name, options = {}, &amp;block)
752
+
753
+
754
+
755
+
756
+
757
+ </h3><div class="docstring">
758
+ <div class="discussion">
759
+ <p>Adds a new subcommand to this command.</p>
760
+
761
+
762
+ </div>
763
+ </div>
764
+ <div class="tags">
765
+ <p class="tag_title">Parameters:</p>
766
+ <ul class="param">
767
+
768
+ <li>
769
+
770
+ <span class='name'>name</span>
771
+
772
+
773
+ <span class='type'>(<tt>String</tt>)</span>
774
+
775
+
776
+
777
+ &mdash;
778
+ <div class='inline'><p>The name of this command. Must be unique.</p>
779
+ </div>
780
+
781
+ </li>
782
+
783
+ <li>
784
+
785
+ <span class='name'>options</span>
786
+
787
+
788
+ <span class='type'>(<tt>Hash</tt>)</span>
789
+
790
+
791
+ <em class="default">(defaults to: <tt>{}</tt>)</em>
792
+
793
+
794
+ &mdash;
795
+ <div class='inline'><p>A set of options for this command.</p>
796
+ </div>
797
+
798
+ </li>
799
+
800
+ </ul>
801
+
802
+ <p class="tag_title">Returns:</p>
803
+ <ul class="return">
804
+
805
+ <li>
806
+
807
+
808
+ <span class='type'>(<tt><span class='object_link'><a href="../Command.html" title="Bovem::Command (class)">Command</a></span></tt>)</span>
809
+
810
+
811
+
812
+ &mdash;
813
+ <div class='inline'><p>The newly added command.</p>
814
+ </div>
815
+
816
+ </li>
817
+
818
+ </ul>
819
+ <p class="tag_title">Raises:</p>
820
+ <ul class="raise">
821
+
822
+ <li>
823
+
824
+
825
+ <span class='type'>(<tt><span class='object_link'><a href="../Errors/Error.html" title="Bovem::Errors::Error (class)">Bovem::Errors::Error</a></span></tt>)</span>
826
+
827
+
828
+
829
+ </li>
830
+
831
+ </ul>
832
+
833
+ </div><table class="source_code">
834
+ <tr>
835
+ <td>
836
+ <pre class="lines">
837
+
838
+
839
+ 142
840
+ 143
841
+ 144
842
+ 145
843
+ 146
844
+ 147
845
+ 148
846
+ 149</pre>
847
+ </td>
848
+ <td>
849
+ <pre class="code"><span class="info file"># File 'lib/bovem/command.rb', line 142</span>
850
+
851
+ <span class='kw'>def</span> <span class='id identifier rubyid_command'>command</span><span class='lparen'>(</span><span class='id identifier rubyid_name'>name</span><span class='comma'>,</span> <span class='id identifier rubyid_options'>options</span> <span class='op'>=</span> <span class='lbrace'>{</span><span class='rbrace'>}</span><span class='comma'>,</span> <span class='op'>&amp;</span><span class='id identifier rubyid_block'>block</span><span class='rparen'>)</span>
852
+ <span class='ivar'>@commands</span> <span class='op'>||=</span> <span class='const'>HashWithIndifferentAccess</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span>
853
+
854
+ <span class='id identifier rubyid_options'>options</span> <span class='op'>=</span> <span class='lbrace'>{</span><span class='label'>name:</span> <span class='id identifier rubyid_name'>name</span><span class='period'>.</span><span class='id identifier rubyid_to_s'>to_s</span><span class='comma'>,</span> <span class='label'>parent:</span> <span class='kw'>self</span><span class='comma'>,</span> <span class='label'>application:</span> <span class='id identifier rubyid_application'>application</span><span class='rbrace'>}</span><span class='period'>.</span><span class='id identifier rubyid_merge'>merge</span><span class='lparen'>(</span><span class='id identifier rubyid_options'>options</span><span class='period'>.</span><span class='id identifier rubyid_ensure_hash'>ensure_hash</span><span class='rparen'>)</span>
855
+ <span class='id identifier rubyid_raise'>raise</span> <span class='const'>Bovem</span><span class='op'>::</span><span class='const'>Errors</span><span class='op'>::</span><span class='const'>Error</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='kw'>self</span><span class='comma'>,</span> <span class='symbol'>:duplicate_command</span><span class='comma'>,</span> <span class='id identifier rubyid_i18n'>i18n</span><span class='period'>.</span><span class='id identifier rubyid_existing_command'>existing_command</span><span class='lparen'>(</span><span class='id identifier rubyid_full_name'>full_name</span><span class='lparen'>(</span><span class='id identifier rubyid_name'>name</span><span class='rparen'>)</span><span class='rparen'>)</span><span class='rparen'>)</span> <span class='kw'>if</span> <span class='ivar'>@commands</span><span class='lbracket'>[</span><span class='id identifier rubyid_name'>name</span><span class='period'>.</span><span class='id identifier rubyid_to_s'>to_s</span><span class='rbracket'>]</span>
856
+
857
+ <span class='id identifier rubyid_create_command'>create_command</span><span class='lparen'>(</span><span class='id identifier rubyid_name'>name</span><span class='comma'>,</span> <span class='id identifier rubyid_options'>options</span><span class='comma'>,</span> <span class='op'>&amp;</span><span class='id identifier rubyid_block'>block</span><span class='rparen'>)</span>
858
+ <span class='kw'>end</span></pre>
859
+ </td>
860
+ </tr>
861
+ </table>
862
+ </div>
863
+
864
+ <div class="method_details ">
865
+ <h3 class="signature " id="get_options-instance_method">
866
+
867
+ - (<tt>HashWithIndifferentAccess</tt>) <strong>get_options</strong>(unprovided = false, application = &quot;application_&quot;, prefix = &quot;&quot;, *whitelist)
868
+
869
+
870
+
871
+
872
+
873
+ </h3><div class="docstring">
874
+ <div class="discussion">
875
+ <p>Get the list of the options of this command as an hash, where the keys are the options and the values are either
876
+ the user inputs or the defaults values.</p>
877
+
878
+ <p>If the two prefixes collides, the command options take precedence over application options.</p>
879
+
880
+
881
+ </div>
882
+ </div>
883
+ <div class="tags">
884
+ <p class="tag_title">Parameters:</p>
885
+ <ul class="param">
886
+
887
+ <li>
888
+
889
+ <span class='name'>unprovided</span>
890
+
891
+
892
+ <span class='type'>(<tt>Boolean</tt>)</span>
893
+
894
+
895
+ <em class="default">(defaults to: <tt>false</tt>)</em>
896
+
897
+
898
+ &mdash;
899
+ <div class='inline'><p>If to include also options that were not provided by the user and that don’t have any default value.</p>
900
+ </div>
901
+
902
+ </li>
903
+
904
+ <li>
905
+
906
+ <span class='name'>application</span>
907
+
908
+
909
+ <span class='type'>(<tt>String</tt>)</span>
910
+
911
+
912
+ <em class="default">(defaults to: <tt>&quot;application_&quot;</tt>)</em>
913
+
914
+
915
+ &mdash;
916
+ <div class='inline'><p>The prefix to use for including application’s options. If falsy, only current command options will be included.</p>
917
+ </div>
918
+
919
+ </li>
920
+
921
+ <li>
922
+
923
+ <span class='name'>prefix</span>
924
+
925
+
926
+ <span class='type'>(<tt>String</tt>)</span>
927
+
928
+
929
+ <em class="default">(defaults to: <tt>&quot;&quot;</tt>)</em>
930
+
931
+
932
+ &mdash;
933
+ <div class='inline'><p>The prefix to add to the option of this command.</p>
934
+ </div>
935
+
936
+ </li>
937
+
938
+ <li>
939
+
940
+ <span class='name'>whitelist</span>
941
+
942
+
943
+ <span class='type'>(<tt>Array</tt>)</span>
944
+
945
+
946
+
947
+ &mdash;
948
+ <div class='inline'><p>The list of options to include. By default all options are included.</p>
949
+ </div>
950
+
951
+ </li>
952
+
953
+ </ul>
954
+
955
+ <p class="tag_title">Returns:</p>
956
+ <ul class="return">
957
+
958
+ <li>
959
+
960
+
961
+ <span class='type'>(<tt>HashWithIndifferentAccess</tt>)</span>
962
+
963
+
964
+
965
+ &mdash;
966
+ <div class='inline'><p>The requested options.</p>
967
+ </div>
968
+
969
+ </li>
970
+
971
+ </ul>
972
+
973
+ </div><table class="source_code">
974
+ <tr>
975
+ <td>
976
+ <pre class="lines">
977
+
978
+
979
+ 244
980
+ 245
981
+ 246
982
+ 247
983
+ 248
984
+ 249</pre>
985
+ </td>
986
+ <td>
987
+ <pre class="code"><span class="info file"># File 'lib/bovem/command.rb', line 244</span>
988
+
989
+ <span class='kw'>def</span> <span class='id identifier rubyid_get_options'>get_options</span><span class='lparen'>(</span><span class='id identifier rubyid_unprovided'>unprovided</span> <span class='op'>=</span> <span class='kw'>false</span><span class='comma'>,</span> <span class='id identifier rubyid_application'>application</span> <span class='op'>=</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>application_</span><span class='tstring_end'>&quot;</span></span><span class='comma'>,</span> <span class='id identifier rubyid_prefix'>prefix</span> <span class='op'>=</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_end'>&quot;</span></span><span class='comma'>,</span> <span class='op'>*</span><span class='id identifier rubyid_whitelist'>whitelist</span><span class='rparen'>)</span>
990
+ <span class='id identifier rubyid_rv'>rv</span> <span class='op'>=</span> <span class='const'>HashWithIndifferentAccess</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span>
991
+ <span class='id identifier rubyid_rv'>rv</span><span class='period'>.</span><span class='id identifier rubyid_merge!'>merge!</span><span class='lparen'>(</span><span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_application'>application</span><span class='period'>.</span><span class='id identifier rubyid_get_options'>get_options</span><span class='lparen'>(</span><span class='id identifier rubyid_unprovided'>unprovided</span><span class='comma'>,</span> <span class='kw'>nil</span><span class='comma'>,</span> <span class='id identifier rubyid_application'>application</span><span class='comma'>,</span> <span class='op'>*</span><span class='id identifier rubyid_whitelist'>whitelist</span><span class='rparen'>)</span><span class='rparen'>)</span> <span class='kw'>if</span> <span class='id identifier rubyid_application'>application</span> <span class='op'>&amp;&amp;</span> <span class='op'>!</span><span class='id identifier rubyid_is_application?'>is_application?</span>
992
+ <span class='id identifier rubyid_rv'>rv</span><span class='period'>.</span><span class='id identifier rubyid_merge!'>merge!</span><span class='lparen'>(</span><span class='id identifier rubyid_get_current_options'>get_current_options</span><span class='lparen'>(</span><span class='id identifier rubyid_unprovided'>unprovided</span><span class='comma'>,</span> <span class='id identifier rubyid_prefix'>prefix</span><span class='comma'>,</span> <span class='id identifier rubyid_whitelist'>whitelist</span><span class='rparen'>)</span><span class='rparen'>)</span>
993
+ <span class='id identifier rubyid_rv'>rv</span>
994
+ <span class='kw'>end</span></pre>
995
+ </td>
996
+ </tr>
997
+ </table>
998
+ </div>
999
+
1000
+ <div class="method_details ">
1001
+ <h3 class="signature " id="has_commands?-instance_method">
1002
+
1003
+ - (<tt>Boolean</tt>) <strong>has_commands?</strong>
1004
+
1005
+
1006
+
1007
+
1008
+
1009
+ </h3><div class="docstring">
1010
+ <div class="discussion">
1011
+ <p>Check if this command has subcommands.</p>
1012
+
1013
+
1014
+ </div>
1015
+ </div>
1016
+ <div class="tags">
1017
+
1018
+ <p class="tag_title">Returns:</p>
1019
+ <ul class="return">
1020
+
1021
+ <li>
1022
+
1023
+
1024
+ <span class='type'>(<tt>Boolean</tt>)</span>
1025
+
1026
+
1027
+
1028
+ &mdash;
1029
+ <div class='inline'><p><code>true</code> if this command has subcommands, <code>false</code> otherwise.</p>
1030
+ </div>
1031
+
1032
+ </li>
1033
+
1034
+ </ul>
1035
+
1036
+ </div><table class="source_code">
1037
+ <tr>
1038
+ <td>
1039
+ <pre class="lines">
1040
+
1041
+
1042
+ 195
1043
+ 196
1044
+ 197</pre>
1045
+ </td>
1046
+ <td>
1047
+ <pre class="code"><span class="info file"># File 'lib/bovem/command.rb', line 195</span>
1048
+
1049
+ <span class='kw'>def</span> <span class='id identifier rubyid_has_commands?'>has_commands?</span>
1050
+ <span class='id identifier rubyid_commands'>commands</span><span class='period'>.</span><span class='id identifier rubyid_length'>length</span> <span class='op'>&gt;</span> <span class='int'>0</span>
1051
+ <span class='kw'>end</span></pre>
1052
+ </td>
1053
+ </tr>
1054
+ </table>
1055
+ </div>
1056
+
1057
+ <div class="method_details ">
1058
+ <h3 class="signature " id="has_options?-instance_method">
1059
+
1060
+ - (<tt>Boolean</tt>) <strong>has_options?</strong>
1061
+
1062
+
1063
+
1064
+
1065
+
1066
+ </h3><div class="docstring">
1067
+ <div class="discussion">
1068
+ <p>Check if this command has options.</p>
1069
+
1070
+
1071
+ </div>
1072
+ </div>
1073
+ <div class="tags">
1074
+
1075
+ <p class="tag_title">Returns:</p>
1076
+ <ul class="return">
1077
+
1078
+ <li>
1079
+
1080
+
1081
+ <span class='type'>(<tt>Boolean</tt>)</span>
1082
+
1083
+
1084
+
1085
+ &mdash;
1086
+ <div class='inline'><p><code>true</code> if this command has options, <code>false</code> otherwise.</p>
1087
+ </div>
1088
+
1089
+ </li>
1090
+
1091
+ </ul>
1092
+
1093
+ </div><table class="source_code">
1094
+ <tr>
1095
+ <td>
1096
+ <pre class="lines">
1097
+
1098
+
1099
+ 215
1100
+ 216
1101
+ 217</pre>
1102
+ </td>
1103
+ <td>
1104
+ <pre class="code"><span class="info file"># File 'lib/bovem/command.rb', line 215</span>
1105
+
1106
+ <span class='kw'>def</span> <span class='id identifier rubyid_has_options?'>has_options?</span>
1107
+ <span class='id identifier rubyid_options'>options</span><span class='period'>.</span><span class='id identifier rubyid_length'>length</span> <span class='op'>&gt;</span> <span class='int'>0</span>
1108
+ <span class='kw'>end</span></pre>
1109
+ </td>
1110
+ </tr>
1111
+ </table>
1112
+ </div>
1113
+
1114
+ <div class="method_details ">
1115
+ <h3 class="signature " id="option-instance_method">
1116
+
1117
+ - (<tt><span class='object_link'><a href="../Option.html" title="Bovem::Option (class)">Option</a></span></tt>) <strong>option</strong>(name, forms = [], options = {}, &amp;action)
1118
+
1119
+
1120
+
1121
+
1122
+
1123
+ </h3><div class="docstring">
1124
+ <div class="discussion">
1125
+ <p>Adds a new option to this command.</p>
1126
+
1127
+
1128
+ </div>
1129
+ </div>
1130
+ <div class="tags">
1131
+ <p class="tag_title">Parameters:</p>
1132
+ <ul class="param">
1133
+
1134
+ <li>
1135
+
1136
+ <span class='name'>name</span>
1137
+
1138
+
1139
+ <span class='type'>(<tt>String</tt>)</span>
1140
+
1141
+
1142
+
1143
+ &mdash;
1144
+ <div class='inline'><p>The name of the option. Must be unique.</p>
1145
+ </div>
1146
+
1147
+ </li>
1148
+
1149
+ <li>
1150
+
1151
+ <span class='name'>forms</span>
1152
+
1153
+
1154
+ <span class='type'>(<tt>Array</tt>)</span>
1155
+
1156
+
1157
+ <em class="default">(defaults to: <tt>[]</tt>)</em>
1158
+
1159
+
1160
+ &mdash;
1161
+ <div class='inline'><p>An array of short and long forms for this option.</p>
1162
+ </div>
1163
+
1164
+ </li>
1165
+
1166
+ <li>
1167
+
1168
+ <span class='name'>options</span>
1169
+
1170
+
1171
+ <span class='type'>(<tt>Hash</tt>)</span>
1172
+
1173
+
1174
+ <em class="default">(defaults to: <tt>{}</tt>)</em>
1175
+
1176
+
1177
+ &mdash;
1178
+ <div class='inline'><p>The settings for the option.</p>
1179
+ </div>
1180
+
1181
+ </li>
1182
+
1183
+ <li>
1184
+
1185
+ <span class='name'>action</span>
1186
+
1187
+
1188
+ <span class='type'>(<tt>Proc</tt>)</span>
1189
+
1190
+
1191
+
1192
+ &mdash;
1193
+ <div class='inline'><p>An optional action to pass to the option.</p>
1194
+ </div>
1195
+
1196
+ </li>
1197
+
1198
+ </ul>
1199
+
1200
+ <p class="tag_title">Returns:</p>
1201
+ <ul class="return">
1202
+
1203
+ <li>
1204
+
1205
+
1206
+ <span class='type'>(<tt><span class='object_link'><a href="../Option.html" title="Bovem::Option (class)">Option</a></span></tt>)</span>
1207
+
1208
+
1209
+
1210
+ &mdash;
1211
+ <div class='inline'><p>The newly added option.</p>
1212
+ </div>
1213
+
1214
+ </li>
1215
+
1216
+ </ul>
1217
+
1218
+ <p class="tag_title">See Also:</p>
1219
+ <ul class="see">
1220
+
1221
+ <li><span class='object_link'><a href="../Option.html#initialize-instance_method" title="Bovem::Option#initialize (method)">Option#initialize</a></span></li>
1222
+
1223
+ </ul>
1224
+
1225
+ </div><table class="source_code">
1226
+ <tr>
1227
+ <td>
1228
+ <pre class="lines">
1229
+
1230
+
1231
+ 160
1232
+ 161
1233
+ 162
1234
+ 163
1235
+ 164
1236
+ 165
1237
+ 166
1238
+ 167
1239
+ 168
1240
+ 169
1241
+ 170
1242
+ 171
1243
+ 172
1244
+ 173
1245
+ 174
1246
+ 175
1247
+ 176</pre>
1248
+ </td>
1249
+ <td>
1250
+ <pre class="code"><span class="info file"># File 'lib/bovem/command.rb', line 160</span>
1251
+
1252
+ <span class='kw'>def</span> <span class='id identifier rubyid_option'>option</span><span class='lparen'>(</span><span class='id identifier rubyid_name'>name</span><span class='comma'>,</span> <span class='id identifier rubyid_forms'>forms</span> <span class='op'>=</span> <span class='lbracket'>[</span><span class='rbracket'>]</span><span class='comma'>,</span> <span class='id identifier rubyid_options'>options</span> <span class='op'>=</span> <span class='lbrace'>{</span><span class='rbrace'>}</span><span class='comma'>,</span> <span class='op'>&amp;</span><span class='id identifier rubyid_action'>action</span><span class='rparen'>)</span>
1253
+ <span class='id identifier rubyid_name'>name</span> <span class='op'>=</span> <span class='id identifier rubyid_name'>name</span><span class='period'>.</span><span class='id identifier rubyid_ensure_string'>ensure_string</span>
1254
+ <span class='ivar'>@options</span> <span class='op'>||=</span> <span class='const'>HashWithIndifferentAccess</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span>
1255
+
1256
+ <span class='kw'>if</span> <span class='ivar'>@options</span><span class='lbracket'>[</span><span class='id identifier rubyid_name'>name</span><span class='rbracket'>]</span> <span class='kw'>then</span>
1257
+ <span class='kw'>if</span> <span class='id identifier rubyid_is_application?'>is_application?</span> <span class='kw'>then</span>
1258
+ <span class='id identifier rubyid_raise'>raise</span> <span class='const'>Bovem</span><span class='op'>::</span><span class='const'>Errors</span><span class='op'>::</span><span class='const'>Error</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='kw'>self</span><span class='comma'>,</span> <span class='symbol'>:duplicate_option</span><span class='comma'>,</span> <span class='id identifier rubyid_i18n'>i18n</span><span class='period'>.</span><span class='id identifier rubyid_existing_option_global'>existing_option_global</span><span class='lparen'>(</span><span class='id identifier rubyid_name'>name</span><span class='rparen'>)</span><span class='rparen'>)</span>
1259
+ <span class='kw'>else</span>
1260
+ <span class='id identifier rubyid_raise'>raise</span> <span class='const'>Bovem</span><span class='op'>::</span><span class='const'>Errors</span><span class='op'>::</span><span class='const'>Error</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='kw'>self</span><span class='comma'>,</span> <span class='symbol'>:duplicate_option</span><span class='comma'>,</span> <span class='id identifier rubyid_i18n'>i18n</span><span class='period'>.</span><span class='id identifier rubyid_existing_option'>existing_option</span><span class='lparen'>(</span><span class='id identifier rubyid_name'>name</span><span class='comma'>,</span> <span class='id identifier rubyid_full_name'>full_name</span><span class='rparen'>)</span><span class='rparen'>)</span>
1261
+ <span class='kw'>end</span>
1262
+ <span class='kw'>end</span>
1263
+
1264
+ <span class='id identifier rubyid_option'>option</span> <span class='op'>=</span> <span class='const'>Bovem</span><span class='op'>::</span><span class='const'>Option</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='id identifier rubyid_name'>name</span><span class='comma'>,</span> <span class='id identifier rubyid_forms'>forms</span><span class='comma'>,</span> <span class='id identifier rubyid_options'>options</span><span class='comma'>,</span> <span class='op'>&amp;</span><span class='id identifier rubyid_action'>action</span><span class='rparen'>)</span>
1265
+ <span class='id identifier rubyid_option'>option</span><span class='period'>.</span><span class='id identifier rubyid_parent'>parent</span> <span class='op'>=</span> <span class='kw'>self</span>
1266
+ <span class='ivar'>@options</span><span class='lbracket'>[</span><span class='id identifier rubyid_name'>name</span><span class='rbracket'>]</span> <span class='op'>=</span> <span class='id identifier rubyid_option'>option</span>
1267
+ <span class='id identifier rubyid_option'>option</span>
1268
+ <span class='kw'>end</span></pre>
1269
+ </td>
1270
+ </tr>
1271
+ </table>
1272
+ </div>
1273
+
1274
+ </div>
1275
+
1276
+ </div>
1277
+
1278
+ <div id="footer">
1279
+ Generated on Sat Aug 3 13:50:14 2013 by
1280
+ <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
1281
+ 0.8.7 (ruby-2.0.0).
1282
+ </div>
1283
+
1284
+ </body>
1285
+ </html>