halation 0.1.0 → 0.2.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,506 @@
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: Halation::Script
8
+
9
+ &mdash; Documentation by YARD 0.8.7.6
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 = "Halation::Script";
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"></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 (S)</a> &raquo;
40
+ <span class='title'><span class='object_link'><a href="../Halation.html" title="Halation (module)">Halation</a></span></span>
41
+ &raquo;
42
+ <span class="title">Script</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
+ <iframe id="search_frame" src="../class_list.html"></iframe>
63
+
64
+ <div id="content"><h1>Class: Halation::Script
65
+
66
+
67
+
68
+ </h1>
69
+ <div class="box_info">
70
+
71
+ <dl>
72
+ <dt>Inherits:</dt>
73
+ <dd>
74
+ <span class="inheritName">Object</span>
75
+
76
+ <ul class="fullTree">
77
+ <li>Object</li>
78
+
79
+ <li class="next">Halation::Script</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/halation/script.rb</dd>
100
+ </dl>
101
+
102
+ </div>
103
+
104
+ <h2>Overview</h2><div class="docstring">
105
+ <div class="discussion">
106
+
107
+ <p>The script that runs when the halation binary is executed.</p>
108
+
109
+
110
+ </div>
111
+ </div>
112
+ <div class="tags">
113
+
114
+
115
+ </div>
116
+
117
+
118
+
119
+
120
+
121
+
122
+
123
+ <h2>
124
+ Class Method Summary
125
+ <small><a href="#" class="summary_toggle">collapse</a></small>
126
+ </h2>
127
+
128
+ <ul class="summary">
129
+
130
+ <li class="public ">
131
+ <span class="summary_signature">
132
+
133
+ <a href="#generate_new_roll-class_method" title="generate_new_roll (class method)">.<strong>generate_new_roll</strong> &#x21d2; Object </a>
134
+
135
+
136
+
137
+ </span>
138
+
139
+
140
+
141
+
142
+
143
+
144
+
145
+
146
+
147
+ <span class="summary_desc"><div class='inline'>
148
+ <p>Generate a new roll.yml file.</p>
149
+ </div></span>
150
+
151
+ </li>
152
+
153
+
154
+ <li class="public ">
155
+ <span class="summary_signature">
156
+
157
+ <a href="#run-class_method" title="run (class method)">.<strong>run</strong>(opts = {}) &#x21d2; Object </a>
158
+
159
+
160
+
161
+ </span>
162
+
163
+
164
+
165
+
166
+
167
+
168
+
169
+
170
+
171
+ <span class="summary_desc"><div class='inline'></div></span>
172
+
173
+ </li>
174
+
175
+
176
+ </ul>
177
+
178
+
179
+
180
+
181
+ <div id="class_method_details" class="method_details_list">
182
+ <h2>Class Method Details</h2>
183
+
184
+
185
+ <div class="method_details first">
186
+ <h3 class="signature first" id="generate_new_roll-class_method">
187
+
188
+ .<strong>generate_new_roll</strong> &#x21d2; <tt>Object</tt>
189
+
190
+
191
+
192
+
193
+
194
+ </h3><div class="docstring">
195
+ <div class="discussion">
196
+
197
+ <p>Generate a new roll.yml file. Copies “~/.halation/templates/roll.yml” if it
198
+ exists, otherwise it uses a default template.</p>
199
+
200
+
201
+ </div>
202
+ </div>
203
+ <div class="tags">
204
+
205
+
206
+ </div><table class="source_code">
207
+ <tr>
208
+ <td>
209
+ <pre class="lines">
210
+
211
+
212
+ 85
213
+ 86
214
+ 87
215
+ 88
216
+ 89
217
+ 90
218
+ 91
219
+ 92
220
+ 93
221
+ 94
222
+ 95
223
+ 96
224
+ 97
225
+ 98
226
+ 99
227
+ 100
228
+ 101
229
+ 102
230
+ 103</pre>
231
+ </td>
232
+ <td>
233
+ <pre class="code"><span class="info file"># File 'lib/halation/script.rb', line 85</span>
234
+
235
+ <span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_generate_new_roll'>generate_new_roll</span>
236
+ <span class='id identifier rubyid_roll_path'>roll_path</span> <span class='op'>=</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>roll.yml</span><span class='tstring_end'>&quot;</span></span>
237
+
238
+ <span class='kw'>if</span> <span class='const'>File</span><span class='period'>.</span><span class='id identifier rubyid_exists?'>exists?</span><span class='lparen'>(</span><span class='id identifier rubyid_roll_path'>roll_path</span><span class='rparen'>)</span>
239
+ <span class='id identifier rubyid_output_stream'>output_stream</span><span class='period'>.</span><span class='id identifier rubyid_puts'>puts</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>A roll.yml file already exists in this directory.</span><span class='tstring_end'>&quot;</span></span>
240
+ <span class='kw'>return</span>
241
+ <span class='kw'>end</span>
242
+
243
+ <span class='comment'># TODO: Make this configurable from config.yml
244
+ </span> <span class='id identifier rubyid_roll_template_path'>roll_template_path</span> <span class='op'>=</span> <span class='const'>File</span><span class='period'>.</span><span class='id identifier rubyid_expand_path'>expand_path</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>~/.halation/templates/roll.yml</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span>
245
+
246
+ <span class='kw'>if</span> <span class='const'>File</span><span class='period'>.</span><span class='id identifier rubyid_exists?'>exists?</span><span class='lparen'>(</span><span class='id identifier rubyid_roll_template_path'>roll_template_path</span><span class='rparen'>)</span>
247
+ <span class='const'>FileUtils</span><span class='period'>.</span><span class='id identifier rubyid_cp'>cp</span><span class='lparen'>(</span><span class='id identifier rubyid_roll_template_path'>roll_template_path</span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>.</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span>
248
+ <span class='kw'>else</span>
249
+ <span class='const'>File</span><span class='period'>.</span><span class='id identifier rubyid_open'>open</span><span class='lparen'>(</span><span class='id identifier rubyid_roll_path'>roll_path</span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>w</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_f'>f</span><span class='op'>|</span>
250
+ <span class='id identifier rubyid_f'>f</span><span class='period'>.</span><span class='id identifier rubyid_puts'>puts</span> <span class='id identifier rubyid_new_roll_content'>new_roll_content</span>
251
+ <span class='kw'>end</span>
252
+ <span class='kw'>end</span>
253
+ <span class='kw'>end</span></pre>
254
+ </td>
255
+ </tr>
256
+ </table>
257
+ </div>
258
+
259
+ <div class="method_details ">
260
+ <h3 class="signature " id="run-class_method">
261
+
262
+ .<strong>run</strong>(opts = {}) &#x21d2; <tt>Object</tt>
263
+
264
+
265
+
266
+
267
+
268
+ </h3><div class="docstring">
269
+ <div class="discussion">
270
+
271
+
272
+ </div>
273
+ </div>
274
+ <div class="tags">
275
+ <p class="tag_title">Parameters:</p>
276
+ <ul class="param">
277
+
278
+ <li>
279
+
280
+ <span class='name'>opts</span>
281
+
282
+
283
+ <span class='type'>(<tt>Hash</tt>)</span>
284
+
285
+
286
+ <em class="default">(defaults to: <tt>{}</tt>)</em>
287
+
288
+
289
+ &mdash;
290
+ <div class='inline'>
291
+ <p>a customizable set of options</p>
292
+ </div>
293
+
294
+ </li>
295
+
296
+ </ul>
297
+
298
+
299
+
300
+
301
+ <p class="tag_title">Options Hash (<tt>opts</tt>):</p>
302
+ <ul class="option">
303
+
304
+ <li>
305
+ <span class="name">:args</span>
306
+ <span class="type">(<tt>Boolean</tt>)</span>
307
+ <span class="default">
308
+
309
+ &mdash; default:
310
+ <tt>ARGV</tt>
311
+
312
+ </span>
313
+
314
+ </li>
315
+
316
+ <li>
317
+ <span class="name">:output_stream</span>
318
+ <span class="type">(<tt>Boolean</tt>)</span>
319
+ <span class="default">
320
+
321
+ &mdash; default:
322
+ <tt>STDOUT</tt>
323
+
324
+ </span>
325
+
326
+ </li>
327
+
328
+ <li>
329
+ <span class="name">:skip_exit</span>
330
+ <span class="type">(<tt>Boolean</tt>)</span>
331
+ <span class="default">
332
+
333
+ &mdash; default:
334
+ <tt>false</tt>
335
+
336
+ </span>
337
+
338
+ &mdash; <div class='inline'>
339
+ <p>Don&#39;t exit the program after calling a handler that would normally
340
+ exit. Used for unit testing.</p>
341
+ </div>
342
+
343
+ </li>
344
+
345
+ </ul>
346
+
347
+
348
+
349
+ </div><table class="source_code">
350
+ <tr>
351
+ <td>
352
+ <pre class="lines">
353
+
354
+
355
+ 16
356
+ 17
357
+ 18
358
+ 19
359
+ 20
360
+ 21
361
+ 22
362
+ 23
363
+ 24
364
+ 25
365
+ 26
366
+ 27
367
+ 28
368
+ 29
369
+ 30
370
+ 31
371
+ 32
372
+ 33
373
+ 34
374
+ 35
375
+ 36
376
+ 37
377
+ 38
378
+ 39
379
+ 40
380
+ 41
381
+ 42
382
+ 43
383
+ 44
384
+ 45
385
+ 46
386
+ 47
387
+ 48
388
+ 49
389
+ 50
390
+ 51
391
+ 52
392
+ 53
393
+ 54
394
+ 55
395
+ 56
396
+ 57
397
+ 58
398
+ 59
399
+ 60
400
+ 61
401
+ 62
402
+ 63
403
+ 64
404
+ 65
405
+ 66
406
+ 67
407
+ 68
408
+ 69
409
+ 70
410
+ 71
411
+ 72
412
+ 73
413
+ 74
414
+ 75
415
+ 76
416
+ 77
417
+ 78
418
+ 79
419
+ 80</pre>
420
+ </td>
421
+ <td>
422
+ <pre class="code"><span class="info file"># File 'lib/halation/script.rb', line 16</span>
423
+
424
+ <span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_run'>run</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>
425
+ <span class='id identifier rubyid_args'>args</span> <span class='op'>=</span> <span class='id identifier rubyid_opts'>opts</span><span class='lbracket'>[</span><span class='symbol'>:args</span><span class='rbracket'>]</span> <span class='op'>||</span> <span class='const'>ARGV</span>
426
+ <span class='id identifier rubyid_output_stream'>output_stream</span> <span class='op'>=</span> <span class='id identifier rubyid_opts'>opts</span><span class='lbracket'>[</span><span class='symbol'>:output_stream</span><span class='rbracket'>]</span> <span class='op'>||</span> <span class='const'>STDOUT</span>
427
+ <span class='id identifier rubyid_skip_exit'>skip_exit</span> <span class='op'>=</span> <span class='op'>!</span><span class='op'>!</span><span class='id identifier rubyid_opts'>opts</span><span class='lbracket'>[</span><span class='symbol'>:skip_exit</span><span class='rbracket'>]</span>
428
+ <span class='id identifier rubyid_run_engine'>run_engine</span> <span class='op'>=</span> <span class='kw'>true</span>
429
+
430
+ <span class='id identifier rubyid_options'>options</span> <span class='op'>=</span> <span class='lbrace'>{</span><span class='rbrace'>}</span>
431
+
432
+ <span class='const'>OptionParser</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span> <span class='lbrace'>{</span> <span class='op'>|</span><span class='id identifier rubyid_opts'>opts</span><span class='op'>|</span>
433
+ <span class='id identifier rubyid_opts'>opts</span><span class='period'>.</span><span class='id identifier rubyid_banner'>banner</span> <span class='op'>=</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>Usage: halation [options]</span><span class='tstring_end'>&quot;</span></span>
434
+
435
+ <span class='id identifier rubyid_opts'>opts</span><span class='period'>.</span><span class='id identifier rubyid_on'>on</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>-c</span><span class='tstring_end'>&quot;</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>--config=PATH</span><span class='tstring_end'>&quot;</span></span><span class='comma'>,</span> <span class='const'>String</span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>Config file path</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_config_path'>config_path</span><span class='op'>|</span>
436
+ <span class='id identifier rubyid_options'>options</span><span class='lbracket'>[</span><span class='symbol'>:config_path</span><span class='rbracket'>]</span> <span class='op'>=</span> <span class='id identifier rubyid_config_path'>config_path</span>
437
+ <span class='kw'>end</span>
438
+
439
+ <span class='id identifier rubyid_opts'>opts</span><span class='period'>.</span><span class='id identifier rubyid_on'>on</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>--dry</span><span class='tstring_end'>&quot;</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>Dry run</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span> <span class='kw'>do</span>
440
+ <span class='id identifier rubyid_options'>options</span><span class='lbracket'>[</span><span class='symbol'>:dry_run</span><span class='rbracket'>]</span> <span class='op'>=</span> <span class='kw'>true</span>
441
+ <span class='comment'># TODO: Implement
442
+ </span> <span class='id identifier rubyid_raise'>raise</span> <span class='const'>NotImplementedError</span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>Dry run option is not yet implemented.</span><span class='tstring_end'>&quot;</span></span>
443
+ <span class='kw'>end</span>
444
+
445
+ <span class='id identifier rubyid_opts'>opts</span><span class='period'>.</span><span class='id identifier rubyid_on'>on</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>-h</span><span class='tstring_end'>&quot;</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>--help</span><span class='tstring_end'>&quot;</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>Print this help</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span> <span class='kw'>do</span>
446
+ <span class='id identifier rubyid_output_stream'>output_stream</span><span class='period'>.</span><span class='id identifier rubyid_puts'>puts</span> <span class='id identifier rubyid_opts'>opts</span>
447
+ <span class='id identifier rubyid_run_engine'>run_engine</span> <span class='op'>=</span> <span class='kw'>false</span>
448
+ <span class='id identifier rubyid_exit'>exit</span> <span class='kw'>unless</span> <span class='id identifier rubyid_skip_exit'>skip_exit</span>
449
+ <span class='kw'>end</span>
450
+
451
+ <span class='id identifier rubyid_opts'>opts</span><span class='period'>.</span><span class='id identifier rubyid_on'>on</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>--new-config</span><span class='tstring_end'>&quot;</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>Generate a new config file</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_path'>path</span><span class='op'>|</span>
452
+ <span class='comment'># TODO: Implement
453
+ </span> <span class='id identifier rubyid_raise'>raise</span> <span class='const'>NotImplementedError</span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>Generate config option is not yet implemented.</span><span class='tstring_end'>&quot;</span></span>
454
+ <span class='id identifier rubyid_run_engine'>run_engine</span> <span class='op'>=</span> <span class='kw'>false</span>
455
+ <span class='id identifier rubyid_exit'>exit</span> <span class='kw'>unless</span> <span class='id identifier rubyid_skip_exit'>skip_exit</span>
456
+ <span class='kw'>end</span>
457
+
458
+ <span class='id identifier rubyid_opts'>opts</span><span class='period'>.</span><span class='id identifier rubyid_on'>on</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>--new-roll</span><span class='tstring_end'>&quot;</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>Generate a new roll.yml file</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span> <span class='kw'>do</span>
459
+ <span class='id identifier rubyid_generate_new_roll'>generate_new_roll</span>
460
+ <span class='id identifier rubyid_run_engine'>run_engine</span> <span class='op'>=</span> <span class='kw'>false</span>
461
+ <span class='id identifier rubyid_exit'>exit</span> <span class='kw'>unless</span> <span class='id identifier rubyid_skip_exit'>skip_exit</span>
462
+ <span class='kw'>end</span>
463
+
464
+ <span class='id identifier rubyid_opts'>opts</span><span class='period'>.</span><span class='id identifier rubyid_on'>on</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>-p</span><span class='tstring_end'>&quot;</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>--print-config</span><span class='tstring_end'>&quot;</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>Print the configuration settings</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span> <span class='kw'>do</span>
465
+ <span class='comment'># TODO: Implement
466
+ </span> <span class='id identifier rubyid_raise'>raise</span> <span class='const'>NotImplementedError</span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>Print config option is not yet implemented.</span><span class='tstring_end'>&quot;</span></span>
467
+ <span class='id identifier rubyid_run_engine'>run_engine</span> <span class='op'>=</span> <span class='kw'>false</span>
468
+ <span class='id identifier rubyid_exit'>exit</span> <span class='kw'>unless</span> <span class='id identifier rubyid_skip_exit'>skip_exit</span>
469
+ <span class='kw'>end</span>
470
+
471
+ <span class='id identifier rubyid_opts'>opts</span><span class='period'>.</span><span class='id identifier rubyid_on'>on</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>-r</span><span class='tstring_end'>&quot;</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>--recursive</span><span class='tstring_end'>&quot;</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>Traverse into subdirectories</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span> <span class='kw'>do</span>
472
+ <span class='comment'># TODO: Implement
473
+ </span> <span class='id identifier rubyid_raise'>raise</span> <span class='const'>NotImplementedError</span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>Recursive option is not yet implemented.</span><span class='tstring_end'>&quot;</span></span>
474
+ <span class='kw'>end</span>
475
+
476
+ <span class='id identifier rubyid_opts'>opts</span><span class='period'>.</span><span class='id identifier rubyid_on'>on</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>--silent</span><span class='tstring_end'>&quot;</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>Suppress messages to stdout.</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span> <span class='kw'>do</span>
477
+ <span class='id identifier rubyid_options'>options</span><span class='lbracket'>[</span><span class='symbol'>:silent</span><span class='rbracket'>]</span> <span class='op'>=</span> <span class='kw'>true</span>
478
+ <span class='kw'>end</span>
479
+
480
+ <span class='id identifier rubyid_opts'>opts</span><span class='period'>.</span><span class='id identifier rubyid_on'>on</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>-v</span><span class='tstring_end'>&quot;</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>--version</span><span class='tstring_end'>&quot;</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>Print the version information</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span> <span class='kw'>do</span>
481
+ <span class='id identifier rubyid_output_stream'>output_stream</span><span class='period'>.</span><span class='id identifier rubyid_puts'>puts</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>halation </span><span class='embexpr_beg'>#{</span><span class='const'>Halation</span><span class='op'>::</span><span class='const'>VERSION</span><span class='embexpr_end'>}</span><span class='tstring_end'>&quot;</span></span>
482
+ <span class='id identifier rubyid_run_engine'>run_engine</span> <span class='op'>=</span> <span class='kw'>false</span>
483
+ <span class='id identifier rubyid_exit'>exit</span> <span class='kw'>unless</span> <span class='id identifier rubyid_skip_exit'>skip_exit</span>
484
+ <span class='kw'>end</span>
485
+ <span class='rbrace'>}</span><span class='period'>.</span><span class='id identifier rubyid_parse!'>parse!</span><span class='lparen'>(</span><span class='id identifier rubyid_args'>args</span><span class='rparen'>)</span>
486
+
487
+ <span class='const'>Halation</span><span class='op'>::</span><span class='const'>Engine</span><span class='period'>.</span><span class='id identifier rubyid_run'>run</span><span class='lparen'>(</span><span class='id identifier rubyid_options'>options</span><span class='rparen'>)</span> <span class='kw'>if</span> <span class='id identifier rubyid_run_engine'>run_engine</span>
488
+ <span class='kw'>end</span></pre>
489
+ </td>
490
+ </tr>
491
+ </table>
492
+ </div>
493
+
494
+ </div>
495
+
496
+ </div>
497
+
498
+ <div id="footer">
499
+ Generated on Sat May 28 22:28:56 2016 by
500
+ <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
501
+ 0.8.7.6 (ruby-2.1.7).
502
+ </div>
503
+
504
+ </div>
505
+ </body>
506
+ </html>