my_help 1.2.9 → 1.2.12
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/Gemfile +1 -10
- data/Gemfile.lock +6 -64
- data/README.org +24 -0
- data/Rakefile +0 -35
- data/development_memo.org +4 -0
- 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 +45 -6
- data/lib/my_help/config.rb +8 -3
- data/lib/my_help/init.rb +8 -1
- data/lib/my_help/list.rb +20 -14
- data/lib/my_help/modify.rb +7 -5
- data/lib/my_help/org2hash.rb +3 -3
- data/lib/my_help/version.rb +1 -1
- data/lib/templates/kick_off.md +51 -0
- data/lib/templates/kick_off.org +57 -0
- data/my_help.gemspec +3 -3
- metadata +5 -56
- data/.DS_Store +0 -0
- data/.dockerignore +0 -2
- data/.my_help/example2.org +0 -9
- data/.rspec +0 -3
- data/.rspec_status +0 -13
- data/.travis.yml +0 -4
- data/.yardoc/checksums +0 -11
- data/.yardoc/complete +0 -0
- data/.yardoc/object_types +0 -0
- data/.yardoc/objects/root.dat +0 -0
- data/.yardoc/proxy_types +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9b04f4956d993ce90331dc7b399a2f0a883608ac984e49f3a44d6a5d478ca62e
|
4
|
+
data.tar.gz: 9a3699766bbc9d89cb15d6e7b8426bd6a2de6064824287b45a805a5c31b11e3e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0b08e58b39a6773025ee04ae1e83f6f3f2efdb203227121bf58cb12ad22aab986be72ccf310efee5b3331f8b33ea06a79fc2ffb8ad8068ccc1558c2e4a59fb40
|
7
|
+
data.tar.gz: 287ace21d858b549f11cf43423efdbd74feb30c59a325b338288ca83cca27c3a082e099b74724be578de127f118cb0b561cfd485ad4eb1ed635f04cdca178302
|
data/Gemfile
CHANGED
data/Gemfile.lock
CHANGED
@@ -1,82 +1,24 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
my_help (1.2.
|
4
|
+
my_help (1.2.11)
|
5
5
|
colorize
|
6
6
|
command_line
|
7
7
|
thor
|
8
8
|
|
9
9
|
GEM
|
10
|
-
remote:
|
10
|
+
remote: http://www.rubygems.org/
|
11
11
|
specs:
|
12
|
-
|
13
|
-
bundler (>= 1.17, < 3.0)
|
14
|
-
childprocess (>= 2.0, < 5.0)
|
15
|
-
contracts (>= 0.16.0, < 0.18.0)
|
16
|
-
cucumber (>= 4.0, < 9.0)
|
17
|
-
rspec-expectations (~> 3.4)
|
18
|
-
thor (~> 1.0)
|
19
|
-
builder (3.2.4)
|
20
|
-
childprocess (4.1.0)
|
21
|
-
colorize (1.0.1)
|
12
|
+
colorize (1.1.0)
|
22
13
|
command_line (2.0.1)
|
23
|
-
|
24
|
-
cucumber (8.0.0)
|
25
|
-
builder (~> 3.2, >= 3.2.4)
|
26
|
-
cucumber-ci-environment (~> 9.0, >= 9.0.4)
|
27
|
-
cucumber-core (~> 11.0, >= 11.0.0)
|
28
|
-
cucumber-cucumber-expressions (~> 15.1, >= 15.1.1)
|
29
|
-
cucumber-gherkin (~> 23.0, >= 23.0.1)
|
30
|
-
cucumber-html-formatter (~> 19.1, >= 19.1.0)
|
31
|
-
cucumber-messages (~> 18.0, >= 18.0.0)
|
32
|
-
diff-lcs (~> 1.5, >= 1.5.0)
|
33
|
-
mime-types (~> 3.4, >= 3.4.1)
|
34
|
-
multi_test (~> 1.1, >= 1.1.0)
|
35
|
-
sys-uname (~> 1.2, >= 1.2.2)
|
36
|
-
cucumber-ci-environment (9.2.0)
|
37
|
-
cucumber-core (11.0.0)
|
38
|
-
cucumber-gherkin (~> 23.0, >= 23.0.1)
|
39
|
-
cucumber-messages (~> 18.0, >= 18.0.0)
|
40
|
-
cucumber-tag-expressions (~> 4.1, >= 4.1.0)
|
41
|
-
cucumber-cucumber-expressions (15.2.0)
|
42
|
-
cucumber-gherkin (23.0.1)
|
43
|
-
cucumber-messages (~> 18.0, >= 18.0.0)
|
44
|
-
cucumber-html-formatter (19.2.0)
|
45
|
-
cucumber-messages (~> 18.0, >= 18.0.0)
|
46
|
-
cucumber-messages (18.0.0)
|
47
|
-
cucumber-tag-expressions (4.1.0)
|
48
|
-
diff-lcs (1.5.0)
|
49
|
-
ffi (1.15.5)
|
50
|
-
mime-types (3.4.1)
|
51
|
-
mime-types-data (~> 3.2015)
|
52
|
-
mime-types-data (3.2023.0218.1)
|
53
|
-
multi_test (1.1.0)
|
54
|
-
rake (13.0.6)
|
55
|
-
rspec (3.12.0)
|
56
|
-
rspec-core (~> 3.12.0)
|
57
|
-
rspec-expectations (~> 3.12.0)
|
58
|
-
rspec-mocks (~> 3.12.0)
|
59
|
-
rspec-core (3.12.2)
|
60
|
-
rspec-support (~> 3.12.0)
|
61
|
-
rspec-expectations (3.12.3)
|
62
|
-
diff-lcs (>= 1.2.0, < 2.0)
|
63
|
-
rspec-support (~> 3.12.0)
|
64
|
-
rspec-mocks (3.12.5)
|
65
|
-
diff-lcs (>= 1.2.0, < 2.0)
|
66
|
-
rspec-support (~> 3.12.0)
|
67
|
-
rspec-support (3.12.0)
|
68
|
-
sys-uname (1.2.3)
|
69
|
-
ffi (~> 1.1)
|
70
|
-
thor (1.2.2)
|
14
|
+
thor (1.3.2)
|
71
15
|
|
72
16
|
PLATFORMS
|
73
17
|
arm64-darwin-20
|
18
|
+
ruby
|
74
19
|
|
75
20
|
DEPENDENCIES
|
76
|
-
aruba (~> 2.1.0)
|
77
21
|
my_help!
|
78
|
-
rake (~> 13.0)
|
79
|
-
rspec (~> 3.0)
|
80
22
|
|
81
23
|
BUNDLED WITH
|
82
|
-
2.
|
24
|
+
2.5.21
|
data/README.org
CHANGED
@@ -113,6 +113,30 @@ Commands:
|
|
113
113
|
-d, dired : ファイラとして使う
|
114
114
|
#+end_src
|
115
115
|
|
116
|
+
* .md + code
|
117
|
+
vscodeを使うuserからの要望で,vscodeと.mdを組み合わせて
|
118
|
+
使えるようにしました.
|
119
|
+
** init
|
120
|
+
init時に.mdを選択するとdefaultのファイル拡張子を.mdにします.
|
121
|
+
** default editorをvscodeに
|
122
|
+
: > my_help set editor
|
123
|
+
* batcatによるcolorize
|
124
|
+
bat(cat)でlist時にcolorize出力をさせるようにしました.<2025-06-20 Fri>
|
125
|
+
ただ,実行環境(os)のチェックや,terminalの設定に対して
|
126
|
+
特定の状況を想定しています.
|
127
|
+
出力が見にくい場合は,
|
128
|
+
: > my_help set bat false
|
129
|
+
として,plain出力に戻してください.今の設定は,
|
130
|
+
: > my_help list | batcat --theme ColdarkCold -l zsh
|
131
|
+
です.pull requestを投げてもらったら対応できるかもしれません.
|
132
|
+
* current dir file
|
133
|
+
: my_help list ./readme.org hoge
|
134
|
+
のように,current dirを指定して*.orgなどをlistすると
|
135
|
+
item: hogeがcolorizeして表示されます.
|
136
|
+
|
137
|
+
長いreadme.orgからitemを抽出して表示するときに便利です.
|
138
|
+
|
139
|
+
* 詳しい解説
|
116
140
|
** my_helpがやっていること
|
117
141
|
my_helpの個々のヘルプファイルは'~/.my_help'に置かれています.
|
118
142
|
ヘルプファイルのフォーマットはEmacsのorg-modeです.
|
data/Rakefile
CHANGED
@@ -1,5 +1,4 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
|
-
require 'yard'
|
3
2
|
require 'bundler/gem_tasks'
|
4
3
|
require 'rake/testtask'
|
5
4
|
|
@@ -10,42 +9,8 @@ Rake::TestTask.new(:test) do |t|
|
|
10
9
|
t.test_files = FileList['test/**/*_test.rb']
|
11
10
|
end
|
12
11
|
|
13
|
-
desc 'make documents by yard'
|
14
|
-
task :yard do
|
15
|
-
# api_output_dir = 'doc'
|
16
|
-
YARD::Rake::YardocTask.new do |t|
|
17
|
-
# t.options << '-o#{api_output_dir}' # output dir = doc_api
|
18
|
-
# t.files=['**/*.md']
|
19
|
-
t.options += ['--title', 'my_help']
|
20
|
-
# t.options=['--exclude','lib.rb','--files','**/*.org']
|
21
|
-
# see [[https://github.com/lsegal/yard/issues/66]] for the other options
|
22
|
-
end
|
23
|
-
end
|
24
|
-
|
25
|
-
require 'rubocop/rake_task'
|
26
|
-
|
27
|
-
RuboCop::RakeTask.new
|
28
|
-
|
29
12
|
#task default: %i[test rubocop]
|
30
13
|
task :default do
|
31
14
|
system "rake -T"
|
32
15
|
end
|
33
16
|
|
34
|
-
require "colorize"
|
35
|
-
require 'command_line/global'
|
36
|
-
|
37
|
-
desc 'git auto'
|
38
|
-
task :git_auto do
|
39
|
-
print "Input comments: "
|
40
|
-
comment = STDIN.gets.chomp
|
41
|
-
comment = comment == "" ? "auto pull and push" : comment.gsub("\'", "\\'")
|
42
|
-
["git add -A",
|
43
|
-
"git commit -m '#{comment}'",
|
44
|
-
"git pull origin main",
|
45
|
-
"git push origin main"].each do |comm|
|
46
|
-
puts comm.cyan
|
47
|
-
res = command_line comm
|
48
|
-
puts res.stdout.green
|
49
|
-
end
|
50
|
-
end
|
51
|
-
|
data/development_memo.org
CHANGED
@@ -12,6 +12,10 @@
|
|
12
12
|
#+TWITTER: off
|
13
13
|
#+SETUPFILE: https://fniessen.github.io/org-html-themes/org/theme-readtheorg.setup
|
14
14
|
|
15
|
+
* batcat <2025-06-19 Thu>
|
16
|
+
- ENV['wsl']でbatcatを強制
|
17
|
+
- markdown を再修正
|
18
|
+
- さらにGemfileを.gemspecにして,Gemfile.lockは' bundle install'で自動生成
|
15
19
|
* new development <2024-09-26 Thu>
|
16
20
|
- test作ろう
|
17
21
|
- '* ' 問題の解決
|
data/doc/MyHelp/CLI.html
CHANGED
@@ -155,6 +155,28 @@
|
|
155
155
|
<li class="public ">
|
156
156
|
<span class="summary_signature">
|
157
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
|
+
|
158
180
|
<a href="#delete-instance_method" title="#delete (instance method)">#<strong>delete</strong>(*args) ⇒ Object </a>
|
159
181
|
|
160
182
|
|
@@ -281,6 +303,28 @@
|
|
281
303
|
|
282
304
|
|
283
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
|
+
|
284
328
|
<span class="summary_desc"><div class='inline'></div></span>
|
285
329
|
|
286
330
|
</li>
|
@@ -410,7 +454,59 @@
|
|
410
454
|
|
411
455
|
|
412
456
|
<div class="method_details first">
|
413
|
-
<h3 class="signature first" id="
|
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">
|
414
510
|
|
415
511
|
#<strong>delete</strong>(*args) ⇒ <tt>Object</tt>
|
416
512
|
|
@@ -424,21 +520,21 @@
|
|
424
520
|
<pre class="lines">
|
425
521
|
|
426
522
|
|
427
|
-
|
428
|
-
|
429
|
-
|
430
|
-
|
431
|
-
|
432
|
-
|
433
|
-
|
434
|
-
|
435
|
-
|
436
|
-
|
437
|
-
|
438
|
-
|
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>
|
439
535
|
</td>
|
440
536
|
<td>
|
441
|
-
<pre class="code"><span class="info file"># File 'lib/my_help/cli.rb', line
|
537
|
+
<pre class="code"><span class="info file"># File 'lib/my_help/cli.rb', line 123</span>
|
442
538
|
|
443
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>
|
444
540
|
<span class='id identifier rubyid_c'>c</span> <span class='op'>=</span> <span class='id identifier rubyid_get_config'>get_config</span>
|
@@ -472,14 +568,14 @@
|
|
472
568
|
<pre class="lines">
|
473
569
|
|
474
570
|
|
475
|
-
|
476
|
-
|
477
|
-
|
478
|
-
|
479
|
-
|
571
|
+
90
|
572
|
+
91
|
573
|
+
92
|
574
|
+
93
|
575
|
+
94</pre>
|
480
576
|
</td>
|
481
577
|
<td>
|
482
|
-
<pre class="code"><span class="info file"># File 'lib/my_help/cli.rb', line
|
578
|
+
<pre class="code"><span class="info file"># File 'lib/my_help/cli.rb', line 90</span>
|
483
579
|
|
484
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>
|
485
581
|
<span class='id identifier rubyid_c'>c</span> <span class='op'>=</span> <span class='id identifier rubyid_get_config'>get_config</span>
|
@@ -506,13 +602,13 @@
|
|
506
602
|
<pre class="lines">
|
507
603
|
|
508
604
|
|
509
|
-
|
510
|
-
|
511
|
-
|
512
|
-
|
605
|
+
138
|
606
|
+
139
|
607
|
+
140
|
608
|
+
141</pre>
|
513
609
|
</td>
|
514
610
|
<td>
|
515
|
-
<pre class="code"><span class="info file"># File 'lib/my_help/cli.rb', line
|
611
|
+
<pre class="code"><span class="info file"># File 'lib/my_help/cli.rb', line 138</span>
|
516
612
|
|
517
613
|
<span class='kw'>def</span> <span class='id identifier rubyid_hello'>hello</span>
|
518
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>
|
@@ -538,23 +634,23 @@
|
|
538
634
|
<pre class="lines">
|
539
635
|
|
540
636
|
|
541
|
-
|
542
|
-
|
543
|
-
|
544
|
-
|
545
|
-
|
546
|
-
|
547
|
-
|
548
|
-
|
549
|
-
|
550
|
-
|
551
|
-
|
552
|
-
|
553
|
-
|
554
|
-
|
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>
|
555
651
|
</td>
|
556
652
|
<td>
|
557
|
-
<pre class="code"><span class="info file"># File 'lib/my_help/cli.rb', line
|
653
|
+
<pre class="code"><span class="info file"># File 'lib/my_help/cli.rb', line 47</span>
|
558
654
|
|
559
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>
|
560
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
|
@@ -601,17 +697,17 @@
|
|
601
697
|
<pre class="lines">
|
602
698
|
|
603
699
|
|
604
|
-
|
605
|
-
|
606
|
-
|
607
|
-
|
608
|
-
|
609
|
-
|
610
|
-
|
611
|
-
|
700
|
+
79
|
701
|
+
80
|
702
|
+
81
|
703
|
+
82
|
704
|
+
83
|
705
|
+
84
|
706
|
+
85
|
707
|
+
86</pre>
|
612
708
|
</td>
|
613
709
|
<td>
|
614
|
-
<pre class="code"><span class="info file"># File 'lib/my_help/cli.rb', line
|
710
|
+
<pre class="code"><span class="info file"># File 'lib/my_help/cli.rb', line 79</span>
|
615
711
|
|
616
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>
|
617
713
|
<span class='id identifier rubyid_config'>config</span> <span class='op'>=</span> <span class='id identifier rubyid_get_config'>get_config</span>
|
@@ -641,16 +737,16 @@
|
|
641
737
|
<pre class="lines">
|
642
738
|
|
643
739
|
|
644
|
-
|
645
|
-
|
646
|
-
|
647
|
-
|
648
|
-
|
649
|
-
|
650
|
-
|
740
|
+
98
|
741
|
+
99
|
742
|
+
100
|
743
|
+
101
|
744
|
+
102
|
745
|
+
103
|
746
|
+
104</pre>
|
651
747
|
</td>
|
652
748
|
<td>
|
653
|
-
<pre class="code"><span class="info file"># File 'lib/my_help/cli.rb', line
|
749
|
+
<pre class="code"><span class="info file"># File 'lib/my_help/cli.rb', line 98</span>
|
654
750
|
|
655
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>
|
656
752
|
<span class='id identifier rubyid_c'>c</span> <span class='op'>=</span> <span class='id identifier rubyid_get_config'>get_config</span>
|
@@ -662,6 +758,54 @@
|
|
662
758
|
</td>
|
663
759
|
</tr>
|
664
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>
|
665
809
|
</div>
|
666
810
|
|
667
811
|
<div class="method_details ">
|
@@ -679,18 +823,18 @@
|
|
679
823
|
<pre class="lines">
|
680
824
|
|
681
825
|
|
682
|
-
|
683
|
-
|
684
|
-
|
685
|
-
|
686
|
-
|
687
|
-
|
688
|
-
|
689
|
-
|
690
|
-
|
826
|
+
64
|
827
|
+
65
|
828
|
+
66
|
829
|
+
67
|
830
|
+
68
|
831
|
+
69
|
832
|
+
70
|
833
|
+
71
|
834
|
+
72</pre>
|
691
835
|
</td>
|
692
836
|
<td>
|
693
|
-
<pre class="code"><span class="info file"># File 'lib/my_help/cli.rb', line
|
837
|
+
<pre class="code"><span class="info file"># File 'lib/my_help/cli.rb', line 64</span>
|
694
838
|
|
695
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>
|
696
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
|
@@ -721,15 +865,15 @@
|
|
721
865
|
<pre class="lines">
|
722
866
|
|
723
867
|
|
724
|
-
|
725
|
-
|
726
|
-
|
868
|
+
20
|
869
|
+
21
|
870
|
+
22</pre>
|
727
871
|
</td>
|
728
872
|
<td>
|
729
|
-
<pre class="code"><span class="info file"># File 'lib/my_help/cli.rb', line
|
873
|
+
<pre class="code"><span class="info file"># File 'lib/my_help/cli.rb', line 20</span>
|
730
874
|
|
731
875
|
<span class='kw'>def</span> <span class='id identifier rubyid_version'>version</span>
|
732
|
-
<span class='id identifier
|
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>
|
733
877
|
<span class='kw'>end</span></pre>
|
734
878
|
</td>
|
735
879
|
</tr>
|
@@ -741,9 +885,9 @@
|
|
741
885
|
</div>
|
742
886
|
|
743
887
|
<div id="footer">
|
744
|
-
Generated on
|
888
|
+
Generated on Tue Oct 15 12:36:20 2024 by
|
745
889
|
<a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
746
|
-
0.9.
|
890
|
+
0.9.37 (ruby-3.0.2).
|
747
891
|
</div>
|
748
892
|
|
749
893
|
</div>
|