my_help 1.2.2 → 1.2.4p1

Sign up to get free protection for your applications and to get access to all the features.
data/doc/OrgToYaml.html DELETED
@@ -1,497 +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: OrgToYaml
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 = "OrgToYaml";
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 (O)</a> &raquo;
40
-
41
-
42
- <span class="title">OrgToYaml</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: OrgToYaml
63
-
64
-
65
-
66
- </h1>
67
- <div class="box_info">
68
-
69
- <dl>
70
- <dt>Inherits:</dt>
71
- <dd>
72
- <span class="inheritName">Object</span>
73
-
74
- <ul class="fullTree">
75
- <li>Object</li>
76
-
77
- <li class="next">OrgToYaml</li>
78
-
79
- </ul>
80
- <a href="#" class="inheritanceTree">show all</a>
81
-
82
- </dd>
83
- </dl>
84
-
85
-
86
-
87
-
88
-
89
-
90
-
91
-
92
-
93
-
94
-
95
- <dl>
96
- <dt>Defined in:</dt>
97
- <dd>lib/my_help/org2yml.rb</dd>
98
- </dl>
99
-
100
- </div>
101
-
102
-
103
-
104
-
105
-
106
- <h2>Instance Attribute Summary <small><a href="#" class="summary_toggle">collapse</a></small></h2>
107
- <ul class="summary">
108
-
109
- <li class="public ">
110
- <span class="summary_signature">
111
-
112
- <a href="#help_cont-instance_method" title="#help_cont (instance method)">#<strong>help_cont</strong> &#x21d2; Object </a>
113
-
114
-
115
-
116
- </span>
117
-
118
-
119
-
120
-
121
-
122
-
123
-
124
-
125
-
126
-
127
-
128
-
129
- <span class="summary_desc"><div class='inline'>
130
- <p>Returns the value of attribute help_cont.</p>
131
- </div></span>
132
-
133
- </li>
134
-
135
-
136
- </ul>
137
-
138
-
139
-
140
-
141
-
142
- <h2>
143
- Instance Method Summary
144
- <small><a href="#" class="summary_toggle">collapse</a></small>
145
- </h2>
146
-
147
- <ul class="summary">
148
-
149
- <li class="public ">
150
- <span class="summary_signature">
151
-
152
- <a href="#initialize-instance_method" title="#initialize (instance method)">#<strong>initialize</strong>(file) &#x21d2; OrgToYaml </a>
153
-
154
-
155
-
156
- </span>
157
-
158
-
159
- <span class="note title constructor">constructor</span>
160
-
161
-
162
-
163
-
164
-
165
-
166
-
167
-
168
- <span class="summary_desc"><div class='inline'>
169
- <p>A new instance of OrgToYaml.</p>
170
- </div></span>
171
-
172
- </li>
173
-
174
-
175
- <li class="public ">
176
- <span class="summary_signature">
177
-
178
- <a href="#make_options-instance_method" title="#make_options (instance method)">#<strong>make_options</strong>(line) &#x21d2; Object </a>
179
-
180
-
181
-
182
- </span>
183
-
184
-
185
-
186
-
187
-
188
-
189
-
190
-
191
-
192
- <span class="summary_desc"><div class='inline'></div></span>
193
-
194
- </li>
195
-
196
-
197
- <li class="public ">
198
- <span class="summary_signature">
199
-
200
- <a href="#next_cont-instance_method" title="#next_cont (instance method)">#<strong>next_cont</strong>(head) &#x21d2; Object </a>
201
-
202
-
203
-
204
- </span>
205
-
206
-
207
-
208
-
209
-
210
-
211
-
212
-
213
-
214
- <span class="summary_desc"><div class='inline'></div></span>
215
-
216
- </li>
217
-
218
-
219
- <li class="public ">
220
- <span class="summary_signature">
221
-
222
- <a href="#org_to_yaml-instance_method" title="#org_to_yaml (instance method)">#<strong>org_to_yaml</strong>(lines) &#x21d2; Object </a>
223
-
224
-
225
-
226
- </span>
227
-
228
-
229
-
230
-
231
-
232
-
233
-
234
-
235
-
236
- <span class="summary_desc"><div class='inline'></div></span>
237
-
238
- </li>
239
-
240
-
241
- </ul>
242
-
243
-
244
- <div id="constructor_details" class="method_details_list">
245
- <h2>Constructor Details</h2>
246
-
247
- <div class="method_details first">
248
- <h3 class="signature first" id="initialize-instance_method">
249
-
250
- #<strong>initialize</strong>(file) &#x21d2; <tt><span class='object_link'><a href="" title="OrgToYaml (class)">OrgToYaml</a></span></tt>
251
-
252
-
253
-
254
-
255
-
256
- </h3><div class="docstring">
257
- <div class="discussion">
258
-
259
- <p>Returns a new instance of OrgToYaml.</p>
260
-
261
-
262
- </div>
263
- </div>
264
- <div class="tags">
265
-
266
-
267
- </div><table class="source_code">
268
- <tr>
269
- <td>
270
- <pre class="lines">
271
-
272
-
273
- 8
274
- 9
275
- 10
276
- 11
277
- 12
278
- 13
279
- 14</pre>
280
- </td>
281
- <td>
282
- <pre class="code"><span class="info file"># File 'lib/my_help/org2yml.rb', line 8</span>
283
-
284
- <span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span><span class='lparen'>(</span><span class='id identifier rubyid_file'>file</span><span class='rparen'>)</span>
285
- <span class='ivar'>@help_cont</span> <span class='op'>=</span> <span class='lbrace'>{</span><span class='rbrace'>}</span> <span class='comment'>#{ head: [File.basename(file, &#39;.org&#39;)] }
286
- </span> <span class='ivar'>@head_sym</span> <span class='op'>=</span> <span class='kw'>nil</span>
287
- <span class='ivar'>@conts</span> <span class='op'>=</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_end'>&#39;</span></span>
288
- <span class='ivar'>@short_stored</span> <span class='op'>=</span> <span class='lbracket'>[</span><span class='rbracket'>]</span>
289
- <span class='id identifier rubyid_org_to_yaml'>org_to_yaml</span><span class='lparen'>(</span><span class='const'>File</span><span class='period'>.</span><span class='id identifier rubyid_readlines'>readlines</span><span class='lparen'>(</span><span class='id identifier rubyid_file'>file</span><span class='rparen'>)</span><span class='rparen'>)</span>
290
- <span class='kw'>end</span></pre>
291
- </td>
292
- </tr>
293
- </table>
294
- </div>
295
-
296
- </div>
297
-
298
- <div id="instance_attr_details" class="attr_details">
299
- <h2>Instance Attribute Details</h2>
300
-
301
-
302
- <span id="help_cont=-instance_method"></span>
303
- <div class="method_details first">
304
- <h3 class="signature first" id="help_cont-instance_method">
305
-
306
- #<strong>help_cont</strong> &#x21d2; <tt>Object</tt>
307
-
308
-
309
-
310
-
311
-
312
- </h3><div class="docstring">
313
- <div class="discussion">
314
-
315
- <p>Returns the value of attribute help_cont.</p>
316
-
317
-
318
- </div>
319
- </div>
320
- <div class="tags">
321
-
322
-
323
- </div><table class="source_code">
324
- <tr>
325
- <td>
326
- <pre class="lines">
327
-
328
-
329
- 6
330
- 7
331
- 8</pre>
332
- </td>
333
- <td>
334
- <pre class="code"><span class="info file"># File 'lib/my_help/org2yml.rb', line 6</span>
335
-
336
- <span class='kw'>def</span> <span class='id identifier rubyid_help_cont'>help_cont</span>
337
- <span class='ivar'>@help_cont</span>
338
- <span class='kw'>end</span></pre>
339
- </td>
340
- </tr>
341
- </table>
342
- </div>
343
-
344
- </div>
345
-
346
-
347
- <div id="instance_method_details" class="method_details_list">
348
- <h2>Instance Method Details</h2>
349
-
350
-
351
- <div class="method_details first">
352
- <h3 class="signature first" id="make_options-instance_method">
353
-
354
- #<strong>make_options</strong>(line) &#x21d2; <tt>Object</tt>
355
-
356
-
357
-
358
-
359
-
360
- </h3><table class="source_code">
361
- <tr>
362
- <td>
363
- <pre class="lines">
364
-
365
-
366
- 16
367
- 17
368
- 18
369
- 19
370
- 20
371
- 21
372
- 22
373
- 23
374
- 24
375
- 25
376
- 26</pre>
377
- </td>
378
- <td>
379
- <pre class="code"><span class="info file"># File 'lib/my_help/org2yml.rb', line 16</span>
380
-
381
- <span class='kw'>def</span> <span class='id identifier rubyid_make_options'>make_options</span><span class='lparen'>(</span><span class='id identifier rubyid_line'>line</span><span class='rparen'>)</span>
382
- <span class='id identifier rubyid_head'>head</span><span class='comma'>,</span> <span class='id identifier rubyid_desc'>desc</span> <span class='op'>=</span> <span class='id identifier rubyid_line'>line</span><span class='period'>.</span><span class='id identifier rubyid_split'>split</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>:</span><span class='tstring_end'>&#39;</span></span><span class='rparen'>)</span>
383
- <span class='id identifier rubyid_desc'>desc</span> <span class='op'>||=</span> <span class='id identifier rubyid_head'>head</span><span class='period'>.</span><span class='id identifier rubyid_to_s'>to_s</span>
384
- <span class='id identifier rubyid_short'>short</span> <span class='op'>=</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>-</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_head'>head</span><span class='lbracket'>[</span><span class='int'>0</span><span class='rbracket'>]</span><span class='embexpr_end'>}</span><span class='tstring_end'>&quot;</span></span>
385
- <span class='kw'>if</span> <span class='ivar'>@short_stored</span><span class='period'>.</span><span class='id identifier rubyid_include?'>include?</span><span class='lparen'>(</span><span class='id identifier rubyid_short'>short</span><span class='rparen'>)</span> <span class='kw'>or</span> <span class='id identifier rubyid_head'>head</span><span class='op'>==</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>license</span><span class='tstring_end'>&#39;</span></span> <span class='kw'>or</span> <span class='id identifier rubyid_head'>head</span><span class='op'>==</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>head</span><span class='tstring_end'>&#39;</span></span>
386
- <span class='id identifier rubyid_short'>short</span> <span class='op'>=</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_end'>&#39;</span></span>
387
- <span class='kw'>else</span>
388
- <span class='ivar'>@short_stored</span> <span class='op'>&lt;&lt;</span> <span class='id identifier rubyid_short'>short</span>
389
- <span class='kw'>end</span>
390
- <span class='lbrace'>{</span> <span class='label'>short:</span> <span class='id identifier rubyid_short'>short</span><span class='comma'>,</span> <span class='label'>long:</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_head'>head</span><span class='embexpr_end'>}</span><span class='tstring_end'>&quot;</span></span><span class='comma'>,</span> <span class='label'>desc:</span> <span class='id identifier rubyid_desc'>desc</span> <span class='rbrace'>}</span>
391
- <span class='kw'>end</span></pre>
392
- </td>
393
- </tr>
394
- </table>
395
- </div>
396
-
397
- <div class="method_details ">
398
- <h3 class="signature " id="next_cont-instance_method">
399
-
400
- #<strong>next_cont</strong>(head) &#x21d2; <tt>Object</tt>
401
-
402
-
403
-
404
-
405
-
406
- </h3><table class="source_code">
407
- <tr>
408
- <td>
409
- <pre class="lines">
410
-
411
-
412
- 28
413
- 29
414
- 30
415
- 31
416
- 32
417
- 33
418
- 34
419
- 35
420
- 36</pre>
421
- </td>
422
- <td>
423
- <pre class="code"><span class="info file"># File 'lib/my_help/org2yml.rb', line 28</span>
424
-
425
- <span class='kw'>def</span> <span class='id identifier rubyid_next_cont'>next_cont</span><span class='lparen'>(</span><span class='id identifier rubyid_head'>head</span><span class='rparen'>)</span>
426
- <span class='ivar'>@help_cont</span><span class='lbracket'>[</span><span class='ivar'>@head_sym</span><span class='rbracket'>]</span><span class='lbracket'>[</span><span class='symbol'>:cont</span><span class='rbracket'>]</span> <span class='op'>=</span> <span class='ivar'>@conts</span> <span class='kw'>if</span> <span class='ivar'>@head_sym</span>
427
- <span class='kw'>return</span> <span class='kw'>if</span> <span class='id identifier rubyid_head'>head</span> <span class='op'>==</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>EOF</span><span class='tstring_end'>&#39;</span></span>
428
- <span class='ivar'>@conts</span> <span class='op'>=</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_end'>&#39;</span></span>
429
- <span class='ivar'>@head_sym</span> <span class='op'>=</span> <span class='id identifier rubyid_head'>head</span><span class='period'>.</span><span class='id identifier rubyid_to_sym'>to_sym</span>
430
- <span class='ivar'>@help_cont</span><span class='lbracket'>[</span><span class='ivar'>@head_sym</span><span class='rbracket'>]</span> <span class='op'>=</span> <span class='lbrace'>{</span>
431
- <span class='label'>opts:</span> <span class='id identifier rubyid_make_options'>make_options</span><span class='lparen'>(</span><span class='id identifier rubyid_head'>head</span><span class='rparen'>)</span><span class='comma'>,</span> <span class='label'>title:</span> <span class='id identifier rubyid_head'>head</span><span class='comma'>,</span> <span class='label'>cont:</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_end'>&#39;</span></span>
432
- <span class='rbrace'>}</span>
433
- <span class='kw'>end</span></pre>
434
- </td>
435
- </tr>
436
- </table>
437
- </div>
438
-
439
- <div class="method_details ">
440
- <h3 class="signature " id="org_to_yaml-instance_method">
441
-
442
- #<strong>org_to_yaml</strong>(lines) &#x21d2; <tt>Object</tt>
443
-
444
-
445
-
446
-
447
-
448
- </h3><table class="source_code">
449
- <tr>
450
- <td>
451
- <pre class="lines">
452
-
453
-
454
- 38
455
- 39
456
- 40
457
- 41
458
- 42
459
- 43
460
- 44
461
- 45
462
- 46
463
- 47
464
- 48</pre>
465
- </td>
466
- <td>
467
- <pre class="code"><span class="info file"># File 'lib/my_help/org2yml.rb', line 38</span>
468
-
469
- <span class='kw'>def</span> <span class='id identifier rubyid_org_to_yaml'>org_to_yaml</span><span class='lparen'>(</span><span class='id identifier rubyid_lines'>lines</span><span class='rparen'>)</span>
470
- <span class='id identifier rubyid_lines'>lines</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_line'>line</span><span class='op'>|</span>
471
- <span class='id identifier rubyid_m'>m</span> <span class='op'>=</span> <span class='id identifier rubyid_line'>line</span><span class='period'>.</span><span class='id identifier rubyid_force_encoding'>force_encoding</span><span class='lparen'>(</span><span class='const'>Encoding</span><span class='op'>::</span><span class='const'>UTF_8</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_match'>match</span><span class='lparen'>(</span><span class='tstring'><span class='regexp_beg'>/</span><span class='tstring_content'>^\* (.+)</span><span class='regexp_end'>/u</span></span><span class='rparen'>)</span>
472
- <span class='kw'>if</span> <span class='id identifier rubyid_m'>m</span>
473
- <span class='id identifier rubyid_next_cont'>next_cont</span> <span class='id identifier rubyid_m'>m</span><span class='lbracket'>[</span><span class='int'>1</span><span class='rbracket'>]</span>
474
- <span class='kw'>else</span>
475
- <span class='ivar'>@conts</span> <span class='op'>&lt;&lt;</span> <span class='id identifier rubyid_line'>line</span>
476
- <span class='kw'>end</span>
477
- <span class='kw'>end</span>
478
- <span class='id identifier rubyid_next_cont'>next_cont</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>EOF</span><span class='tstring_end'>&#39;</span></span>
479
- <span class='kw'>end</span></pre>
480
- </td>
481
- </tr>
482
- </table>
483
- </div>
484
-
485
- </div>
486
-
487
- </div>
488
-
489
- <div id="footer">
490
- Generated on Thu Apr 1 16:20:44 2021 by
491
- <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
492
- 0.9.26 (ruby-2.7.2).
493
- </div>
494
-
495
- </div>
496
- </body>
497
- </html>
data/tmp.txt DELETED
@@ -1,14 +0,0 @@
1
- Commands:
2
- my_help delete HELP # delete HELP
3
- my_help edit HELP # edit HELP
4
- my_help git [push|pull] # git push or pull
5
- my_help help [COMMAND] # Describe available commands or one specific command
6
- my_help list [HELP] [ITEM] # list all helps, specific HELP, or ITEM
7
- my_help new HELP # make new HELP
8
- my_help set_editor EDITOR_NAME # set editor to EDITOR_NAME
9
- my_help setup # set up the test database
10
- my_help version # show version
11
-
12
- Options:
13
- d, [--dir=DIR]
14
-