my_help 1.2.9 → 1.2.10
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.yardoc/checksums +6 -6
- data/.yardoc/object_types +0 -0
- data/.yardoc/objects/root.dat +0 -0
- data/Gemfile.lock +28 -1
- data/doc/MyHelp/CLI.html +218 -74
- data/doc/MyHelp/Config.html +108 -42
- data/doc/MyHelp/Error.html +2 -2
- data/doc/MyHelp/GetConfig.html +6 -4
- data/doc/MyHelp/Git.html +8 -8
- data/doc/MyHelp/Init.html +2 -2
- data/doc/MyHelp/List.html +121 -56
- data/doc/MyHelp/Md2Hash.html +2 -2
- data/doc/MyHelp/Modify.html +2 -2
- data/doc/MyHelp/Org2Hash.html +14 -4
- data/doc/MyHelp.html +3 -3
- data/doc/Org2Yaml.html +2 -2
- data/doc/_index.html +2 -2
- data/doc/class_list.html +6 -3
- data/doc/css/full_list.css +3 -3
- data/doc/css/style.css +6 -0
- data/doc/file.README.html +2 -2
- data/doc/file_list.html +5 -2
- data/doc/index.html +2 -2
- data/doc/js/app.js +294 -264
- data/doc/js/full_list.js +30 -4
- data/doc/js/jquery.js +2 -4
- data/doc/method_list.html +63 -28
- data/doc/top-level-namespace.html +2 -2
- data/lib/my_help/cli.rb +13 -0
- data/lib/my_help/list.rb +18 -7
- data/lib/my_help/version.rb +1 -1
- metadata +3 -3
data/doc/MyHelp/Config.html
CHANGED
@@ -205,6 +205,28 @@
|
|
205
205
|
|
206
206
|
|
207
207
|
|
208
|
+
<span class="summary_desc"><div class='inline'></div></span>
|
209
|
+
|
210
|
+
</li>
|
211
|
+
|
212
|
+
|
213
|
+
<li class="public ">
|
214
|
+
<span class="summary_signature">
|
215
|
+
|
216
|
+
<a href="#check_template_dir-instance_method" title="#check_template_dir (instance method)">#<strong>check_template_dir</strong> ⇒ Object </a>
|
217
|
+
|
218
|
+
|
219
|
+
|
220
|
+
</span>
|
221
|
+
|
222
|
+
|
223
|
+
|
224
|
+
|
225
|
+
|
226
|
+
|
227
|
+
|
228
|
+
|
229
|
+
|
208
230
|
<span class="summary_desc"><div class='inline'></div></span>
|
209
231
|
|
210
232
|
</li>
|
@@ -355,7 +377,8 @@
|
|
355
377
|
21
|
356
378
|
22
|
357
379
|
23
|
358
|
-
24
|
380
|
+
24
|
381
|
+
25</pre>
|
359
382
|
</td>
|
360
383
|
<td>
|
361
384
|
<pre class="code"><span class="info file"># File 'lib/my_help/config.rb', line 9</span>
|
@@ -375,7 +398,8 @@
|
|
375
398
|
<span class='id identifier rubyid_configure_with'>configure_with</span><span class='lparen'>(</span><span class='ivar'>@config</span><span class='lbracket'>[</span><span class='symbol'>:conf_file</span><span class='rbracket'>]</span><span class='rparen'>)</span>
|
376
399
|
<span class='comment'># YAML.dump(@config, File.open(@config[:conf_file], 'w'))
|
377
400
|
</span> <span class='comment'># no good for multiple testers.
|
378
|
-
</span
|
401
|
+
</span> <span class='id identifier rubyid_check_template_dir'>check_template_dir</span>
|
402
|
+
<span class='kw'>end</span></pre>
|
379
403
|
</td>
|
380
404
|
</tr>
|
381
405
|
</table>
|
@@ -414,12 +438,12 @@
|
|
414
438
|
<pre class="lines">
|
415
439
|
|
416
440
|
|
417
|
-
|
418
|
-
|
419
|
-
|
441
|
+
75
|
442
|
+
76
|
443
|
+
77</pre>
|
420
444
|
</td>
|
421
445
|
<td>
|
422
|
-
<pre class="code"><span class="info file"># File 'lib/my_help/config.rb', line
|
446
|
+
<pre class="code"><span class="info file"># File 'lib/my_help/config.rb', line 75</span>
|
423
447
|
|
424
448
|
<span class='kw'>def</span> <span class='id identifier rubyid_config'>config</span>
|
425
449
|
<span class='ivar'>@config</span>
|
@@ -494,12 +518,12 @@
|
|
494
518
|
<pre class="lines">
|
495
519
|
|
496
520
|
|
497
|
-
|
498
|
-
|
499
|
-
|
521
|
+
77
|
522
|
+
78
|
523
|
+
79</pre>
|
500
524
|
</td>
|
501
525
|
<td>
|
502
|
-
<pre class="code"><span class="info file"># File 'lib/my_help/config.rb', line
|
526
|
+
<pre class="code"><span class="info file"># File 'lib/my_help/config.rb', line 77</span>
|
503
527
|
|
504
528
|
<span class='kw'>def</span> <span class='op'>[]</span><span class='lparen'>(</span><span class='id identifier rubyid_sym'>sym</span><span class='rparen'>)</span>
|
505
529
|
<span class='ivar'>@config</span><span class='lbracket'>[</span><span class='id identifier rubyid_sym'>sym</span><span class='rbracket'>]</span>
|
@@ -507,6 +531,48 @@
|
|
507
531
|
</td>
|
508
532
|
</tr>
|
509
533
|
</table>
|
534
|
+
</div>
|
535
|
+
|
536
|
+
<div class="method_details ">
|
537
|
+
<h3 class="signature " id="check_template_dir-instance_method">
|
538
|
+
|
539
|
+
#<strong>check_template_dir</strong> ⇒ <tt>Object</tt>
|
540
|
+
|
541
|
+
|
542
|
+
|
543
|
+
|
544
|
+
|
545
|
+
</h3><table class="source_code">
|
546
|
+
<tr>
|
547
|
+
<td>
|
548
|
+
<pre class="lines">
|
549
|
+
|
550
|
+
|
551
|
+
28
|
552
|
+
29
|
553
|
+
30
|
554
|
+
31
|
555
|
+
32
|
556
|
+
33
|
557
|
+
34
|
558
|
+
35
|
559
|
+
36</pre>
|
560
|
+
</td>
|
561
|
+
<td>
|
562
|
+
<pre class="code"><span class="info file"># File 'lib/my_help/config.rb', line 28</span>
|
563
|
+
|
564
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_check_template_dir'>check_template_dir</span>
|
565
|
+
<span class='id identifier rubyid_temp_path'>temp_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'>"</span><span class='tstring_content'>../templates</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='id identifier rubyid___dir__'>__dir__</span><span class='rparen'>)</span>
|
566
|
+
|
567
|
+
<span class='kw'>if</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='op'>!=</span> <span class='id identifier rubyid_temp_path'>temp_path</span>
|
568
|
+
<span class='id identifier rubyid_puts'>puts</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>adjust inconsistency of template_dir.\n</span><span class='tstring_end'>"</span></span>
|
569
|
+
<span class='id identifier rubyid_config'>config</span><span class='lbracket'>[</span><span class='symbol'>:template_dir</span><span class='rbracket'>]</span><span class='op'>=</span> <span class='id identifier rubyid_temp_path'>temp_path</span>
|
570
|
+
<span class='id identifier rubyid_save_config'>save_config</span>
|
571
|
+
<span class='kw'>end</span>
|
572
|
+
<span class='kw'>end</span></pre>
|
573
|
+
</td>
|
574
|
+
</tr>
|
575
|
+
</table>
|
510
576
|
</div>
|
511
577
|
|
512
578
|
<div class="method_details ">
|
@@ -535,25 +601,25 @@
|
|
535
601
|
<pre class="lines">
|
536
602
|
|
537
603
|
|
538
|
-
27
|
539
|
-
28
|
540
|
-
29
|
541
|
-
30
|
542
|
-
31
|
543
|
-
32
|
544
|
-
33
|
545
|
-
34
|
546
|
-
35
|
547
|
-
36
|
548
|
-
37
|
549
604
|
38
|
550
605
|
39
|
551
606
|
40
|
552
607
|
41
|
553
|
-
42
|
608
|
+
42
|
609
|
+
43
|
610
|
+
44
|
611
|
+
45
|
612
|
+
46
|
613
|
+
47
|
614
|
+
48
|
615
|
+
49
|
616
|
+
50
|
617
|
+
51
|
618
|
+
52
|
619
|
+
53</pre>
|
554
620
|
</td>
|
555
621
|
<td>
|
556
|
-
<pre class="code"><span class="info file"># File 'lib/my_help/config.rb', line
|
622
|
+
<pre class="code"><span class="info file"># File 'lib/my_help/config.rb', line 38</span>
|
557
623
|
|
558
624
|
<span class='kw'>def</span> <span class='id identifier rubyid_configure'>configure</span><span class='lparen'>(</span><span class='id identifier rubyid_opts'>opts</span> <span class='op'>=</span> <span class='kw'>nil</span><span class='rparen'>)</span>
|
559
625
|
<span class='kw'>return</span> <span class='kw'>if</span> <span class='id identifier rubyid_opts'>opts</span> <span class='op'>==</span> <span class='kw'>nil</span>
|
@@ -602,22 +668,22 @@
|
|
602
668
|
<pre class="lines">
|
603
669
|
|
604
670
|
|
605
|
-
45
|
606
|
-
46
|
607
|
-
47
|
608
|
-
48
|
609
|
-
49
|
610
|
-
50
|
611
|
-
51
|
612
|
-
52
|
613
|
-
53
|
614
|
-
54
|
615
|
-
55
|
616
671
|
56
|
617
|
-
57
|
672
|
+
57
|
673
|
+
58
|
674
|
+
59
|
675
|
+
60
|
676
|
+
61
|
677
|
+
62
|
678
|
+
63
|
679
|
+
64
|
680
|
+
65
|
681
|
+
66
|
682
|
+
67
|
683
|
+
68</pre>
|
618
684
|
</td>
|
619
685
|
<td>
|
620
|
-
<pre class="code"><span class="info file"># File 'lib/my_help/config.rb', line
|
686
|
+
<pre class="code"><span class="info file"># File 'lib/my_help/config.rb', line 56</span>
|
621
687
|
|
622
688
|
<span class='kw'>def</span> <span class='id identifier rubyid_configure_with'>configure_with</span><span class='lparen'>(</span><span class='id identifier rubyid_path'>path</span><span class='rparen'>)</span>
|
623
689
|
<span class='kw'>begin</span>
|
@@ -663,12 +729,12 @@
|
|
663
729
|
<pre class="lines">
|
664
730
|
|
665
731
|
|
666
|
-
|
667
|
-
|
668
|
-
|
732
|
+
71
|
733
|
+
72
|
734
|
+
73</pre>
|
669
735
|
</td>
|
670
736
|
<td>
|
671
|
-
<pre class="code"><span class="info file"># File 'lib/my_help/config.rb', line
|
737
|
+
<pre class="code"><span class="info file"># File 'lib/my_help/config.rb', line 71</span>
|
672
738
|
|
673
739
|
<span class='kw'>def</span> <span class='id identifier rubyid_save_config'>save_config</span><span class='lparen'>(</span><span class='rparen'>)</span>
|
674
740
|
<span class='const'>File</span><span class='period'>.</span><span class='id identifier rubyid_write'>write</span><span class='lparen'>(</span><span class='ivar'>@config</span><span class='lbracket'>[</span><span class='symbol'>:conf_file</span><span class='rbracket'>]</span><span class='comma'>,</span> <span class='const'>YAML</span><span class='period'>.</span><span class='id identifier rubyid_dump'>dump</span><span class='lparen'>(</span><span class='id identifier rubyid_config'>config</span><span class='rparen'>)</span><span class='rparen'>)</span>
|
@@ -683,9 +749,9 @@
|
|
683
749
|
</div>
|
684
750
|
|
685
751
|
<div id="footer">
|
686
|
-
Generated on
|
752
|
+
Generated on Tue Oct 15 12:36:20 2024 by
|
687
753
|
<a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
688
|
-
0.9.
|
754
|
+
0.9.37 (ruby-3.0.2).
|
689
755
|
</div>
|
690
756
|
|
691
757
|
</div>
|
data/doc/MyHelp/Error.html
CHANGED
@@ -114,9 +114,9 @@
|
|
114
114
|
</div>
|
115
115
|
|
116
116
|
<div id="footer">
|
117
|
-
Generated on
|
117
|
+
Generated on Tue Oct 15 12:36:20 2024 by
|
118
118
|
<a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
119
|
-
0.9.
|
119
|
+
0.9.37 (ruby-3.0.2).
|
120
120
|
</div>
|
121
121
|
|
122
122
|
</div>
|
data/doc/MyHelp/GetConfig.html
CHANGED
@@ -166,7 +166,8 @@
|
|
166
166
|
4
|
167
167
|
5
|
168
168
|
6
|
169
|
-
7
|
169
|
+
7
|
170
|
+
8</pre>
|
170
171
|
</td>
|
171
172
|
<td>
|
172
173
|
<pre class="code"><span class="info file"># File 'lib/my_help/git_cli.rb', line 3</span>
|
@@ -174,7 +175,8 @@
|
|
174
175
|
<span class='kw'>def</span> <span class='id identifier rubyid_get_config'>get_config</span> <span class='comment'>#(args)
|
175
176
|
</span> <span class='id identifier rubyid_parent_help_dir'>parent_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='tstring'><span class='tstring_beg'>"</span><span class='tstring_end'>"</span></span>
|
176
177
|
<span class='id identifier rubyid_parent_help_dir'>parent_help_dir</span> <span class='op'>=</span> <span class='const'>ENV</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>HOME</span><span class='tstring_end'>"</span></span><span class='rbracket'>]</span> <span class='kw'>unless</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_parent_help_dir'>parent_help_dir</span><span class='rparen'>)</span>
|
177
|
-
<span class='
|
178
|
+
<span class='comment'># Forget necessity of these
|
179
|
+
</span> <span class='kw'>return</span> <span class='const'><span class='object_link'><a href="Config.html" title="MyHelp::Config (class)">Config</a></span></span><span class='period'>.</span><span class='id identifier rubyid_new'><span class='object_link'><a href="Config.html#initialize-instance_method" title="MyHelp::Config#initialize (method)">new</a></span></span><span class='lparen'>(</span><span class='id identifier rubyid_parent_help_dir'>parent_help_dir</span><span class='rparen'>)</span>
|
178
180
|
<span class='kw'>end</span></pre>
|
179
181
|
</td>
|
180
182
|
</tr>
|
@@ -186,9 +188,9 @@
|
|
186
188
|
</div>
|
187
189
|
|
188
190
|
<div id="footer">
|
189
|
-
Generated on
|
191
|
+
Generated on Tue Oct 15 12:36:20 2024 by
|
190
192
|
<a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
191
|
-
0.9.
|
193
|
+
0.9.37 (ruby-3.0.2).
|
192
194
|
</div>
|
193
195
|
|
194
196
|
</div>
|
data/doc/MyHelp/Git.html
CHANGED
@@ -201,7 +201,6 @@
|
|
201
201
|
<pre class="lines">
|
202
202
|
|
203
203
|
|
204
|
-
15
|
205
204
|
16
|
206
205
|
17
|
207
206
|
18
|
@@ -209,10 +208,11 @@
|
|
209
208
|
20
|
210
209
|
21
|
211
210
|
22
|
212
|
-
23
|
211
|
+
23
|
212
|
+
24</pre>
|
213
213
|
</td>
|
214
214
|
<td>
|
215
|
-
<pre class="code"><span class="info file"># File 'lib/my_help/git_cli.rb', line
|
215
|
+
<pre class="code"><span class="info file"># File 'lib/my_help/git_cli.rb', line 16</span>
|
216
216
|
|
217
217
|
<span class='kw'>def</span> <span class='id identifier rubyid_pull'>pull</span>
|
218
218
|
<span class='id identifier rubyid_puts'>puts</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>called my_help git pull</span><span class='tstring_end'>"</span></span>
|
@@ -243,7 +243,6 @@
|
|
243
243
|
<pre class="lines">
|
244
244
|
|
245
245
|
|
246
|
-
27
|
247
246
|
28
|
248
247
|
29
|
249
248
|
30
|
@@ -254,10 +253,11 @@
|
|
254
253
|
35
|
255
254
|
36
|
256
255
|
37
|
257
|
-
38
|
256
|
+
38
|
257
|
+
39</pre>
|
258
258
|
</td>
|
259
259
|
<td>
|
260
|
-
<pre class="code"><span class="info file"># File 'lib/my_help/git_cli.rb', line
|
260
|
+
<pre class="code"><span class="info file"># File 'lib/my_help/git_cli.rb', line 28</span>
|
261
261
|
|
262
262
|
<span class='kw'>def</span> <span class='id identifier rubyid_push'>push</span>
|
263
263
|
<span class='id identifier rubyid_puts'>puts</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>called my_help git push</span><span class='tstring_end'>"</span></span>
|
@@ -281,9 +281,9 @@
|
|
281
281
|
</div>
|
282
282
|
|
283
283
|
<div id="footer">
|
284
|
-
Generated on
|
284
|
+
Generated on Tue Oct 15 12:36:20 2024 by
|
285
285
|
<a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
286
|
-
0.9.
|
286
|
+
0.9.37 (ruby-3.0.2).
|
287
287
|
</div>
|
288
288
|
|
289
289
|
</div>
|
data/doc/MyHelp/Init.html
CHANGED
@@ -439,9 +439,9 @@
|
|
439
439
|
</div>
|
440
440
|
|
441
441
|
<div id="footer">
|
442
|
-
Generated on
|
442
|
+
Generated on Tue Oct 15 12:36:20 2024 by
|
443
443
|
<a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
444
|
-
0.9.
|
444
|
+
0.9.37 (ruby-3.0.2).
|
445
445
|
</div>
|
446
446
|
|
447
447
|
</div>
|
data/doc/MyHelp/List.html
CHANGED
@@ -212,9 +212,7 @@
|
|
212
212
|
|
213
213
|
|
214
214
|
|
215
|
-
<span class="summary_desc"><div class='inline'>
|
216
|
-
<p>defaultで@path/name.@extのヘルプを読み込んで,itemを表示.</p>
|
217
|
-
</div></span>
|
215
|
+
<span class="summary_desc"><div class='inline'></div></span>
|
218
216
|
|
219
217
|
</li>
|
220
218
|
|
@@ -236,6 +234,28 @@
|
|
236
234
|
|
237
235
|
|
238
236
|
|
237
|
+
<span class="summary_desc"><div class='inline'></div></span>
|
238
|
+
|
239
|
+
</li>
|
240
|
+
|
241
|
+
|
242
|
+
<li class="public ">
|
243
|
+
<span class="summary_signature">
|
244
|
+
|
245
|
+
<a href="#pad_multi_bytes-instance_method" title="#pad_multi_bytes (instance method)">#<strong>pad_multi_bytes</strong>(str, length, padstr = " ") ⇒ Object </a>
|
246
|
+
|
247
|
+
|
248
|
+
|
249
|
+
</span>
|
250
|
+
|
251
|
+
|
252
|
+
|
253
|
+
|
254
|
+
|
255
|
+
|
256
|
+
|
257
|
+
|
258
|
+
|
239
259
|
<span class="summary_desc"><div class='inline'></div></span>
|
240
260
|
|
241
261
|
</li>
|
@@ -336,24 +356,24 @@
|
|
336
356
|
<pre class="lines">
|
337
357
|
|
338
358
|
|
339
|
-
|
340
|
-
|
341
|
-
|
342
|
-
|
343
|
-
|
344
|
-
|
345
|
-
|
346
|
-
|
347
|
-
|
348
|
-
|
349
|
-
|
350
|
-
|
351
|
-
|
352
|
-
|
353
|
-
|
359
|
+
78
|
360
|
+
79
|
361
|
+
80
|
362
|
+
81
|
363
|
+
82
|
364
|
+
83
|
365
|
+
84
|
366
|
+
85
|
367
|
+
86
|
368
|
+
87
|
369
|
+
88
|
370
|
+
89
|
371
|
+
90
|
372
|
+
91
|
373
|
+
92</pre>
|
354
374
|
</td>
|
355
375
|
<td>
|
356
|
-
<pre class="code"><span class="info file"># File 'lib/my_help/list.rb', line
|
376
|
+
<pre class="code"><span class="info file"># File 'lib/my_help/list.rb', line 78</span>
|
357
377
|
|
358
378
|
<span class='kw'>def</span> <span class='id identifier rubyid_find_near'>find_near</span><span class='lparen'>(</span><span class='id identifier rubyid_input_item'>input_item</span><span class='rparen'>)</span>
|
359
379
|
<span class='id identifier rubyid_candidates'>candidates</span> <span class='op'>=</span> <span class='lbracket'>[</span><span class='rbracket'>]</span>
|
@@ -409,7 +429,7 @@
|
|
409
429
|
<span class='kw'>if</span> <span class='id identifier rubyid_item'>item</span> <span class='op'>==</span> <span class='kw'>nil</span> <span class='op'>&&</span> <span class='id identifier rubyid_name'>name</span> <span class='op'>==</span> <span class='kw'>nil</span>
|
410
430
|
<span class='id identifier rubyid_list_helps'>list_helps</span><span class='lparen'>(</span><span class='rparen'>)</span>
|
411
431
|
<span class='kw'>else</span>
|
412
|
-
<span class='id identifier rubyid_path'>path</span> <span class='op'>=</span> <span class='const'>File</span><span class='period'>.</span><span class='id identifier
|
432
|
+
<span class='id identifier rubyid_path'>path</span> <span class='op'>=</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_name'>name</span> <span class='op'>+</span> <span class='ivar'>@ext</span><span class='rparen'>)</span> <span class='op'>?</span> <span class='id identifier rubyid_name'>name</span> <span class='op'>+</span> <span class='ivar'>@ext</span> <span class='op'>:</span>
|
413
433
|
<span class='const'>File</span><span class='period'>.</span><span class='id identifier rubyid_join'>join</span><span class='lparen'>(</span><span class='ivar'>@path</span><span class='comma'>,</span> <span class='id identifier rubyid_name'>name</span> <span class='op'>+</span> <span class='ivar'>@ext</span><span class='rparen'>)</span>
|
414
434
|
<span class='id identifier rubyid_list_help_with'>list_help_with</span><span class='lparen'>(</span><span class='id identifier rubyid_path'>path</span><span class='comma'>,</span> <span class='id identifier rubyid_name'>name</span><span class='comma'>,</span> <span class='id identifier rubyid_item'>item</span><span class='rparen'>)</span>
|
415
435
|
<span class='kw'>end</span>
|
@@ -428,51 +448,46 @@
|
|
428
448
|
|
429
449
|
|
430
450
|
|
431
|
-
</h3><
|
432
|
-
<div class="discussion">
|
433
|
-
|
434
|
-
<p>defaultで@path/name.@extのヘルプを読み込んで,itemを表示</p>
|
435
|
-
|
436
|
-
|
437
|
-
</div>
|
438
|
-
</div>
|
439
|
-
<div class="tags">
|
440
|
-
|
441
|
-
|
442
|
-
</div><table class="source_code">
|
451
|
+
</h3><table class="source_code">
|
443
452
|
<tr>
|
444
453
|
<td>
|
445
454
|
<pre class="lines">
|
446
455
|
|
447
456
|
|
448
|
-
46
|
449
|
-
47
|
450
|
-
48
|
451
|
-
49
|
452
|
-
50
|
453
|
-
51
|
454
|
-
52
|
455
|
-
53
|
456
|
-
54
|
457
|
-
55
|
458
|
-
56
|
459
|
-
57
|
460
|
-
58
|
461
457
|
59
|
462
|
-
60
|
458
|
+
60
|
459
|
+
61
|
460
|
+
62
|
461
|
+
63
|
462
|
+
64
|
463
|
+
65
|
464
|
+
66
|
465
|
+
67
|
466
|
+
68
|
467
|
+
69
|
468
|
+
70
|
469
|
+
71
|
470
|
+
72
|
471
|
+
73
|
472
|
+
74
|
473
|
+
75
|
474
|
+
76</pre>
|
463
475
|
</td>
|
464
476
|
<td>
|
465
|
-
<pre class="code"><span class="info file"># File 'lib/my_help/list.rb', line
|
477
|
+
<pre class="code"><span class="info file"># File 'lib/my_help/list.rb', line 59</span>
|
466
478
|
|
467
479
|
<span class='kw'>def</span> <span class='id identifier rubyid_list_help_with'>list_help_with</span><span class='lparen'>(</span><span class='id identifier rubyid_path'>path</span><span class='comma'>,</span> <span class='id identifier rubyid_name'>name</span><span class='comma'>,</span> <span class='id identifier rubyid_item'>item</span><span class='rparen'>)</span>
|
468
480
|
<span class='ivar'>@help_info</span> <span class='op'>=</span> <span class='id identifier rubyid_read_help'>read_help</span><span class='lparen'>(</span><span class='id identifier rubyid_path'>path</span><span class='rparen'>)</span>
|
469
|
-
<span class='id identifier rubyid_output'>output</span> <span class='op'>=</span> <span class='const'>ColorizedString</span><span class='lbracket'>[</span
|
481
|
+
<span class='id identifier rubyid_output'>output</span> <span class='op'>=</span> <span class='const'>ColorizedString</span><span class='lbracket'>[</span>
|
482
|
+
<span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>my_help called with name : </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_name'>name</span><span class='embexpr_end'>}</span><span class='tstring_content'>,item : </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_item'>item</span><span class='embexpr_end'>}</span><span class='tstring_content'>\n</span><span class='tstring_end'>"</span></span>
|
483
|
+
<span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_colorize'>colorize</span><span class='lparen'>(</span><span class='symbol'>:cyan</span><span class='rparen'>)</span>
|
470
484
|
|
471
485
|
<span class='kw'>if</span> <span class='id identifier rubyid_item'>item</span> <span class='op'>==</span> <span class='kw'>nil</span>
|
472
486
|
<span class='ivar'>@help_info</span><span class='lbracket'>[</span><span class='symbol'>:items</span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_each_pair'>each_pair</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_item'>item</span><span class='comma'>,</span> <span class='id identifier rubyid_val'>val</span><span class='op'>|</span>
|
473
487
|
<span class='id identifier rubyid_item'>item</span><span class='comma'>,</span> <span class='id identifier rubyid_desc'>desc</span> <span class='op'>=</span> <span class='id identifier rubyid_item'>item</span><span class='period'>.</span><span class='id identifier rubyid_split'>split</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>
|
474
488
|
<span class='id identifier rubyid_desc'>desc</span> <span class='op'>||=</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_end'>"</span></span>
|
475
|
-
<span class='id identifier rubyid_output'>output</span> <span class='op'><<</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'
|
489
|
+
<span class='id identifier rubyid_output'>output</span> <span class='op'><<</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>%s: %s\n</span><span class='tstring_end'>"</span></span> <span class='op'>%</span>
|
490
|
+
<span class='lbracket'>[</span><span class='id identifier rubyid_pad_multi_bytes'>pad_multi_bytes</span><span class='lparen'>(</span><span class='id identifier rubyid_item'>item</span><span class='comma'>,</span> <span class='int'>20</span><span class='rparen'>)</span><span class='comma'>,</span> <span class='id identifier rubyid_desc'>desc</span><span class='rbracket'>]</span>
|
476
491
|
<span class='kw'>end</span>
|
477
492
|
<span class='kw'>else</span>
|
478
493
|
<span class='id identifier rubyid_output'>output</span> <span class='op'><<</span> <span class='id identifier rubyid_find_near'>find_near</span><span class='lparen'>(</span><span class='id identifier rubyid_item'>item</span><span class='rparen'>)</span>
|
@@ -509,7 +524,8 @@
|
|
509
524
|
39
|
510
525
|
40
|
511
526
|
41
|
512
|
-
42
|
527
|
+
42
|
528
|
+
43</pre>
|
513
529
|
</td>
|
514
530
|
<td>
|
515
531
|
<pre class="code"><span class="info file"># File 'lib/my_help/list.rb', line 32</span>
|
@@ -517,12 +533,61 @@
|
|
517
533
|
<span class='kw'>def</span> <span class='id identifier rubyid_list_helps'>list_helps</span><span class='lparen'>(</span><span class='rparen'>)</span>
|
518
534
|
<span class='id identifier rubyid_files'>files</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='ivar'>@path</span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>*</span><span class='embexpr_beg'>#{</span><span class='ivar'>@ext</span><span class='embexpr_end'>}</span><span class='tstring_end'>"</span></span><span class='rparen'>)</span>
|
519
535
|
<span class='const'>Dir</span><span class='period'>.</span><span class='id identifier rubyid_glob'>glob</span><span class='lparen'>(</span><span class='id identifier rubyid_files'>files</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_inject'>inject</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_end'>"</span></span><span class='rparen'>)</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_out'>out</span><span class='comma'>,</span> <span class='id identifier rubyid_file'>file</span><span class='op'>|</span>
|
520
|
-
|
536
|
+
<span class='comment'># p [out, file]
|
521
537
|
</span> <span class='id identifier rubyid_help_info'>help_info</span> <span class='op'>=</span> <span class='id identifier rubyid_read_help'>read_help</span><span class='lparen'>(</span><span class='id identifier rubyid_file'>file</span><span class='rparen'>)</span>
|
522
538
|
<span class='id identifier rubyid_head'>head</span> <span class='op'>=</span> <span class='id identifier rubyid_help_info'>help_info</span><span class='lbracket'>[</span><span class='symbol'>:items</span><span class='rbracket'>]</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>head</span><span class='tstring_end'>"</span></span><span class='rbracket'>]</span> <span class='op'>?</span>
|
523
|
-
<span class='id identifier rubyid_help_info'>help_info</span><span class='lbracket'>[</span><span class='symbol'>:items</span><span class='rbracket'>]</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>head</span><span class='tstring_end'>"</span></span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_split'>split</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>\n</span><span class='tstring_end'>"</span></span><span class='rparen'>)</span><span class='lbracket'>[</span><span class='int'>0</span><span class='rbracket'>]</span> <span class='op'>:</span>
|
524
|
-
|
525
|
-
<span class='id identifier rubyid_out'>out</span> <span class='op'><<</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>%
|
539
|
+
<span class='id identifier rubyid_help_info'>help_info</span><span class='lbracket'>[</span><span class='symbol'>:items</span><span class='rbracket'>]</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>head</span><span class='tstring_end'>"</span></span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_split'>split</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>\n</span><span class='tstring_end'>"</span></span><span class='rparen'>)</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>
|
540
|
+
<span class='comment'># out << "%10s: %s\n" % [help_info[:name], head]
|
541
|
+
</span> <span class='id identifier rubyid_out'>out</span> <span class='op'><<</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>%s: %s\n</span><span class='tstring_end'>"</span></span> <span class='op'>%</span>
|
542
|
+
<span class='lbracket'>[</span><span class='id identifier rubyid_pad_multi_bytes'>pad_multi_bytes</span><span class='lparen'>(</span><span class='id identifier rubyid_help_info'>help_info</span><span class='lbracket'>[</span><span class='symbol'>:name</span><span class='rbracket'>]</span><span class='comma'>,</span><span class='int'>20</span><span class='rparen'>)</span><span class='comma'>,</span> <span class='id identifier rubyid_head'>head</span><span class='rbracket'>]</span>
|
543
|
+
<span class='kw'>end</span>
|
544
|
+
<span class='kw'>end</span></pre>
|
545
|
+
</td>
|
546
|
+
</tr>
|
547
|
+
</table>
|
548
|
+
</div>
|
549
|
+
|
550
|
+
<div class="method_details ">
|
551
|
+
<h3 class="signature " id="pad_multi_bytes-instance_method">
|
552
|
+
|
553
|
+
#<strong>pad_multi_bytes</strong>(str, length, padstr = " ") ⇒ <tt>Object</tt>
|
554
|
+
|
555
|
+
|
556
|
+
|
557
|
+
|
558
|
+
|
559
|
+
</h3><table class="source_code">
|
560
|
+
<tr>
|
561
|
+
<td>
|
562
|
+
<pre class="lines">
|
563
|
+
|
564
|
+
|
565
|
+
45
|
566
|
+
46
|
567
|
+
47
|
568
|
+
48
|
569
|
+
49
|
570
|
+
50
|
571
|
+
51
|
572
|
+
52
|
573
|
+
53
|
574
|
+
54
|
575
|
+
55
|
576
|
+
56</pre>
|
577
|
+
</td>
|
578
|
+
<td>
|
579
|
+
<pre class="code"><span class="info file"># File 'lib/my_help/list.rb', line 45</span>
|
580
|
+
|
581
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_pad_multi_bytes'>pad_multi_bytes</span><span class='lparen'>(</span><span class='id identifier rubyid_str'>str</span><span class='comma'>,</span> <span class='id identifier rubyid_length'>length</span><span class='comma'>,</span> <span class='id identifier rubyid_padstr'>padstr</span><span class='op'>=</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'> </span><span class='tstring_end'>"</span></span><span class='rparen'>)</span>
|
582
|
+
<span class='id identifier rubyid_str_bytes'>str_bytes</span> <span class='op'>=</span> <span class='id identifier rubyid_str'>str</span><span class='period'>.</span><span class='id identifier rubyid_each_char'>each_char</span><span class='period'>.</span><span class='id identifier rubyid_map'>map</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_c'>c</span><span class='op'>|</span>
|
583
|
+
<span class='id identifier rubyid_c'>c</span><span class='period'>.</span><span class='id identifier rubyid_bytesize'>bytesize</span> <span class='op'>==</span> <span class='int'>1</span> <span class='op'>?</span> <span class='int'>1</span> <span class='op'>:</span> <span class='int'>2</span>
|
584
|
+
<span class='kw'>end</span><span class='period'>.</span><span class='id identifier rubyid_reduce'>reduce</span><span class='lparen'>(</span><span class='int'>0</span><span class='comma'>,</span> <span class='op'>&</span><span class='symbol'>:+</span><span class='rparen'>)</span>
|
585
|
+
<span class='comment'># p [str, length, str_bytes]
|
586
|
+
</span> <span class='kw'>if</span> <span class='id identifier rubyid_str_bytes'>str_bytes</span><span class='op'><</span><span class='id identifier rubyid_length'>length</span>
|
587
|
+
<span class='id identifier rubyid_pad'>pad</span> <span class='op'>=</span> <span class='id identifier rubyid_padstr'>padstr</span> <span class='op'>*</span> <span class='lparen'>(</span><span class='id identifier rubyid_length'>length</span> <span class='op'>-</span> <span class='id identifier rubyid_str_bytes'>str_bytes</span><span class='rparen'>)</span>
|
588
|
+
<span class='kw'>return</span> <span class='id identifier rubyid_pad'>pad</span> <span class='op'>+</span> <span class='id identifier rubyid_str'>str</span>
|
589
|
+
<span class='kw'>else</span>
|
590
|
+
<span class='kw'>return</span> <span class='id identifier rubyid_str'>str</span>
|
526
591
|
<span class='kw'>end</span>
|
527
592
|
<span class='kw'>end</span></pre>
|
528
593
|
</td>
|
@@ -571,9 +636,9 @@
|
|
571
636
|
</div>
|
572
637
|
|
573
638
|
<div id="footer">
|
574
|
-
Generated on
|
639
|
+
Generated on Tue Oct 15 12:36:20 2024 by
|
575
640
|
<a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
576
|
-
0.9.
|
641
|
+
0.9.37 (ruby-3.0.2).
|
577
642
|
</div>
|
578
643
|
|
579
644
|
</div>
|
data/doc/MyHelp/Md2Hash.html
CHANGED
@@ -622,9 +622,9 @@
|
|
622
622
|
</div>
|
623
623
|
|
624
624
|
<div id="footer">
|
625
|
-
Generated on
|
625
|
+
Generated on Tue Oct 15 12:36:21 2024 by
|
626
626
|
<a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
627
|
-
0.9.
|
627
|
+
0.9.37 (ruby-3.0.2).
|
628
628
|
</div>
|
629
629
|
|
630
630
|
</div>
|