my_help 1.2.12 → 1.2.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/my_help/modify.rb +2 -2
- data/lib/my_help/version.rb +1 -1
- data/lib/templates/kick_off.org +15 -7
- data/lib/templates/template.md +17 -0
- data/lib/templates/template.org +11 -1
- metadata +4 -32
- data/doc/MyHelp/CLI.html +0 -895
- data/doc/MyHelp/Config.html +0 -759
- data/doc/MyHelp/Error.html +0 -124
- data/doc/MyHelp/GetConfig.html +0 -198
- data/doc/MyHelp/Git.html +0 -291
- data/doc/MyHelp/Init.html +0 -449
- data/doc/MyHelp/List.html +0 -646
- data/doc/MyHelp/Md2Hash.html +0 -632
- data/doc/MyHelp/Modify.html +0 -393
- data/doc/MyHelp/Org2Hash.html +0 -554
- data/doc/MyHelp.html +0 -135
- data/doc/Org2Yaml.html +0 -497
- data/doc/_index.html +0 -230
- data/doc/class_list.html +0 -54
- data/doc/css/common.css +0 -1
- data/doc/css/full_list.css +0 -58
- data/doc/css/style.css +0 -503
- data/doc/file.README.html +0 -181
- data/doc/file_list.html +0 -59
- data/doc/frames.html +0 -22
- data/doc/index.html +0 -181
- data/doc/js/app.js +0 -344
- data/doc/js/full_list.js +0 -242
- data/doc/js/jquery.js +0 -2
- data/doc/method_list.html +0 -486
- data/doc/top-level-namespace.html +0 -112
data/doc/MyHelp/CLI.html
DELETED
|
@@ -1,895 +0,0 @@
|
|
|
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: MyHelp::CLI
|
|
8
|
-
|
|
9
|
-
— my_help
|
|
10
|
-
|
|
11
|
-
</title>
|
|
12
|
-
|
|
13
|
-
<link rel="stylesheet" href="../css/style.css" type="text/css" />
|
|
14
|
-
|
|
15
|
-
<link rel="stylesheet" href="../css/common.css" type="text/css" />
|
|
16
|
-
|
|
17
|
-
<script type="text/javascript">
|
|
18
|
-
pathId = "MyHelp::CLI";
|
|
19
|
-
relpath = '../';
|
|
20
|
-
</script>
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
<script type="text/javascript" charset="utf-8" src="../js/jquery.js"></script>
|
|
24
|
-
|
|
25
|
-
<script type="text/javascript" charset="utf-8" src="../js/app.js"></script>
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
</head>
|
|
29
|
-
<body>
|
|
30
|
-
<div class="nav_wrap">
|
|
31
|
-
<iframe id="nav" src="../class_list.html?1"></iframe>
|
|
32
|
-
<div id="resizer"></div>
|
|
33
|
-
</div>
|
|
34
|
-
|
|
35
|
-
<div id="main" tabindex="-1">
|
|
36
|
-
<div id="header">
|
|
37
|
-
<div id="menu">
|
|
38
|
-
|
|
39
|
-
<a href="../_index.html">Index (C)</a> »
|
|
40
|
-
<span class='title'><span class='object_link'><a href="../MyHelp.html" title="MyHelp (module)">MyHelp</a></span></span>
|
|
41
|
-
»
|
|
42
|
-
<span class="title">CLI</span>
|
|
43
|
-
|
|
44
|
-
</div>
|
|
45
|
-
|
|
46
|
-
<div id="search">
|
|
47
|
-
|
|
48
|
-
<a class="full_list_link" id="class_list_link"
|
|
49
|
-
href="../class_list.html">
|
|
50
|
-
|
|
51
|
-
<svg width="24" height="24">
|
|
52
|
-
<rect x="0" y="4" width="24" height="4" rx="1" ry="1"></rect>
|
|
53
|
-
<rect x="0" y="12" width="24" height="4" rx="1" ry="1"></rect>
|
|
54
|
-
<rect x="0" y="20" width="24" height="4" rx="1" ry="1"></rect>
|
|
55
|
-
</svg>
|
|
56
|
-
</a>
|
|
57
|
-
|
|
58
|
-
</div>
|
|
59
|
-
<div class="clear"></div>
|
|
60
|
-
</div>
|
|
61
|
-
|
|
62
|
-
<div id="content"><h1>Class: MyHelp::CLI
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
</h1>
|
|
67
|
-
<div class="box_info">
|
|
68
|
-
|
|
69
|
-
<dl>
|
|
70
|
-
<dt>Inherits:</dt>
|
|
71
|
-
<dd>
|
|
72
|
-
<span class="inheritName">Thor</span>
|
|
73
|
-
|
|
74
|
-
<ul class="fullTree">
|
|
75
|
-
<li>Object</li>
|
|
76
|
-
|
|
77
|
-
<li class="next">Thor</li>
|
|
78
|
-
|
|
79
|
-
<li class="next">MyHelp::CLI</li>
|
|
80
|
-
|
|
81
|
-
</ul>
|
|
82
|
-
<a href="#" class="inheritanceTree">show all</a>
|
|
83
|
-
|
|
84
|
-
</dd>
|
|
85
|
-
</dl>
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
<dl>
|
|
93
|
-
<dt>Includes:</dt>
|
|
94
|
-
<dd><span class='object_link'><a href="GetConfig.html" title="MyHelp::GetConfig (module)">GetConfig</a></span></dd>
|
|
95
|
-
</dl>
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
<dl>
|
|
103
|
-
<dt>Defined in:</dt>
|
|
104
|
-
<dd>lib/my_help/cli.rb</dd>
|
|
105
|
-
</dl>
|
|
106
|
-
|
|
107
|
-
</div>
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
<h2>
|
|
118
|
-
Class Method Summary
|
|
119
|
-
<small><a href="#" class="summary_toggle">collapse</a></small>
|
|
120
|
-
</h2>
|
|
121
|
-
|
|
122
|
-
<ul class="summary">
|
|
123
|
-
|
|
124
|
-
<li class="public ">
|
|
125
|
-
<span class="summary_signature">
|
|
126
|
-
|
|
127
|
-
<a href="#exit_on_failure%3F-class_method" title="exit_on_failure? (class method)">.<strong>exit_on_failure?</strong> ⇒ Boolean </a>
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
</span>
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
<span class="summary_desc"><div class='inline'></div></span>
|
|
142
|
-
|
|
143
|
-
</li>
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
</ul>
|
|
147
|
-
|
|
148
|
-
<h2>
|
|
149
|
-
Instance Method Summary
|
|
150
|
-
<small><a href="#" class="summary_toggle">collapse</a></small>
|
|
151
|
-
</h2>
|
|
152
|
-
|
|
153
|
-
<ul class="summary">
|
|
154
|
-
|
|
155
|
-
<li class="public ">
|
|
156
|
-
<span class="summary_signature">
|
|
157
|
-
|
|
158
|
-
<a href="#add_defaults-instance_method" title="#add_defaults (instance method)">#<strong>add_defaults</strong> ⇒ Object </a>
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
</span>
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
<span class="summary_desc"><div class='inline'></div></span>
|
|
173
|
-
|
|
174
|
-
</li>
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
<li class="public ">
|
|
178
|
-
<span class="summary_signature">
|
|
179
|
-
|
|
180
|
-
<a href="#delete-instance_method" title="#delete (instance method)">#<strong>delete</strong>(*args) ⇒ Object </a>
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
</span>
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
<span class="summary_desc"><div class='inline'></div></span>
|
|
195
|
-
|
|
196
|
-
</li>
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
<li class="public ">
|
|
200
|
-
<span class="summary_signature">
|
|
201
|
-
|
|
202
|
-
<a href="#edit-instance_method" title="#edit (instance method)">#<strong>edit</strong>(*args) ⇒ Object </a>
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
</span>
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
<span class="summary_desc"><div class='inline'></div></span>
|
|
217
|
-
|
|
218
|
-
</li>
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
<li class="public ">
|
|
222
|
-
<span class="summary_signature">
|
|
223
|
-
|
|
224
|
-
<a href="#hello-instance_method" title="#hello (instance method)">#<strong>hello</strong> ⇒ Object </a>
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
</span>
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
<span class="summary_desc"><div class='inline'></div></span>
|
|
239
|
-
|
|
240
|
-
</li>
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
<li class="public ">
|
|
244
|
-
<span class="summary_signature">
|
|
245
|
-
|
|
246
|
-
<a href="#init-instance_method" title="#init (instance method)">#<strong>init</strong>(*args) ⇒ Object </a>
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
</span>
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
<span class="summary_desc"><div class='inline'></div></span>
|
|
261
|
-
|
|
262
|
-
</li>
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
<li class="public ">
|
|
266
|
-
<span class="summary_signature">
|
|
267
|
-
|
|
268
|
-
<a href="#list-instance_method" title="#list (instance method)">#<strong>list</strong>(*args) ⇒ Object </a>
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
</span>
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
<span class="summary_desc"><div class='inline'>
|
|
283
|
-
<p>use method_options [[<a href="https://github.com/rails/thor/wiki/Method-Options">github.com/rails/thor/wiki/Method-Options</a>]].</p>
|
|
284
|
-
</div></span>
|
|
285
|
-
|
|
286
|
-
</li>
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
<li class="public ">
|
|
290
|
-
<span class="summary_signature">
|
|
291
|
-
|
|
292
|
-
<a href="#new-instance_method" title="#new (instance method)">#<strong>new</strong>(*args) ⇒ Object </a>
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
</span>
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
<span class="summary_desc"><div class='inline'></div></span>
|
|
307
|
-
|
|
308
|
-
</li>
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
<li class="public ">
|
|
312
|
-
<span class="summary_signature">
|
|
313
|
-
|
|
314
|
-
<a href="#place-instance_method" title="#place (instance method)">#<strong>place</strong>(*args) ⇒ Object </a>
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
</span>
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
<span class="summary_desc"><div class='inline'></div></span>
|
|
329
|
-
|
|
330
|
-
</li>
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
<li class="public ">
|
|
334
|
-
<span class="summary_signature">
|
|
335
|
-
|
|
336
|
-
<a href="#set-instance_method" title="#set (instance method)">#<strong>set</strong>(*args) ⇒ Object </a>
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
</span>
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
<span class="summary_desc"><div class='inline'></div></span>
|
|
351
|
-
|
|
352
|
-
</li>
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
<li class="public ">
|
|
356
|
-
<span class="summary_signature">
|
|
357
|
-
|
|
358
|
-
<a href="#version-instance_method" title="#version (instance method)">#<strong>version</strong> ⇒ Object </a>
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
</span>
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
<span class="summary_desc"><div class='inline'></div></span>
|
|
373
|
-
|
|
374
|
-
</li>
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
</ul>
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
<h3 class="inherited">Methods included from <span class='object_link'><a href="GetConfig.html" title="MyHelp::GetConfig (module)">GetConfig</a></span></h3>
|
|
390
|
-
<p class="inherited"><span class='object_link'><a href="GetConfig.html#get_config-instance_method" title="MyHelp::GetConfig#get_config (method)">#get_config</a></span></p>
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
<div id="class_method_details" class="method_details_list">
|
|
395
|
-
<h2>Class Method Details</h2>
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
<div class="method_details first">
|
|
399
|
-
<h3 class="signature first" id="exit_on_failure?-class_method">
|
|
400
|
-
|
|
401
|
-
.<strong>exit_on_failure?</strong> ⇒ <tt>Boolean</tt>
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
</h3><div class="docstring">
|
|
408
|
-
<div class="discussion">
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
</div>
|
|
412
|
-
</div>
|
|
413
|
-
<div class="tags">
|
|
414
|
-
|
|
415
|
-
<p class="tag_title">Returns:</p>
|
|
416
|
-
<ul class="return">
|
|
417
|
-
|
|
418
|
-
<li>
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
<span class='type'>(<tt>Boolean</tt>)</span>
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
</li>
|
|
426
|
-
|
|
427
|
-
</ul>
|
|
428
|
-
|
|
429
|
-
</div><table class="source_code">
|
|
430
|
-
<tr>
|
|
431
|
-
<td>
|
|
432
|
-
<pre class="lines">
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
11
|
|
436
|
-
12
|
|
437
|
-
13</pre>
|
|
438
|
-
</td>
|
|
439
|
-
<td>
|
|
440
|
-
<pre class="code"><span class="info file"># File 'lib/my_help/cli.rb', line 11</span>
|
|
441
|
-
|
|
442
|
-
<span class='kw'>def</span> <span class='id identifier rubyid_exit_on_failure?'>exit_on_failure?</span>
|
|
443
|
-
<span class='kw'>true</span>
|
|
444
|
-
<span class='kw'>end</span></pre>
|
|
445
|
-
</td>
|
|
446
|
-
</tr>
|
|
447
|
-
</table>
|
|
448
|
-
</div>
|
|
449
|
-
|
|
450
|
-
</div>
|
|
451
|
-
|
|
452
|
-
<div id="instance_method_details" class="method_details_list">
|
|
453
|
-
<h2>Instance Method Details</h2>
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
<div class="method_details first">
|
|
457
|
-
<h3 class="signature first" id="add_defaults-instance_method">
|
|
458
|
-
|
|
459
|
-
#<strong>add_defaults</strong> ⇒ <tt>Object</tt>
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
</h3><table class="source_code">
|
|
466
|
-
<tr>
|
|
467
|
-
<td>
|
|
468
|
-
<pre class="lines">
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
29
|
|
472
|
-
30
|
|
473
|
-
31
|
|
474
|
-
32
|
|
475
|
-
33
|
|
476
|
-
34
|
|
477
|
-
35
|
|
478
|
-
36
|
|
479
|
-
37
|
|
480
|
-
38
|
|
481
|
-
39
|
|
482
|
-
40
|
|
483
|
-
41
|
|
484
|
-
42</pre>
|
|
485
|
-
</td>
|
|
486
|
-
<td>
|
|
487
|
-
<pre class="code"><span class="info file"># File 'lib/my_help/cli.rb', line 29</span>
|
|
488
|
-
|
|
489
|
-
<span class='kw'>def</span> <span class='id identifier rubyid_add_defaults'>add_defaults</span>
|
|
490
|
-
<span class='id identifier rubyid_puts'>puts</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>Adding defaults org files in .my_help</span><span class='tstring_end'>"</span></span>
|
|
491
|
-
<span class='id identifier rubyid_config'>config</span> <span class='op'>=</span> <span class='id identifier rubyid_get_config'>get_config</span>
|
|
492
|
-
<span class='id identifier rubyid_help_dir'>help_dir</span> <span class='op'>=</span> <span class='id identifier rubyid_options'>options</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>help_dir</span><span class='tstring_end'>"</span></span><span class='rbracket'>]</span> <span class='op'>||</span> <span class='id identifier rubyid_config'>config</span><span class='lbracket'>[</span><span class='symbol'>:local_help_dir</span><span class='rbracket'>]</span>
|
|
493
|
-
<span class='id identifier rubyid_p'>p</span> <span class='id identifier rubyid_current_orgs'>current_orgs</span> <span class='op'>=</span> <span class='const'>Dir</span><span class='period'>.</span><span class='id identifier rubyid_glob'>glob</span><span class='lparen'>(</span><span class='const'>File</span><span class='period'>.</span><span class='id identifier rubyid_join'>join</span><span class='lparen'>(</span><span class='id identifier rubyid_help_dir'>help_dir</span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>*.org</span><span class='tstring_end'>"</span></span><span class='rparen'>)</span><span class='rparen'>)</span><span class='period'>.</span>
|
|
494
|
-
<span class='id identifier rubyid_map!'>map!</span><span class='lbrace'>{</span><span class='op'>|</span><span class='id identifier rubyid_f'>f</span><span class='op'>|</span> <span class='const'>File</span><span class='period'>.</span><span class='id identifier rubyid_basename'>basename</span><span class='lparen'>(</span><span class='id identifier rubyid_f'>f</span><span class='rparen'>)</span><span class='rbrace'>}</span>
|
|
495
|
-
<span class='id identifier rubyid_new_orgs'>new_orgs</span> <span class='op'>=</span> <span class='const'>Dir</span><span class='period'>.</span><span class='id identifier rubyid_glob'>glob</span><span class='lparen'>(</span><span class='const'>File</span><span class='period'>.</span><span class='id identifier rubyid_join'>join</span><span class='lparen'>(</span><span class='id identifier rubyid_config'>config</span><span class='lbracket'>[</span><span class='symbol'>:template_dir</span><span class='rbracket'>]</span><span class='comma'>,</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>*.org</span><span class='tstring_end'>'</span></span><span class='rparen'>)</span><span class='rparen'>)</span>
|
|
496
|
-
<span class='id identifier rubyid_new_orgs'>new_orgs</span><span class='period'>.</span><span class='id identifier rubyid_each'>each</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_new_org'>new_org</span><span class='op'>|</span>
|
|
497
|
-
<span class='id identifier rubyid_p'>p</span> <span class='lbracket'>[</span><span class='id identifier rubyid_new_org'>new_org</span><span class='comma'>,</span> <span class='id identifier rubyid_current_orgs'>current_orgs</span><span class='period'>.</span><span class='id identifier rubyid_include?'>include?</span><span class='lparen'>(</span><span class='const'>File</span><span class='period'>.</span><span class='id identifier rubyid_basename'>basename</span><span class='lparen'>(</span><span class='id identifier rubyid_new_org'>new_org</span><span class='rparen'>)</span><span class='rparen'>)</span><span class='rbracket'>]</span>
|
|
498
|
-
<span class='kw'>unless</span> <span class='id identifier rubyid_current_orgs'>current_orgs</span><span class='period'>.</span><span class='id identifier rubyid_include?'>include?</span><span class='lparen'>(</span><span class='const'>File</span><span class='period'>.</span><span class='id identifier rubyid_basename'>basename</span><span class='lparen'>(</span><span class='id identifier rubyid_new_org'>new_org</span><span class='rparen'>)</span><span class='rparen'>)</span>
|
|
499
|
-
<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_new_org'>new_org</span><span class='comma'>,</span> <span class='id identifier rubyid_help_dir'>help_dir</span><span class='comma'>,</span> <span class='label'>verbose:</span> <span class='kw'>true</span><span class='rparen'>)</span>
|
|
500
|
-
<span class='kw'>end</span>
|
|
501
|
-
<span class='kw'>end</span>
|
|
502
|
-
<span class='kw'>end</span></pre>
|
|
503
|
-
</td>
|
|
504
|
-
</tr>
|
|
505
|
-
</table>
|
|
506
|
-
</div>
|
|
507
|
-
|
|
508
|
-
<div class="method_details ">
|
|
509
|
-
<h3 class="signature " id="delete-instance_method">
|
|
510
|
-
|
|
511
|
-
#<strong>delete</strong>(*args) ⇒ <tt>Object</tt>
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
</h3><table class="source_code">
|
|
518
|
-
<tr>
|
|
519
|
-
<td>
|
|
520
|
-
<pre class="lines">
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
123
|
|
524
|
-
124
|
|
525
|
-
125
|
|
526
|
-
126
|
|
527
|
-
127
|
|
528
|
-
128
|
|
529
|
-
129
|
|
530
|
-
130
|
|
531
|
-
131
|
|
532
|
-
132
|
|
533
|
-
133
|
|
534
|
-
134</pre>
|
|
535
|
-
</td>
|
|
536
|
-
<td>
|
|
537
|
-
<pre class="code"><span class="info file"># File 'lib/my_help/cli.rb', line 123</span>
|
|
538
|
-
|
|
539
|
-
<span class='kw'>def</span> <span class='id identifier rubyid_delete'>delete</span><span class='lparen'>(</span><span class='op'>*</span><span class='id identifier rubyid_args'>args</span><span class='rparen'>)</span>
|
|
540
|
-
<span class='id identifier rubyid_c'>c</span> <span class='op'>=</span> <span class='id identifier rubyid_get_config'>get_config</span>
|
|
541
|
-
<span class='id identifier rubyid_help_name'>help_name</span> <span class='op'>=</span> <span class='id identifier rubyid_args'>args</span><span class='lbracket'>[</span><span class='int'>0</span><span class='rbracket'>]</span>
|
|
542
|
-
<span class='id identifier rubyid_help_file'>help_file</span> <span class='op'>=</span> <span class='const'>File</span><span class='period'>.</span><span class='id identifier rubyid_join'>join</span><span class='lparen'>(</span><span class='id identifier rubyid_c'>c</span><span class='lbracket'>[</span><span class='symbol'>:local_help_dir</span><span class='rbracket'>]</span><span class='comma'>,</span> <span class='id identifier rubyid_help_name'>help_name</span> <span class='op'>+</span> <span class='id identifier rubyid_c'>c</span><span class='lbracket'>[</span><span class='symbol'>:ext</span><span class='rbracket'>]</span><span class='rparen'>)</span>
|
|
543
|
-
<span class='id identifier rubyid_puts'>puts</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>Are you sure to delete </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_help_file'>help_file</span><span class='embexpr_end'>}</span><span class='tstring_content'>? [YN]</span><span class='tstring_end'>"</span></span>
|
|
544
|
-
<span class='id identifier rubyid_responce'>responce</span> <span class='op'>=</span> <span class='gvar'>$stdin</span><span class='period'>.</span><span class='id identifier rubyid_gets'>gets</span><span class='period'>.</span><span class='id identifier rubyid_chomp'>chomp</span>
|
|
545
|
-
<span class='kw'>if</span> <span class='id identifier rubyid_responce'>responce</span><span class='period'>.</span><span class='id identifier rubyid_upcase'>upcase</span><span class='lbracket'>[</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'>Y</span><span class='tstring_end'>"</span></span>
|
|
546
|
-
<span class='const'><span class='object_link'><a href="Modify.html" title="MyHelp::Modify (class)">Modify</a></span></span><span class='period'>.</span><span class='id identifier rubyid_new'><span class='object_link'><a href="Modify.html#new-instance_method" title="MyHelp::Modify#new (method)">new</a></span></span><span class='lparen'>(</span><span class='id identifier rubyid_c'>c</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_delete'>delete</span><span class='lparen'>(</span><span class='id identifier rubyid_help_file'>help_file</span><span class='rparen'>)</span>
|
|
547
|
-
<span class='kw'>else</span>
|
|
548
|
-
<span class='id identifier rubyid_puts'>puts</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>Leave </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_help_file'>help_file</span><span class='embexpr_end'>}</span><span class='tstring_content'> exists.</span><span class='tstring_end'>"</span></span>
|
|
549
|
-
<span class='kw'>end</span>
|
|
550
|
-
<span class='kw'>end</span></pre>
|
|
551
|
-
</td>
|
|
552
|
-
</tr>
|
|
553
|
-
</table>
|
|
554
|
-
</div>
|
|
555
|
-
|
|
556
|
-
<div class="method_details ">
|
|
557
|
-
<h3 class="signature " id="edit-instance_method">
|
|
558
|
-
|
|
559
|
-
#<strong>edit</strong>(*args) ⇒ <tt>Object</tt>
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
</h3><table class="source_code">
|
|
566
|
-
<tr>
|
|
567
|
-
<td>
|
|
568
|
-
<pre class="lines">
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
90
|
|
572
|
-
91
|
|
573
|
-
92
|
|
574
|
-
93
|
|
575
|
-
94</pre>
|
|
576
|
-
</td>
|
|
577
|
-
<td>
|
|
578
|
-
<pre class="code"><span class="info file"># File 'lib/my_help/cli.rb', line 90</span>
|
|
579
|
-
|
|
580
|
-
<span class='kw'>def</span> <span class='id identifier rubyid_edit'>edit</span><span class='lparen'>(</span><span class='op'>*</span><span class='id identifier rubyid_args'>args</span><span class='rparen'>)</span>
|
|
581
|
-
<span class='id identifier rubyid_c'>c</span> <span class='op'>=</span> <span class='id identifier rubyid_get_config'>get_config</span>
|
|
582
|
-
<span class='id identifier rubyid_help_name'>help_name</span> <span class='op'>=</span> <span class='id identifier rubyid_args'>args</span><span class='lbracket'>[</span><span class='int'>0</span><span class='rbracket'>]</span>
|
|
583
|
-
<span class='const'><span class='object_link'><a href="Modify.html" title="MyHelp::Modify (class)">Modify</a></span></span><span class='period'>.</span><span class='id identifier rubyid_new'><span class='object_link'><a href="Modify.html#new-instance_method" title="MyHelp::Modify#new (method)">new</a></span></span><span class='lparen'>(</span><span class='id identifier rubyid_c'>c</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_edit'>edit</span><span class='lparen'>(</span><span class='id identifier rubyid_help_name'>help_name</span><span class='rparen'>)</span>
|
|
584
|
-
<span class='kw'>end</span></pre>
|
|
585
|
-
</td>
|
|
586
|
-
</tr>
|
|
587
|
-
</table>
|
|
588
|
-
</div>
|
|
589
|
-
|
|
590
|
-
<div class="method_details ">
|
|
591
|
-
<h3 class="signature " id="hello-instance_method">
|
|
592
|
-
|
|
593
|
-
#<strong>hello</strong> ⇒ <tt>Object</tt>
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
</h3><table class="source_code">
|
|
600
|
-
<tr>
|
|
601
|
-
<td>
|
|
602
|
-
<pre class="lines">
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
138
|
|
606
|
-
139
|
|
607
|
-
140
|
|
608
|
-
141</pre>
|
|
609
|
-
</td>
|
|
610
|
-
<td>
|
|
611
|
-
<pre class="code"><span class="info file"># File 'lib/my_help/cli.rb', line 138</span>
|
|
612
|
-
|
|
613
|
-
<span class='kw'>def</span> <span class='id identifier rubyid_hello'>hello</span>
|
|
614
|
-
<span class='id identifier rubyid_name'>name</span> <span class='op'>=</span> <span class='gvar'>$stdin</span><span class='period'>.</span><span class='id identifier rubyid_gets'>gets</span><span class='period'>.</span><span class='id identifier rubyid_chomp'>chomp</span>
|
|
615
|
-
<span class='id identifier rubyid_puts'>puts</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>Hello </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_name'>name</span><span class='embexpr_end'>}</span><span class='tstring_content'>.</span><span class='tstring_end'>"</span></span><span class='rparen'>)</span>
|
|
616
|
-
<span class='kw'>end</span></pre>
|
|
617
|
-
</td>
|
|
618
|
-
</tr>
|
|
619
|
-
</table>
|
|
620
|
-
</div>
|
|
621
|
-
|
|
622
|
-
<div class="method_details ">
|
|
623
|
-
<h3 class="signature " id="init-instance_method">
|
|
624
|
-
|
|
625
|
-
#<strong>init</strong>(*args) ⇒ <tt>Object</tt>
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
</h3><table class="source_code">
|
|
632
|
-
<tr>
|
|
633
|
-
<td>
|
|
634
|
-
<pre class="lines">
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
47
|
|
638
|
-
48
|
|
639
|
-
49
|
|
640
|
-
50
|
|
641
|
-
51
|
|
642
|
-
52
|
|
643
|
-
53
|
|
644
|
-
54
|
|
645
|
-
55
|
|
646
|
-
56
|
|
647
|
-
57
|
|
648
|
-
58
|
|
649
|
-
59
|
|
650
|
-
60</pre>
|
|
651
|
-
</td>
|
|
652
|
-
<td>
|
|
653
|
-
<pre class="code"><span class="info file"># File 'lib/my_help/cli.rb', line 47</span>
|
|
654
|
-
|
|
655
|
-
<span class='kw'>def</span> <span class='id identifier rubyid_init'>init</span><span class='lparen'>(</span><span class='op'>*</span><span class='id identifier rubyid_args'>args</span><span class='rparen'>)</span>
|
|
656
|
-
<span class='id identifier rubyid_config'>config</span> <span class='op'>=</span> <span class='id identifier rubyid_get_config'>get_config</span> <span class='comment'># for using methods in Config
|
|
657
|
-
</span>
|
|
658
|
-
<span class='comment'>#config.ask_default
|
|
659
|
-
</span> <span class='id identifier rubyid_init'>init</span> <span class='op'>=</span> <span class='const'><span class='object_link'><a href="Init.html" title="MyHelp::Init (class)">Init</a></span></span><span class='period'>.</span><span class='id identifier rubyid_new'><span class='object_link'><a href="Init.html#initialize-instance_method" title="MyHelp::Init#initialize (method)">new</a></span></span><span class='lparen'>(</span><span class='id identifier rubyid_config'>config</span><span class='rparen'>)</span>
|
|
660
|
-
<span class='id identifier rubyid_raise'>raise</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>Local help dir exist.</span><span class='tstring_end'>"</span></span> <span class='kw'>if</span> <span class='id identifier rubyid_init'>init</span><span class='period'>.</span><span class='id identifier rubyid_help_dir_exist?'>help_dir_exist?</span>
|
|
661
|
-
<span class='id identifier rubyid_puts'>puts</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>Choose default markup '.org' [Y or .md]? </span><span class='tstring_end'>"</span></span>
|
|
662
|
-
<span class='id identifier rubyid_response'>response</span> <span class='op'>=</span> <span class='gvar'>$stdin</span><span class='period'>.</span><span class='id identifier rubyid_gets'>gets</span><span class='period'>.</span><span class='id identifier rubyid_chomp'>chomp</span>
|
|
663
|
-
<span class='id identifier rubyid_config'>config</span><span class='period'>.</span><span class='id identifier rubyid_configure'>configure</span><span class='lparen'>(</span><span class='symbol'>:ext</span> <span class='op'>=></span> <span class='id identifier rubyid_response'>response</span><span class='rparen'>)</span> <span class='kw'>unless</span> <span class='id identifier rubyid_response'>response</span><span class='period'>.</span><span class='id identifier rubyid_upcase'>upcase</span><span class='lbracket'>[</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'>Y</span><span class='tstring_end'>"</span></span>
|
|
664
|
-
<span class='id identifier rubyid_init'>init</span><span class='period'>.</span><span class='id identifier rubyid_mk_help_dir'>mk_help_dir</span>
|
|
665
|
-
<span class='id identifier rubyid_config'>config</span><span class='period'>.</span><span class='id identifier rubyid_save_config'>save_config</span>
|
|
666
|
-
<span class='id identifier rubyid_init'>init</span><span class='period'>.</span><span class='id identifier rubyid_cp_templates'>cp_templates</span>
|
|
667
|
-
<span class='id identifier rubyid_puts'>puts</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>If you want change editor use my_help set editor code.</span><span class='tstring_end'>"</span></span>
|
|
668
|
-
<span class='kw'>end</span></pre>
|
|
669
|
-
</td>
|
|
670
|
-
</tr>
|
|
671
|
-
</table>
|
|
672
|
-
</div>
|
|
673
|
-
|
|
674
|
-
<div class="method_details ">
|
|
675
|
-
<h3 class="signature " id="list-instance_method">
|
|
676
|
-
|
|
677
|
-
#<strong>list</strong>(*args) ⇒ <tt>Object</tt>
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
</h3><div class="docstring">
|
|
684
|
-
<div class="discussion">
|
|
685
|
-
|
|
686
|
-
<p>use method_options [[<a href="https://github.com/rails/thor/wiki/Method-Options">github.com/rails/thor/wiki/Method-Options</a>]]</p>
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
</div>
|
|
690
|
-
</div>
|
|
691
|
-
<div class="tags">
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
</div><table class="source_code">
|
|
695
|
-
<tr>
|
|
696
|
-
<td>
|
|
697
|
-
<pre class="lines">
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
79
|
|
701
|
-
80
|
|
702
|
-
81
|
|
703
|
-
82
|
|
704
|
-
83
|
|
705
|
-
84
|
|
706
|
-
85
|
|
707
|
-
86</pre>
|
|
708
|
-
</td>
|
|
709
|
-
<td>
|
|
710
|
-
<pre class="code"><span class="info file"># File 'lib/my_help/cli.rb', line 79</span>
|
|
711
|
-
|
|
712
|
-
<span class='kw'>def</span> <span class='id identifier rubyid_list'>list</span><span class='lparen'>(</span><span class='op'>*</span><span class='id identifier rubyid_args'>args</span><span class='rparen'>)</span>
|
|
713
|
-
<span class='id identifier rubyid_config'>config</span> <span class='op'>=</span> <span class='id identifier rubyid_get_config'>get_config</span>
|
|
714
|
-
<span class='id identifier rubyid_help_dir'>help_dir</span> <span class='op'>=</span> <span class='id identifier rubyid_options'>options</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>help_dir</span><span class='tstring_end'>"</span></span><span class='rbracket'>]</span> <span class='op'>||</span> <span class='id identifier rubyid_config'>config</span><span class='lbracket'>[</span><span class='symbol'>:local_help_dir</span><span class='rbracket'>]</span>
|
|
715
|
-
<span class='id identifier rubyid_layer'>layer</span> <span class='op'>=</span> <span class='id identifier rubyid_options'>options</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>layer</span><span class='tstring_end'>"</span></span><span class='rbracket'>]</span> <span class='op'>||</span> <span class='int'>1</span>
|
|
716
|
-
<span class='id identifier rubyid_puts'>puts</span> <span class='const'><span class='object_link'><a href="List.html" title="MyHelp::List (class)">List</a></span></span><span class='period'>.</span><span class='id identifier rubyid_new'><span class='object_link'><a href="List.html#initialize-instance_method" title="MyHelp::List#initialize (method)">new</a></span></span><span class='lparen'>(</span><span class='id identifier rubyid_help_dir'>help_dir</span><span class='comma'>,</span>
|
|
717
|
-
<span class='id identifier rubyid_config'>config</span><span class='lbracket'>[</span><span class='symbol'>:ext</span><span class='rbracket'>]</span><span class='comma'>,</span>
|
|
718
|
-
<span class='id identifier rubyid_layer'>layer</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_list'><span class='object_link'><a href="List.html#list-instance_method" title="MyHelp::List#list (method)">list</a></span></span><span class='lparen'>(</span><span class='op'>*</span><span class='id identifier rubyid_args'>args</span><span class='period'>.</span><span class='id identifier rubyid_join'>join</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'> </span><span class='tstring_end'>"</span></span><span class='rparen'>)</span><span class='rparen'>)</span>
|
|
719
|
-
<span class='kw'>end</span></pre>
|
|
720
|
-
</td>
|
|
721
|
-
</tr>
|
|
722
|
-
</table>
|
|
723
|
-
</div>
|
|
724
|
-
|
|
725
|
-
<div class="method_details ">
|
|
726
|
-
<h3 class="signature " id="new-instance_method">
|
|
727
|
-
|
|
728
|
-
#<strong>new</strong>(*args) ⇒ <tt>Object</tt>
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
</h3><table class="source_code">
|
|
735
|
-
<tr>
|
|
736
|
-
<td>
|
|
737
|
-
<pre class="lines">
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
98
|
|
741
|
-
99
|
|
742
|
-
100
|
|
743
|
-
101
|
|
744
|
-
102
|
|
745
|
-
103
|
|
746
|
-
104</pre>
|
|
747
|
-
</td>
|
|
748
|
-
<td>
|
|
749
|
-
<pre class="code"><span class="info file"># File 'lib/my_help/cli.rb', line 98</span>
|
|
750
|
-
|
|
751
|
-
<span class='kw'>def</span> <span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='op'>*</span><span class='id identifier rubyid_args'>args</span><span class='rparen'>)</span>
|
|
752
|
-
<span class='id identifier rubyid_c'>c</span> <span class='op'>=</span> <span class='id identifier rubyid_get_config'>get_config</span>
|
|
753
|
-
<span class='id identifier rubyid_help_name'>help_name</span> <span class='op'>=</span> <span class='id identifier rubyid_args'>args</span><span class='lbracket'>[</span><span class='int'>0</span><span class='rbracket'>]</span>
|
|
754
|
-
<span class='id identifier rubyid_help_file'>help_file</span> <span class='op'>=</span> <span class='const'>File</span><span class='period'>.</span><span class='id identifier rubyid_join'>join</span><span class='lparen'>(</span><span class='id identifier rubyid_c'>c</span><span class='lbracket'>[</span><span class='symbol'>:local_help_dir</span><span class='rbracket'>]</span><span class='comma'>,</span> <span class='id identifier rubyid_help_name'>help_name</span> <span class='op'>+</span> <span class='id identifier rubyid_c'>c</span><span class='lbracket'>[</span><span class='symbol'>:ext</span><span class='rbracket'>]</span><span class='rparen'>)</span>
|
|
755
|
-
<span class='const'><span class='object_link'><a href="Modify.html" title="MyHelp::Modify (class)">Modify</a></span></span><span class='period'>.</span><span class='id identifier rubyid_new'><span class='object_link'><a href="Modify.html#new-instance_method" title="MyHelp::Modify#new (method)">new</a></span></span><span class='lparen'>(</span><span class='id identifier rubyid_c'>c</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='id identifier rubyid_help_file'>help_file</span><span class='rparen'>)</span>
|
|
756
|
-
<span class='comment'># puts res.stdout
|
|
757
|
-
</span><span class='kw'>end</span></pre>
|
|
758
|
-
</td>
|
|
759
|
-
</tr>
|
|
760
|
-
</table>
|
|
761
|
-
</div>
|
|
762
|
-
|
|
763
|
-
<div class="method_details ">
|
|
764
|
-
<h3 class="signature " id="place-instance_method">
|
|
765
|
-
|
|
766
|
-
#<strong>place</strong>(*args) ⇒ <tt>Object</tt>
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
</h3><table class="source_code">
|
|
773
|
-
<tr>
|
|
774
|
-
<td>
|
|
775
|
-
<pre class="lines">
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
108
|
|
779
|
-
109
|
|
780
|
-
110
|
|
781
|
-
111
|
|
782
|
-
112
|
|
783
|
-
113
|
|
784
|
-
114
|
|
785
|
-
115
|
|
786
|
-
116
|
|
787
|
-
117
|
|
788
|
-
118
|
|
789
|
-
119</pre>
|
|
790
|
-
</td>
|
|
791
|
-
<td>
|
|
792
|
-
<pre class="code"><span class="info file"># File 'lib/my_help/cli.rb', line 108</span>
|
|
793
|
-
|
|
794
|
-
<span class='kw'>def</span> <span class='id identifier rubyid_place'>place</span><span class='lparen'>(</span><span class='op'>*</span><span class='id identifier rubyid_args'>args</span><span class='rparen'>)</span>
|
|
795
|
-
<span class='id identifier rubyid_config'>config</span> <span class='op'>=</span> <span class='id identifier rubyid_get_config'>get_config</span>
|
|
796
|
-
<span class='id identifier rubyid_p'>p</span> <span class='id identifier rubyid_help_name'>help_name</span> <span class='op'>=</span> <span class='const'>File</span><span class='period'>.</span><span class='id identifier rubyid_basename'>basename</span><span class='lparen'>(</span> <span class='lparen'>(</span><span class='id identifier rubyid_args'>args</span><span class='lbracket'>[</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'>template.org</span><span class='tstring_end'>'</span></span><span class='rparen'>)</span><span class='comma'>,</span>
|
|
797
|
-
<span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>.org</span><span class='tstring_end'>'</span></span><span class='rparen'>)</span>
|
|
798
|
-
<span class='id identifier rubyid_t_file'>t_file</span> <span class='op'>=</span> <span class='const'>File</span><span class='period'>.</span><span class='id identifier rubyid_join'>join</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>.</span><span class='tstring_end'>'</span></span><span class='comma'>,</span> <span class='id identifier rubyid_help_name'>help_name</span><span class='op'>+</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>.org</span><span class='tstring_end'>"</span></span><span class='rparen'>)</span>
|
|
799
|
-
<span class='kw'>if</span> <span class='const'>File</span><span class='period'>.</span><span class='id identifier rubyid_exist?'>exist?</span><span class='lparen'>(</span><span class='id identifier rubyid_t_file'>t_file</span><span class='rparen'>)</span>
|
|
800
|
-
<span class='id identifier rubyid_puts'>puts</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>File </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_t_file'>t_file</span><span class='embexpr_end'>}</span><span class='tstring_content'> exists, set file_name.</span><span class='tstring_end'>"</span></span>
|
|
801
|
-
<span class='kw'>else</span>
|
|
802
|
-
<span class='const'>FileUtils</span><span class='period'>.</span><span class='id identifier rubyid_cp'>cp</span><span class='lparen'>(</span><span class='const'>File</span><span class='period'>.</span><span class='id identifier rubyid_join'>join</span><span class='lparen'>(</span><span class='id identifier rubyid_config'>config</span><span class='lbracket'>[</span><span class='symbol'>:template_dir</span><span class='rbracket'>]</span><span class='comma'>,</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>template.org</span><span class='tstring_end'>'</span></span><span class='rparen'>)</span><span class='comma'>,</span>
|
|
803
|
-
<span class='id identifier rubyid_t_file'>t_file</span><span class='comma'>,</span> <span class='label'>verbose:</span> <span class='kw'>true</span><span class='rparen'>)</span>
|
|
804
|
-
<span class='kw'>end</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
|
-
#<strong>set</strong>(*args) ⇒ <tt>Object</tt>
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
</h3><table class="source_code">
|
|
821
|
-
<tr>
|
|
822
|
-
<td>
|
|
823
|
-
<pre class="lines">
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
64
|
|
827
|
-
65
|
|
828
|
-
66
|
|
829
|
-
67
|
|
830
|
-
68
|
|
831
|
-
69
|
|
832
|
-
70
|
|
833
|
-
71
|
|
834
|
-
72</pre>
|
|
835
|
-
</td>
|
|
836
|
-
<td>
|
|
837
|
-
<pre class="code"><span class="info file"># File 'lib/my_help/cli.rb', line 64</span>
|
|
838
|
-
|
|
839
|
-
<span class='kw'>def</span> <span class='id identifier rubyid_set'>set</span><span class='lparen'>(</span><span class='op'>*</span><span class='id identifier rubyid_args'>args</span><span class='rparen'>)</span>
|
|
840
|
-
<span class='id identifier rubyid_config'>config</span> <span class='op'>=</span> <span class='id identifier rubyid_get_config'>get_config</span> <span class='comment'># for using methods in Config
|
|
841
|
-
</span> <span class='id identifier rubyid_key'>key</span> <span class='op'>=</span> <span class='id identifier rubyid_args'>args</span><span class='lbracket'>[</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_end'>"</span></span>
|
|
842
|
-
<span class='id identifier rubyid_config'>config</span><span class='period'>.</span><span class='id identifier rubyid_configure'>configure</span><span class='lparen'>(</span><span class='id identifier rubyid_key'>key</span><span class='period'>.</span><span class='id identifier rubyid_to_sym'>to_sym</span> <span class='op'>=></span> <span class='id identifier rubyid_args'>args</span><span class='lbracket'>[</span><span class='int'>1</span><span class='rbracket'>]</span><span class='rparen'>)</span>
|
|
843
|
-
<span class='id identifier rubyid_config'>config</span><span class='period'>.</span><span class='id identifier rubyid_save_config'>save_config</span>
|
|
844
|
-
<span class='id identifier rubyid_conf_file_path'>conf_file_path</span> <span class='op'>=</span> <span class='id identifier rubyid_config'>config</span><span class='lbracket'>[</span><span class='symbol'>:conf_file</span><span class='rbracket'>]</span>
|
|
845
|
-
<span class='id identifier rubyid_puts'>puts</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>conf_file_path: %s</span><span class='tstring_end'>"</span></span> <span class='op'>%</span> <span class='id identifier rubyid_conf_file_path'>conf_file_path</span>
|
|
846
|
-
<span class='id identifier rubyid_puts'>puts</span> <span class='const'>File</span><span class='period'>.</span><span class='id identifier rubyid_read'>read</span><span class='lparen'>(</span><span class='id identifier rubyid_conf_file_path'>conf_file_path</span><span class='rparen'>)</span>
|
|
847
|
-
<span class='kw'>end</span></pre>
|
|
848
|
-
</td>
|
|
849
|
-
</tr>
|
|
850
|
-
</table>
|
|
851
|
-
</div>
|
|
852
|
-
|
|
853
|
-
<div class="method_details ">
|
|
854
|
-
<h3 class="signature " id="version-instance_method">
|
|
855
|
-
|
|
856
|
-
#<strong>version</strong> ⇒ <tt>Object</tt>
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
</h3><table class="source_code">
|
|
863
|
-
<tr>
|
|
864
|
-
<td>
|
|
865
|
-
<pre class="lines">
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
20
|
|
869
|
-
21
|
|
870
|
-
22</pre>
|
|
871
|
-
</td>
|
|
872
|
-
<td>
|
|
873
|
-
<pre class="code"><span class="info file"># File 'lib/my_help/cli.rb', line 20</span>
|
|
874
|
-
|
|
875
|
-
<span class='kw'>def</span> <span class='id identifier rubyid_version'>version</span>
|
|
876
|
-
<span class='id identifier rubyid_puts'>puts</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>my_help </span><span class='embexpr_beg'>#{</span><span class='const'><span class='object_link'><a href="../MyHelp.html#VERSION-constant" title="MyHelp::VERSION (constant)">VERSION</a></span></span><span class='embexpr_end'>}</span><span class='tstring_end'>"</span></span>
|
|
877
|
-
<span class='kw'>end</span></pre>
|
|
878
|
-
</td>
|
|
879
|
-
</tr>
|
|
880
|
-
</table>
|
|
881
|
-
</div>
|
|
882
|
-
|
|
883
|
-
</div>
|
|
884
|
-
|
|
885
|
-
</div>
|
|
886
|
-
|
|
887
|
-
<div id="footer">
|
|
888
|
-
Generated on Tue Oct 15 12:36:20 2024 by
|
|
889
|
-
<a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
|
890
|
-
0.9.37 (ruby-3.0.2).
|
|
891
|
-
</div>
|
|
892
|
-
|
|
893
|
-
</div>
|
|
894
|
-
</body>
|
|
895
|
-
</html>
|