my_help 1.2.3 → 1.2.4p1

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,751 @@
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
+ &mdash; 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> &raquo;
40
+ <span class='title'><span class='object_link'><a href="../MyHelp.html" title="MyHelp (module)">MyHelp</a></span></span>
41
+ &raquo;
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> &#x21d2; 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="#delete-instance_method" title="#delete (instance method)">#<strong>delete</strong>(*args) &#x21d2; 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="#edit-instance_method" title="#edit (instance method)">#<strong>edit</strong>(*args) &#x21d2; 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="#hello-instance_method" title="#hello (instance method)">#<strong>hello</strong> &#x21d2; 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="#init-instance_method" title="#init (instance method)">#<strong>init</strong>(*args) &#x21d2; 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="#list-instance_method" title="#list (instance method)">#<strong>list</strong>(*args) &#x21d2; Object </a>
247
+
248
+
249
+
250
+ </span>
251
+
252
+
253
+
254
+
255
+
256
+
257
+
258
+
259
+
260
+ <span class="summary_desc"><div class='inline'>
261
+ <p>use method_options [[<a href="https://github.com/rails/thor/wiki/Method-Options">github.com/rails/thor/wiki/Method-Options</a>]].</p>
262
+ </div></span>
263
+
264
+ </li>
265
+
266
+
267
+ <li class="public ">
268
+ <span class="summary_signature">
269
+
270
+ <a href="#new-instance_method" title="#new (instance method)">#<strong>new</strong>(*args) &#x21d2; Object </a>
271
+
272
+
273
+
274
+ </span>
275
+
276
+
277
+
278
+
279
+
280
+
281
+
282
+
283
+
284
+ <span class="summary_desc"><div class='inline'></div></span>
285
+
286
+ </li>
287
+
288
+
289
+ <li class="public ">
290
+ <span class="summary_signature">
291
+
292
+ <a href="#set-instance_method" title="#set (instance method)">#<strong>set</strong>(*args) &#x21d2; 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="#version-instance_method" title="#version (instance method)">#<strong>version</strong> &#x21d2; 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
+ </ul>
334
+
335
+
336
+
337
+
338
+
339
+
340
+
341
+
342
+
343
+
344
+
345
+ <h3 class="inherited">Methods included from <span class='object_link'><a href="GetConfig.html" title="MyHelp::GetConfig (module)">GetConfig</a></span></h3>
346
+ <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>
347
+
348
+
349
+
350
+ <div id="class_method_details" class="method_details_list">
351
+ <h2>Class Method Details</h2>
352
+
353
+
354
+ <div class="method_details first">
355
+ <h3 class="signature first" id="exit_on_failure?-class_method">
356
+
357
+ .<strong>exit_on_failure?</strong> &#x21d2; <tt>Boolean</tt>
358
+
359
+
360
+
361
+
362
+
363
+ </h3><div class="docstring">
364
+ <div class="discussion">
365
+
366
+
367
+ </div>
368
+ </div>
369
+ <div class="tags">
370
+
371
+ <p class="tag_title">Returns:</p>
372
+ <ul class="return">
373
+
374
+ <li>
375
+
376
+
377
+ <span class='type'>(<tt>Boolean</tt>)</span>
378
+
379
+
380
+
381
+ </li>
382
+
383
+ </ul>
384
+
385
+ </div><table class="source_code">
386
+ <tr>
387
+ <td>
388
+ <pre class="lines">
389
+
390
+
391
+ 11
392
+ 12
393
+ 13</pre>
394
+ </td>
395
+ <td>
396
+ <pre class="code"><span class="info file"># File 'lib/my_help/cli.rb', line 11</span>
397
+
398
+ <span class='kw'>def</span> <span class='id identifier rubyid_exit_on_failure?'>exit_on_failure?</span>
399
+ <span class='kw'>true</span>
400
+ <span class='kw'>end</span></pre>
401
+ </td>
402
+ </tr>
403
+ </table>
404
+ </div>
405
+
406
+ </div>
407
+
408
+ <div id="instance_method_details" class="method_details_list">
409
+ <h2>Instance Method Details</h2>
410
+
411
+
412
+ <div class="method_details first">
413
+ <h3 class="signature first" id="delete-instance_method">
414
+
415
+ #<strong>delete</strong>(*args) &#x21d2; <tt>Object</tt>
416
+
417
+
418
+
419
+
420
+
421
+ </h3><table class="source_code">
422
+ <tr>
423
+ <td>
424
+ <pre class="lines">
425
+
426
+
427
+ 91
428
+ 92
429
+ 93
430
+ 94
431
+ 95
432
+ 96
433
+ 97
434
+ 98
435
+ 99
436
+ 100
437
+ 101
438
+ 102</pre>
439
+ </td>
440
+ <td>
441
+ <pre class="code"><span class="info file"># File 'lib/my_help/cli.rb', line 91</span>
442
+
443
+ <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>
444
+ <span class='id identifier rubyid_c'>c</span> <span class='op'>=</span> <span class='id identifier rubyid_get_config'>get_config</span>
445
+ <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>
446
+ <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>
447
+ <span class='id identifier rubyid_puts'>puts</span> <span class='tstring'><span class='tstring_beg'>&quot;</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'>&quot;</span></span>
448
+ <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>
449
+ <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'>&quot;</span><span class='tstring_content'>Y</span><span class='tstring_end'>&quot;</span></span>
450
+ <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>
451
+ <span class='kw'>else</span>
452
+ <span class='id identifier rubyid_puts'>puts</span> <span class='tstring'><span class='tstring_beg'>&quot;</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'>&quot;</span></span>
453
+ <span class='kw'>end</span>
454
+ <span class='kw'>end</span></pre>
455
+ </td>
456
+ </tr>
457
+ </table>
458
+ </div>
459
+
460
+ <div class="method_details ">
461
+ <h3 class="signature " id="edit-instance_method">
462
+
463
+ #<strong>edit</strong>(*args) &#x21d2; <tt>Object</tt>
464
+
465
+
466
+
467
+
468
+
469
+ </h3><table class="source_code">
470
+ <tr>
471
+ <td>
472
+ <pre class="lines">
473
+
474
+
475
+ 73
476
+ 74
477
+ 75
478
+ 76
479
+ 77</pre>
480
+ </td>
481
+ <td>
482
+ <pre class="code"><span class="info file"># File 'lib/my_help/cli.rb', line 73</span>
483
+
484
+ <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>
485
+ <span class='id identifier rubyid_c'>c</span> <span class='op'>=</span> <span class='id identifier rubyid_get_config'>get_config</span>
486
+ <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>
487
+ <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>
488
+ <span class='kw'>end</span></pre>
489
+ </td>
490
+ </tr>
491
+ </table>
492
+ </div>
493
+
494
+ <div class="method_details ">
495
+ <h3 class="signature " id="hello-instance_method">
496
+
497
+ #<strong>hello</strong> &#x21d2; <tt>Object</tt>
498
+
499
+
500
+
501
+
502
+
503
+ </h3><table class="source_code">
504
+ <tr>
505
+ <td>
506
+ <pre class="lines">
507
+
508
+
509
+ 106
510
+ 107
511
+ 108
512
+ 109</pre>
513
+ </td>
514
+ <td>
515
+ <pre class="code"><span class="info file"># File 'lib/my_help/cli.rb', line 106</span>
516
+
517
+ <span class='kw'>def</span> <span class='id identifier rubyid_hello'>hello</span>
518
+ <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>
519
+ <span class='id identifier rubyid_puts'>puts</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</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'>&quot;</span></span><span class='rparen'>)</span>
520
+ <span class='kw'>end</span></pre>
521
+ </td>
522
+ </tr>
523
+ </table>
524
+ </div>
525
+
526
+ <div class="method_details ">
527
+ <h3 class="signature " id="init-instance_method">
528
+
529
+ #<strong>init</strong>(*args) &#x21d2; <tt>Object</tt>
530
+
531
+
532
+
533
+
534
+
535
+ </h3><table class="source_code">
536
+ <tr>
537
+ <td>
538
+ <pre class="lines">
539
+
540
+
541
+ 31
542
+ 32
543
+ 33
544
+ 34
545
+ 35
546
+ 36
547
+ 37
548
+ 38
549
+ 39
550
+ 40
551
+ 41
552
+ 42
553
+ 43
554
+ 44</pre>
555
+ </td>
556
+ <td>
557
+ <pre class="code"><span class="info file"># File 'lib/my_help/cli.rb', line 31</span>
558
+
559
+ <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>
560
+ <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
561
+ </span>
562
+ <span class='comment'>#config.ask_default
563
+ </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>
564
+ <span class='id identifier rubyid_raise'>raise</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>Local help dir exist.</span><span class='tstring_end'>&quot;</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>
565
+ <span class='id identifier rubyid_puts'>puts</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>Choose default markup &#39;.org&#39; [Y or .md]? </span><span class='tstring_end'>&quot;</span></span>
566
+ <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>
567
+ <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'>=&gt;</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'>&quot;</span><span class='tstring_content'>Y</span><span class='tstring_end'>&quot;</span></span>
568
+ <span class='id identifier rubyid_init'>init</span><span class='period'>.</span><span class='id identifier rubyid_mk_help_dir'>mk_help_dir</span>
569
+ <span class='id identifier rubyid_config'>config</span><span class='period'>.</span><span class='id identifier rubyid_save_config'>save_config</span>
570
+ <span class='id identifier rubyid_init'>init</span><span class='period'>.</span><span class='id identifier rubyid_cp_templates'>cp_templates</span>
571
+ <span class='id identifier rubyid_puts'>puts</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>If you want change editor use my_help set editor code.</span><span class='tstring_end'>&quot;</span></span>
572
+ <span class='kw'>end</span></pre>
573
+ </td>
574
+ </tr>
575
+ </table>
576
+ </div>
577
+
578
+ <div class="method_details ">
579
+ <h3 class="signature " id="list-instance_method">
580
+
581
+ #<strong>list</strong>(*args) &#x21d2; <tt>Object</tt>
582
+
583
+
584
+
585
+
586
+
587
+ </h3><div class="docstring">
588
+ <div class="discussion">
589
+
590
+ <p>use method_options [[<a href="https://github.com/rails/thor/wiki/Method-Options">github.com/rails/thor/wiki/Method-Options</a>]]</p>
591
+
592
+
593
+ </div>
594
+ </div>
595
+ <div class="tags">
596
+
597
+
598
+ </div><table class="source_code">
599
+ <tr>
600
+ <td>
601
+ <pre class="lines">
602
+
603
+
604
+ 62
605
+ 63
606
+ 64
607
+ 65
608
+ 66
609
+ 67
610
+ 68
611
+ 69</pre>
612
+ </td>
613
+ <td>
614
+ <pre class="code"><span class="info file"># File 'lib/my_help/cli.rb', line 62</span>
615
+
616
+ <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>
617
+ <span class='id identifier rubyid_config'>config</span> <span class='op'>=</span> <span class='id identifier rubyid_get_config'>get_config</span>
618
+ <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'>&quot;</span><span class='tstring_content'>help_dir</span><span class='tstring_end'>&quot;</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>
619
+ <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'>&quot;</span><span class='tstring_content'>layer</span><span class='tstring_end'>&quot;</span></span><span class='rbracket'>]</span> <span class='op'>||</span> <span class='int'>1</span>
620
+ <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>
621
+ <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>
622
+ <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'>&quot;</span><span class='tstring_content'> </span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span><span class='rparen'>)</span>
623
+ <span class='kw'>end</span></pre>
624
+ </td>
625
+ </tr>
626
+ </table>
627
+ </div>
628
+
629
+ <div class="method_details ">
630
+ <h3 class="signature " id="new-instance_method">
631
+
632
+ #<strong>new</strong>(*args) &#x21d2; <tt>Object</tt>
633
+
634
+
635
+
636
+
637
+
638
+ </h3><table class="source_code">
639
+ <tr>
640
+ <td>
641
+ <pre class="lines">
642
+
643
+
644
+ 81
645
+ 82
646
+ 83
647
+ 84
648
+ 85
649
+ 86
650
+ 87</pre>
651
+ </td>
652
+ <td>
653
+ <pre class="code"><span class="info file"># File 'lib/my_help/cli.rb', line 81</span>
654
+
655
+ <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>
656
+ <span class='id identifier rubyid_c'>c</span> <span class='op'>=</span> <span class='id identifier rubyid_get_config'>get_config</span>
657
+ <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>
658
+ <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>
659
+ <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>
660
+ <span class='comment'># puts res.stdout
661
+ </span><span class='kw'>end</span></pre>
662
+ </td>
663
+ </tr>
664
+ </table>
665
+ </div>
666
+
667
+ <div class="method_details ">
668
+ <h3 class="signature " id="set-instance_method">
669
+
670
+ #<strong>set</strong>(*args) &#x21d2; <tt>Object</tt>
671
+
672
+
673
+
674
+
675
+
676
+ </h3><table class="source_code">
677
+ <tr>
678
+ <td>
679
+ <pre class="lines">
680
+
681
+
682
+ 48
683
+ 49
684
+ 50
685
+ 51
686
+ 52
687
+ 53
688
+ 54
689
+ 55
690
+ 56</pre>
691
+ </td>
692
+ <td>
693
+ <pre class="code"><span class="info file"># File 'lib/my_help/cli.rb', line 48</span>
694
+
695
+ <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>
696
+ <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
697
+ </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'>&quot;</span><span class='tstring_end'>&quot;</span></span>
698
+ <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'>=&gt;</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>
699
+ <span class='id identifier rubyid_config'>config</span><span class='period'>.</span><span class='id identifier rubyid_save_config'>save_config</span>
700
+ <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>
701
+ <span class='id identifier rubyid_puts'>puts</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>conf_file_path: %s</span><span class='tstring_end'>&quot;</span></span> <span class='op'>%</span> <span class='id identifier rubyid_conf_file_path'>conf_file_path</span>
702
+ <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>
703
+ <span class='kw'>end</span></pre>
704
+ </td>
705
+ </tr>
706
+ </table>
707
+ </div>
708
+
709
+ <div class="method_details ">
710
+ <h3 class="signature " id="version-instance_method">
711
+
712
+ #<strong>version</strong> &#x21d2; <tt>Object</tt>
713
+
714
+
715
+
716
+
717
+
718
+ </h3><table class="source_code">
719
+ <tr>
720
+ <td>
721
+ <pre class="lines">
722
+
723
+
724
+ 22
725
+ 23
726
+ 24</pre>
727
+ </td>
728
+ <td>
729
+ <pre class="code"><span class="info file"># File 'lib/my_help/cli.rb', line 22</span>
730
+
731
+ <span class='kw'>def</span> <span class='id identifier rubyid_version'>version</span>
732
+ <span class='id identifier rubyid_print'>print</span> <span class='tstring'><span class='tstring_beg'>&quot;</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'>&quot;</span></span>
733
+ <span class='kw'>end</span></pre>
734
+ </td>
735
+ </tr>
736
+ </table>
737
+ </div>
738
+
739
+ </div>
740
+
741
+ </div>
742
+
743
+ <div id="footer">
744
+ Generated on Thu Sep 26 14:20:52 2024 by
745
+ <a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
746
+ 0.9.36 (ruby-3.0.2).
747
+ </div>
748
+
749
+ </div>
750
+ </body>
751
+ </html>