standup_md 0.0.10

Sign up to get free protection for your applications and to get access to all the features.
Files changed (64) hide show
  1. checksums.yaml +7 -0
  2. data/.github/workflows/ruby.yml +24 -0
  3. data/.gitignore +1 -0
  4. data/Gemfile +10 -0
  5. data/Gemfile.lock +23 -0
  6. data/LICENSE +21 -0
  7. data/README.md +252 -0
  8. data/Rakefile +36 -0
  9. data/_config.yml +1 -0
  10. data/bin/standup +5 -0
  11. data/doc/README_md.html +290 -0
  12. data/doc/StandupMD/Cli.html +898 -0
  13. data/doc/StandupMD.html +1453 -0
  14. data/doc/TestHelper.html +282 -0
  15. data/doc/TestStandupMD.html +1938 -0
  16. data/doc/created.rid +8 -0
  17. data/doc/css/fonts.css +167 -0
  18. data/doc/css/rdoc.css +611 -0
  19. data/doc/fonts/Lato-Light.ttf +0 -0
  20. data/doc/fonts/Lato-LightItalic.ttf +0 -0
  21. data/doc/fonts/Lato-Regular.ttf +0 -0
  22. data/doc/fonts/Lato-RegularItalic.ttf +0 -0
  23. data/doc/fonts/SourceCodePro-Bold.ttf +0 -0
  24. data/doc/fonts/SourceCodePro-Regular.ttf +0 -0
  25. data/doc/images/add.png +0 -0
  26. data/doc/images/arrow_up.png +0 -0
  27. data/doc/images/brick.png +0 -0
  28. data/doc/images/brick_link.png +0 -0
  29. data/doc/images/bug.png +0 -0
  30. data/doc/images/bullet_black.png +0 -0
  31. data/doc/images/bullet_toggle_minus.png +0 -0
  32. data/doc/images/bullet_toggle_plus.png +0 -0
  33. data/doc/images/date.png +0 -0
  34. data/doc/images/delete.png +0 -0
  35. data/doc/images/find.png +0 -0
  36. data/doc/images/loadingAnimation.gif +0 -0
  37. data/doc/images/macFFBgHack.png +0 -0
  38. data/doc/images/package.png +0 -0
  39. data/doc/images/page_green.png +0 -0
  40. data/doc/images/page_white_text.png +0 -0
  41. data/doc/images/page_white_width.png +0 -0
  42. data/doc/images/plugin.png +0 -0
  43. data/doc/images/ruby.png +0 -0
  44. data/doc/images/tag_blue.png +0 -0
  45. data/doc/images/tag_green.png +0 -0
  46. data/doc/images/transparent.png +0 -0
  47. data/doc/images/wrench.png +0 -0
  48. data/doc/images/wrench_orange.png +0 -0
  49. data/doc/images/zoom.png +0 -0
  50. data/doc/index.html +286 -0
  51. data/doc/js/darkfish.js +84 -0
  52. data/doc/js/navigation.js +105 -0
  53. data/doc/js/navigation.js.gz +0 -0
  54. data/doc/js/search.js +110 -0
  55. data/doc/js/search_index.js +1 -0
  56. data/doc/js/search_index.js.gz +0 -0
  57. data/doc/js/searcher.js +229 -0
  58. data/doc/js/searcher.js.gz +0 -0
  59. data/doc/table_of_contents.html +551 -0
  60. data/lib/standup_md/cli.rb +301 -0
  61. data/lib/standup_md/version.rb +9 -0
  62. data/lib/standup_md.rb +530 -0
  63. data/standup_md.gemspec +36 -0
  64. metadata +108 -0
@@ -0,0 +1,898 @@
1
+ <!DOCTYPE html>
2
+
3
+ <html>
4
+ <head>
5
+ <meta charset="UTF-8">
6
+
7
+ <title>class StandupMD::CLI - RDoc Documentation</title>
8
+
9
+ <script type="text/javascript">
10
+ var rdoc_rel_prefix = "../";
11
+ var index_rel_prefix = "../";
12
+ </script>
13
+
14
+ <script src="../js/navigation.js" defer></script>
15
+ <script src="../js/search.js" defer></script>
16
+ <script src="../js/search_index.js" defer></script>
17
+ <script src="../js/searcher.js" defer></script>
18
+ <script src="../js/darkfish.js" defer></script>
19
+
20
+ <link href="../css/fonts.css" rel="stylesheet">
21
+ <link href="../css/rdoc.css" rel="stylesheet">
22
+
23
+
24
+
25
+
26
+ <body id="top" role="document" class="class">
27
+ <nav role="navigation">
28
+ <div id="project-navigation">
29
+ <div id="home-section" role="region" title="Quick navigation" class="nav-section">
30
+ <h2>
31
+ <a href="../index.html" rel="home">Home</a>
32
+ </h2>
33
+
34
+ <div id="table-of-contents-navigation">
35
+ <a href="../table_of_contents.html#pages">Pages</a>
36
+ <a href="../table_of_contents.html#classes">Classes</a>
37
+ <a href="../table_of_contents.html#methods">Methods</a>
38
+ </div>
39
+ </div>
40
+
41
+ <div id="search-section" role="search" class="project-section initially-hidden">
42
+ <form action="#" method="get" accept-charset="utf-8">
43
+ <div id="search-field-wrapper">
44
+ <input id="search-field" role="combobox" aria-label="Search"
45
+ aria-autocomplete="list" aria-controls="search-results"
46
+ type="text" name="search" placeholder="Search" spellcheck="false"
47
+ title="Type to search, Up and Down to navigate, Enter to load">
48
+ </div>
49
+
50
+ <ul id="search-results" aria-label="Search Results"
51
+ aria-busy="false" aria-expanded="false"
52
+ aria-atomic="false" class="initially-hidden"></ul>
53
+ </form>
54
+ </div>
55
+
56
+ </div>
57
+
58
+
59
+
60
+ <div id="class-metadata">
61
+
62
+ <div id="parent-class-section" class="nav-section">
63
+ <h3>Parent</h3>
64
+
65
+
66
+ <p class="link">Object
67
+
68
+ </div>
69
+
70
+
71
+
72
+ <!-- Method Quickref -->
73
+ <div id="method-list-section" class="nav-section">
74
+ <h3>Methods</h3>
75
+
76
+ <ul class="link-list" role="directory">
77
+
78
+ <li ><a href="#method-c-execute">::execute</a>
79
+
80
+ <li ><a href="#method-c-new">::new</a>
81
+
82
+ <li ><a href="#method-i-append_previous-3F">#append_previous?</a>
83
+
84
+ <li ><a href="#method-i-append_to_previous_entry_tasks">#append_to_previous_entry_tasks</a>
85
+
86
+ <li ><a href="#method-i-echo">#echo</a>
87
+
88
+ <li ><a href="#method-i-edit">#edit</a>
89
+
90
+ <li ><a href="#method-i-edit-3F">#edit?</a>
91
+
92
+ <li ><a href="#method-i-editor">#editor</a>
93
+
94
+ <li ><a href="#method-i-json-3F">#json?</a>
95
+
96
+ <li ><a href="#method-i-print_all_entries">#print_all_entries</a>
97
+
98
+ <li ><a href="#method-i-print_all_entries-3F">#print_all_entries?</a>
99
+
100
+ <li ><a href="#method-i-print_current_entry">#print_current_entry</a>
101
+
102
+ <li ><a href="#method-i-print_current_entry-3F">#print_current_entry?</a>
103
+
104
+ <li ><a href="#method-i-should_append-3F">#should_append?</a>
105
+
106
+ <li ><a href="#method-i-standup">#standup</a>
107
+
108
+ <li ><a href="#method-i-verbose-3F">#verbose?</a>
109
+
110
+ <li ><a href="#method-i-write-3F">#write?</a>
111
+
112
+ <li ><a href="#method-i-write_file">#write_file</a>
113
+
114
+ </ul>
115
+ </div>
116
+
117
+ </div>
118
+ </nav>
119
+
120
+ <main role="main" aria-labelledby="class-StandupMD::CLI">
121
+ <h1 id="class-StandupMD::CLI" class="class">
122
+ class StandupMD::CLI
123
+ </h1>
124
+
125
+ <section class="description">
126
+
127
+ <p>Class for handing the command-line interface.</p>
128
+
129
+ </section>
130
+
131
+
132
+ <section id="5Buntitled-5D" class="documentation-section">
133
+
134
+
135
+
136
+
137
+
138
+ <section class="constants-list">
139
+ <header>
140
+ <h3>Constants</h3>
141
+ </header>
142
+ <dl>
143
+
144
+ <dt id="PREFERENCE_FILE">PREFERENCE_FILE
145
+
146
+ <dd><p>The user&#39;s preference file.</p>
147
+
148
+
149
+ </dl>
150
+ </section>
151
+
152
+
153
+
154
+ <section class="attribute-method-details" class="method-section">
155
+ <header>
156
+ <h3>Attributes</h3>
157
+ </header>
158
+
159
+
160
+ <div id="attribute-i-options" class="method-detail">
161
+ <div class="method-heading attribute-method-heading">
162
+ <span class="method-name">options</span><span
163
+ class="attribute-access-type">[R]</span>
164
+ </div>
165
+
166
+ <div class="method-description">
167
+
168
+ <p>Arguments passed at runtime.</p>
169
+
170
+ <p>@return [Array] ARGV</p>
171
+
172
+ </div>
173
+ </div>
174
+
175
+ <div id="attribute-i-preferences" class="method-detail">
176
+ <div class="method-heading attribute-method-heading">
177
+ <span class="method-name">preferences</span><span
178
+ class="attribute-access-type">[R]</span>
179
+ </div>
180
+
181
+ <div class="method-description">
182
+
183
+ <p>Preferences after reading config file and parsing ARGV.</p>
184
+
185
+ <p>@return [Array] ARGV</p>
186
+
187
+ </div>
188
+ </div>
189
+
190
+ </section>
191
+
192
+
193
+
194
+ <section id="public-class-5Buntitled-5D-method-details" class="method-section">
195
+ <header>
196
+ <h3>Public Class Methods</h3>
197
+ </header>
198
+
199
+
200
+ <div id="method-c-execute" class="method-detail ">
201
+
202
+ <div class="method-heading">
203
+ <span class="method-name">execute</span><span
204
+ class="method-args">(options = [])</span>
205
+
206
+ <span class="method-click-advice">click to toggle source</span>
207
+
208
+ </div>
209
+
210
+
211
+ <div class="method-description">
212
+
213
+ <p>Creates an instance of <code>StandupMD</code> and runs what the user requested.</p>
214
+
215
+
216
+
217
+
218
+ <div class="method-source-code" id="execute-source">
219
+ <pre><span class="ruby-comment"># File lib/standup_md/cli.rb, line 18</span>
220
+ <span class="ruby-keyword">def</span> <span class="ruby-keyword">self</span>.<span class="ruby-identifier ruby-title">execute</span>(<span class="ruby-identifier">options</span> = [])
221
+ <span class="ruby-identifier">exe</span> = <span class="ruby-identifier">new</span>(<span class="ruby-identifier">options</span>)
222
+ <span class="ruby-identifier">exe</span>.<span class="ruby-identifier">append_to_previous_entry_tasks</span> <span class="ruby-keyword">if</span> <span class="ruby-identifier">exe</span>.<span class="ruby-identifier">should_append?</span>
223
+
224
+ <span class="ruby-identifier">exe</span>.<span class="ruby-identifier">print_current_entry</span> <span class="ruby-keyword">if</span> <span class="ruby-identifier">exe</span>.<span class="ruby-identifier">print_current_entry?</span>
225
+ <span class="ruby-identifier">exe</span>.<span class="ruby-identifier">print_all_entries</span> <span class="ruby-keyword">if</span> <span class="ruby-identifier">exe</span>.<span class="ruby-identifier">print_all_entries?</span>
226
+ <span class="ruby-identifier">exe</span>.<span class="ruby-identifier">write_file</span> <span class="ruby-keyword">if</span> <span class="ruby-identifier">exe</span>.<span class="ruby-identifier">write?</span>
227
+ <span class="ruby-identifier">exe</span>.<span class="ruby-identifier">edit</span> <span class="ruby-keyword">if</span> <span class="ruby-identifier">exe</span>.<span class="ruby-identifier">edit?</span>
228
+ <span class="ruby-keyword">end</span></pre>
229
+ </div>
230
+
231
+ </div>
232
+
233
+
234
+
235
+
236
+ </div>
237
+
238
+
239
+ <div id="method-c-new" class="method-detail ">
240
+
241
+ <div class="method-heading">
242
+ <span class="method-name">new</span><span
243
+ class="method-args">(options)</span>
244
+
245
+ <span class="method-click-advice">click to toggle source</span>
246
+
247
+ </div>
248
+
249
+
250
+ <div class="method-description">
251
+
252
+ <p>Constructor. Sets defaults.</p>
253
+
254
+ <p>@param [Array] options</p>
255
+
256
+
257
+
258
+
259
+ <div class="method-source-code" id="new-source">
260
+ <pre><span class="ruby-comment"># File lib/standup_md/cli.rb, line 44</span>
261
+ <span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">initialize</span>(<span class="ruby-identifier">options</span>)
262
+ <span class="ruby-ivar">@edit</span> = <span class="ruby-keyword">true</span>
263
+ <span class="ruby-ivar">@write</span> = <span class="ruby-keyword">true</span>
264
+ <span class="ruby-ivar">@append_previous</span> = <span class="ruby-keyword">true</span>
265
+ <span class="ruby-ivar">@print_current_entry</span> = <span class="ruby-keyword">false</span>
266
+ <span class="ruby-ivar">@json</span> = <span class="ruby-keyword">false</span>
267
+ <span class="ruby-ivar">@verbose</span> = <span class="ruby-keyword">false</span>
268
+ <span class="ruby-ivar">@print_all_entries</span> = <span class="ruby-keyword">false</span>
269
+ <span class="ruby-ivar">@options</span> = <span class="ruby-identifier">options</span>
270
+ <span class="ruby-ivar">@preferences</span> = <span class="ruby-identifier">get_preferences</span>
271
+ <span class="ruby-keyword">end</span></pre>
272
+ </div>
273
+
274
+ </div>
275
+
276
+
277
+
278
+
279
+ </div>
280
+
281
+
282
+ </section>
283
+
284
+ <section id="public-instance-5Buntitled-5D-method-details" class="method-section">
285
+ <header>
286
+ <h3>Public Instance Methods</h3>
287
+ </header>
288
+
289
+
290
+ <div id="method-i-append_previous-3F" class="method-detail ">
291
+
292
+ <div class="method-heading">
293
+ <span class="method-name">append_previous?</span><span
294
+ class="method-args">()</span>
295
+
296
+ <span class="method-click-advice">click to toggle source</span>
297
+
298
+ </div>
299
+
300
+
301
+ <div class="method-description">
302
+
303
+ <p>Should `previous_entry_tasks` be appended? If false, <code>previous_entry_tasks</code> will be overwritten.</p>
304
+
305
+ <p>@return [Boolean] Default is true</p>
306
+
307
+
308
+
309
+
310
+ <div class="method-source-code" id="append_previous-3F-source">
311
+ <pre><span class="ruby-comment"># File lib/standup_md/cli.rb, line 203</span>
312
+ <span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">append_previous?</span>
313
+ <span class="ruby-ivar">@append_previous</span>
314
+ <span class="ruby-keyword">end</span></pre>
315
+ </div>
316
+
317
+ </div>
318
+
319
+
320
+
321
+
322
+ </div>
323
+
324
+
325
+ <div id="method-i-append_to_previous_entry_tasks" class="method-detail ">
326
+
327
+ <div class="method-heading">
328
+ <span class="method-name">append_to_previous_entry_tasks</span><span
329
+ class="method-args">()</span>
330
+
331
+ <span class="method-click-advice">click to toggle source</span>
332
+
333
+ </div>
334
+
335
+
336
+ <div class="method-description">
337
+
338
+ <p>Appends entries passed at runtime to existing previous entries.</p>
339
+
340
+ <p>@return [Hash]</p>
341
+
342
+
343
+
344
+
345
+ <div class="method-source-code" id="append_to_previous_entry_tasks-source">
346
+ <pre><span class="ruby-comment"># File lib/standup_md/cli.rb, line 128</span>
347
+ <span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">append_to_previous_entry_tasks</span>
348
+ <span class="ruby-identifier">echo</span> <span class="ruby-string">&#39;Appending previous entry tasks&#39;</span>
349
+ <span class="ruby-identifier">additions</span> = <span class="ruby-identifier">preferences</span>.<span class="ruby-identifier">delete</span>(<span class="ruby-string">&#39;previous_entry_tasks&#39;</span>)
350
+ <span class="ruby-identifier">standup</span>.<span class="ruby-identifier">previous_entry_tasks</span>.<span class="ruby-identifier">concat</span>(<span class="ruby-identifier">additions</span>)
351
+ <span class="ruby-keyword">end</span></pre>
352
+ </div>
353
+
354
+ </div>
355
+
356
+
357
+
358
+
359
+ </div>
360
+
361
+
362
+ <div id="method-i-echo" class="method-detail ">
363
+
364
+ <div class="method-heading">
365
+ <span class="method-name">echo</span><span
366
+ class="method-args">(msg)</span>
367
+
368
+ <span class="method-click-advice">click to toggle source</span>
369
+
370
+ </div>
371
+
372
+
373
+ <div class="method-description">
374
+
375
+ <p>Prints output if <code>verbose</code> is true.</p>
376
+
377
+ <p>@return [nil]</p>
378
+
379
+
380
+
381
+
382
+ <div class="method-source-code" id="echo-source">
383
+ <pre><span class="ruby-comment"># File lib/standup_md/cli.rb, line 219</span>
384
+ <span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">echo</span>(<span class="ruby-identifier">msg</span>)
385
+ <span class="ruby-identifier">puts</span> <span class="ruby-identifier">msg</span> <span class="ruby-keyword">if</span> <span class="ruby-identifier">verbose?</span>
386
+ <span class="ruby-keyword">end</span></pre>
387
+ </div>
388
+
389
+ </div>
390
+
391
+
392
+
393
+
394
+ </div>
395
+
396
+
397
+ <div id="method-i-edit" class="method-detail ">
398
+
399
+ <div class="method-heading">
400
+ <span class="method-name">edit</span><span
401
+ class="method-args">()</span>
402
+
403
+ <span class="method-click-advice">click to toggle source</span>
404
+
405
+ </div>
406
+
407
+
408
+ <div class="method-description">
409
+
410
+ <p>Opens the file in an editor. Abandons the script.</p>
411
+
412
+
413
+
414
+
415
+ <div class="method-source-code" id="edit-source">
416
+ <pre><span class="ruby-comment"># File lib/standup_md/cli.rb, line 136</span>
417
+ <span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">edit</span>
418
+ <span class="ruby-identifier">echo</span> <span class="ruby-node">&quot; Opening file in #{editor}&quot;</span>
419
+ <span class="ruby-identifier">exec</span>(<span class="ruby-node">&quot;#{editor} #{standup.file}&quot;</span>)
420
+ <span class="ruby-keyword">end</span></pre>
421
+ </div>
422
+
423
+ </div>
424
+
425
+
426
+
427
+
428
+ </div>
429
+
430
+
431
+ <div id="method-i-edit-3F" class="method-detail ">
432
+
433
+ <div class="method-heading">
434
+ <span class="method-name">edit?</span><span
435
+ class="method-args">()</span>
436
+
437
+ <span class="method-click-advice">click to toggle source</span>
438
+
439
+ </div>
440
+
441
+
442
+ <div class="method-description">
443
+
444
+ <p>Should the standup file be opened in the editor?</p>
445
+
446
+ <p>@return [Boolean] Default is true</p>
447
+
448
+
449
+
450
+
451
+ <div class="method-source-code" id="edit-3F-source">
452
+ <pre><span class="ruby-comment"># File lib/standup_md/cli.rb, line 194</span>
453
+ <span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">edit?</span>
454
+ <span class="ruby-ivar">@edit</span>
455
+ <span class="ruby-keyword">end</span></pre>
456
+ </div>
457
+
458
+ </div>
459
+
460
+
461
+
462
+
463
+ </div>
464
+
465
+
466
+ <div id="method-i-editor" class="method-detail ">
467
+
468
+ <div class="method-heading">
469
+ <span class="method-name">editor</span><span
470
+ class="method-args">()</span>
471
+
472
+ <span class="method-click-advice">click to toggle source</span>
473
+
474
+ </div>
475
+
476
+
477
+ <div class="method-description">
478
+
479
+ <p>Tries to determine the editor, first by checking if the user has one set in their preferences. If not, the <code>VISUAL</code> and <code>EDITOR</code> environmental variables are checked. If none of the above are set, defaults to <code>vim</code>.</p>
480
+
481
+ <p>@return [String] The editor</p>
482
+
483
+
484
+
485
+
486
+ <div class="method-source-code" id="editor-source">
487
+ <pre><span class="ruby-comment"># File lib/standup_md/cli.rb, line 76</span>
488
+ <span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">editor</span>
489
+ <span class="ruby-ivar">@editor</span> <span class="ruby-operator">||=</span>
490
+ <span class="ruby-keyword">if</span> <span class="ruby-identifier">preferences</span>.<span class="ruby-identifier">key?</span>(<span class="ruby-string">&#39;editor&#39;</span>)
491
+ <span class="ruby-identifier">echo</span> <span class="ruby-node">&quot;Editor set to [#{preferences.key(&#39;editor&#39;)}] via preferences&quot;</span>
492
+ <span class="ruby-identifier">preferences</span>.<span class="ruby-identifier">delete</span>(<span class="ruby-string">&#39;editor&#39;</span>)
493
+ <span class="ruby-keyword">elsif</span> <span class="ruby-constant">ENV</span>[<span class="ruby-string">&#39;VISUAL&#39;</span>]
494
+ <span class="ruby-identifier">echo</span> <span class="ruby-node">&quot;Editor set to [#{ENV[&#39;VISUAL&#39;]}] (ENV[&#39;VISUAL&#39;])&quot;</span>
495
+ <span class="ruby-constant">ENV</span>[<span class="ruby-string">&#39;VISUAL&#39;</span>]
496
+ <span class="ruby-keyword">elsif</span> <span class="ruby-constant">ENV</span>[<span class="ruby-string">&#39;EDITOR&#39;</span>]
497
+ <span class="ruby-identifier">echo</span> <span class="ruby-node">&quot;Editor set to [#{ENV[&#39;EDITOR&#39;]}] (ENV[&#39;EDITOR&#39;])&quot;</span>
498
+ <span class="ruby-constant">ENV</span>[<span class="ruby-string">&#39;EDITOR&#39;</span>]
499
+ <span class="ruby-keyword">else</span>
500
+ <span class="ruby-identifier">echo</span> <span class="ruby-string">&quot;Editor set to [vim] (default)&quot;</span>
501
+ <span class="ruby-string">&#39;vim&#39;</span>
502
+ <span class="ruby-keyword">end</span>
503
+ <span class="ruby-keyword">end</span></pre>
504
+ </div>
505
+
506
+ </div>
507
+
508
+
509
+
510
+
511
+ </div>
512
+
513
+
514
+ <div id="method-i-json-3F" class="method-detail ">
515
+
516
+ <div class="method-heading">
517
+ <span class="method-name">json?</span><span
518
+ class="method-args">()</span>
519
+
520
+ <span class="method-click-advice">click to toggle source</span>
521
+
522
+ </div>
523
+
524
+
525
+ <div class="method-description">
526
+
527
+ <p>If printing an entry, should it be printed as json?</p>
528
+
529
+ <p>@return [Boolean] Default is false</p>
530
+
531
+
532
+
533
+
534
+ <div class="method-source-code" id="json-3F-source">
535
+ <pre><span class="ruby-comment"># File lib/standup_md/cli.rb, line 162</span>
536
+ <span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">json?</span>
537
+ <span class="ruby-ivar">@json</span>
538
+ <span class="ruby-keyword">end</span></pre>
539
+ </div>
540
+
541
+ </div>
542
+
543
+
544
+
545
+
546
+ </div>
547
+
548
+
549
+ <div id="method-i-print_all_entries" class="method-detail ">
550
+
551
+ <div class="method-heading">
552
+ <span class="method-name">print_all_entries</span><span
553
+ class="method-args">()</span>
554
+
555
+ <span class="method-click-advice">click to toggle source</span>
556
+
557
+ </div>
558
+
559
+
560
+ <div class="method-description">
561
+
562
+ <p>Prints all entries to the command line.</p>
563
+
564
+ <p>@return [nil]</p>
565
+
566
+
567
+
568
+
569
+ <div class="method-source-code" id="print_all_entries-source">
570
+ <pre><span class="ruby-comment"># File lib/standup_md/cli.rb, line 97</span>
571
+ <span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">print_all_entries</span>
572
+ <span class="ruby-identifier">echo</span> <span class="ruby-string">&#39;Display all entries&#39;</span>
573
+ <span class="ruby-keyword">unless</span> <span class="ruby-identifier">json?</span>
574
+ <span class="ruby-identifier">standup</span>.<span class="ruby-identifier">all_entries</span>.<span class="ruby-identifier">keys</span>.<span class="ruby-identifier">reverse</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">head</span><span class="ruby-operator">|</span>
575
+ <span class="ruby-identifier">print_entry</span>(<span class="ruby-identifier">head</span>, <span class="ruby-identifier">standup</span>.<span class="ruby-identifier">all_entries</span>[<span class="ruby-identifier">head</span>])
576
+ <span class="ruby-keyword">end</span>
577
+ <span class="ruby-keyword">return</span>
578
+ <span class="ruby-keyword">end</span>
579
+ <span class="ruby-identifier">echo</span> <span class="ruby-string">&#39; ...as json&#39;</span>
580
+ <span class="ruby-identifier">puts</span> <span class="ruby-identifier">standup</span>.<span class="ruby-identifier">all_entries</span>.<span class="ruby-identifier">to_json</span>
581
+ <span class="ruby-keyword">end</span></pre>
582
+ </div>
583
+
584
+ </div>
585
+
586
+
587
+
588
+
589
+ </div>
590
+
591
+
592
+ <div id="method-i-print_all_entries-3F" class="method-detail ">
593
+
594
+ <div class="method-heading">
595
+ <span class="method-name">print_all_entries?</span><span
596
+ class="method-args">()</span>
597
+
598
+ <span class="method-click-advice">click to toggle source</span>
599
+
600
+ </div>
601
+
602
+
603
+ <div class="method-description">
604
+
605
+ <p>Should all entries be printed? If true, disables editing.</p>
606
+
607
+ <p>@return [Boolean] Default is false</p>
608
+
609
+
610
+
611
+
612
+ <div class="method-source-code" id="print_all_entries-3F-source">
613
+ <pre><span class="ruby-comment"># File lib/standup_md/cli.rb, line 170</span>
614
+ <span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">print_all_entries?</span>
615
+ <span class="ruby-ivar">@print_all_entries</span>
616
+ <span class="ruby-keyword">end</span></pre>
617
+ </div>
618
+
619
+ </div>
620
+
621
+
622
+
623
+
624
+ </div>
625
+
626
+
627
+ <div id="method-i-print_current_entry" class="method-detail ">
628
+
629
+ <div class="method-heading">
630
+ <span class="method-name">print_current_entry</span><span
631
+ class="method-args">()</span>
632
+
633
+ <span class="method-click-advice">click to toggle source</span>
634
+
635
+ </div>
636
+
637
+
638
+ <div class="method-description">
639
+
640
+ <p>Prints the current entry to the command line.</p>
641
+
642
+ <p>@return [nil]</p>
643
+
644
+
645
+
646
+
647
+ <div class="method-source-code" id="print_current_entry-source">
648
+ <pre><span class="ruby-comment"># File lib/standup_md/cli.rb, line 113</span>
649
+ <span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">print_current_entry</span>
650
+ <span class="ruby-identifier">echo</span> <span class="ruby-string">&#39;Print current entry&#39;</span>
651
+ <span class="ruby-keyword">unless</span> <span class="ruby-identifier">json?</span>
652
+ <span class="ruby-identifier">print_entry</span>(<span class="ruby-identifier">standup</span>.<span class="ruby-identifier">header</span>, <span class="ruby-identifier">standup</span>.<span class="ruby-identifier">current_entry</span>)
653
+ <span class="ruby-keyword">return</span>
654
+ <span class="ruby-keyword">end</span>
655
+ <span class="ruby-identifier">echo</span> <span class="ruby-string">&#39; ...as json&#39;</span>
656
+ <span class="ruby-identifier">entry</span> = {<span class="ruby-identifier">standup</span>.<span class="ruby-identifier">header</span> <span class="ruby-operator">=&gt;</span> <span class="ruby-identifier">standup</span>.<span class="ruby-identifier">current_entry</span>}.<span class="ruby-identifier">to_json</span>
657
+ <span class="ruby-identifier">puts</span> <span class="ruby-identifier">entry</span>
658
+ <span class="ruby-keyword">end</span></pre>
659
+ </div>
660
+
661
+ </div>
662
+
663
+
664
+
665
+
666
+ </div>
667
+
668
+
669
+ <div id="method-i-print_current_entry-3F" class="method-detail ">
670
+
671
+ <div class="method-heading">
672
+ <span class="method-name">print_current_entry?</span><span
673
+ class="method-args">()</span>
674
+
675
+ <span class="method-click-advice">click to toggle source</span>
676
+
677
+ </div>
678
+
679
+
680
+ <div class="method-description">
681
+
682
+ <p>Should current entry be printed? If true, disables editing.</p>
683
+
684
+ <p>@return [Boolean] Default is false</p>
685
+
686
+
687
+
688
+
689
+ <div class="method-source-code" id="print_current_entry-3F-source">
690
+ <pre><span class="ruby-comment"># File lib/standup_md/cli.rb, line 154</span>
691
+ <span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">print_current_entry?</span>
692
+ <span class="ruby-ivar">@print_current_entry</span>
693
+ <span class="ruby-keyword">end</span></pre>
694
+ </div>
695
+
696
+ </div>
697
+
698
+
699
+
700
+
701
+ </div>
702
+
703
+
704
+ <div id="method-i-should_append-3F" class="method-detail ">
705
+
706
+ <div class="method-heading">
707
+ <span class="method-name">should_append?</span><span
708
+ class="method-args">()</span>
709
+
710
+ <span class="method-click-advice">click to toggle source</span>
711
+
712
+ </div>
713
+
714
+
715
+ <div class="method-description">
716
+
717
+ <p>Did the user pass <code>previous_entry_tasks</code>, and should we append?</p>
718
+
719
+ <p>@return [Boolean]</p>
720
+
721
+
722
+
723
+
724
+ <div class="method-source-code" id="should_append-3F-source">
725
+ <pre><span class="ruby-comment"># File lib/standup_md/cli.rb, line 211</span>
726
+ <span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">should_append?</span>
727
+ <span class="ruby-identifier">preferences</span>.<span class="ruby-identifier">key?</span>(<span class="ruby-string">&#39;previous_entry_tasks&#39;</span>) <span class="ruby-operator">&amp;&amp;</span> <span class="ruby-identifier">append_previous?</span>
728
+ <span class="ruby-keyword">end</span></pre>
729
+ </div>
730
+
731
+ </div>
732
+
733
+
734
+
735
+
736
+ </div>
737
+
738
+
739
+ <div id="method-i-standup" class="method-detail ">
740
+
741
+ <div class="method-heading">
742
+ <span class="method-name">standup</span><span
743
+ class="method-args">()</span>
744
+
745
+ <span class="method-click-advice">click to toggle source</span>
746
+
747
+ </div>
748
+
749
+
750
+ <div class="method-description">
751
+
752
+ <p>Sets up an instance of <code>StandupMD</code> and passes all user preferences.</p>
753
+
754
+ <p>@return [StandupMD]</p>
755
+
756
+
757
+
758
+
759
+ <div class="method-source-code" id="standup-source">
760
+ <pre><span class="ruby-comment"># File lib/standup_md/cli.rb, line 60</span>
761
+ <span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">standup</span>
762
+ <span class="ruby-ivar">@standup</span> <span class="ruby-operator">||=</span> <span class="ruby-operator">::</span><span class="ruby-constant">StandupMD</span>.<span class="ruby-identifier">new</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">s</span><span class="ruby-operator">|</span>
763
+ <span class="ruby-identifier">echo</span> <span class="ruby-string">&#39;Runtime options:&#39;</span>
764
+ <span class="ruby-identifier">preferences</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">k</span>, <span class="ruby-identifier">v</span><span class="ruby-operator">|</span>
765
+ <span class="ruby-identifier">echo</span> <span class="ruby-node">&quot; #{k} = #{v}&quot;</span>
766
+ <span class="ruby-identifier">s</span>.<span class="ruby-identifier">send</span>(<span class="ruby-node">&quot;#{k}=&quot;</span>, <span class="ruby-identifier">v</span>)
767
+ <span class="ruby-keyword">end</span>
768
+ <span class="ruby-keyword">end</span>.<span class="ruby-identifier">load</span>
769
+ <span class="ruby-keyword">end</span></pre>
770
+ </div>
771
+
772
+ </div>
773
+
774
+
775
+
776
+
777
+ </div>
778
+
779
+
780
+ <div id="method-i-verbose-3F" class="method-detail ">
781
+
782
+ <div class="method-heading">
783
+ <span class="method-name">verbose?</span><span
784
+ class="method-args">()</span>
785
+
786
+ <span class="method-click-advice">click to toggle source</span>
787
+
788
+ </div>
789
+
790
+
791
+ <div class="method-description">
792
+
793
+ <p>Should debug info be printed?</p>
794
+
795
+ <p>@return [Boolean] Default is false</p>
796
+
797
+
798
+
799
+
800
+ <div class="method-source-code" id="verbose-3F-source">
801
+ <pre><span class="ruby-comment"># File lib/standup_md/cli.rb, line 178</span>
802
+ <span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">verbose?</span>
803
+ <span class="ruby-ivar">@verbose</span>
804
+ <span class="ruby-keyword">end</span></pre>
805
+ </div>
806
+
807
+ </div>
808
+
809
+
810
+
811
+
812
+ </div>
813
+
814
+
815
+ <div id="method-i-write-3F" class="method-detail ">
816
+
817
+ <div class="method-heading">
818
+ <span class="method-name">write?</span><span
819
+ class="method-args">()</span>
820
+
821
+ <span class="method-click-advice">click to toggle source</span>
822
+
823
+ </div>
824
+
825
+
826
+ <div class="method-description">
827
+
828
+ <p>Should the file be written?</p>
829
+
830
+ <p>@return [Boolean] Default is true</p>
831
+
832
+
833
+
834
+
835
+ <div class="method-source-code" id="write-3F-source">
836
+ <pre><span class="ruby-comment"># File lib/standup_md/cli.rb, line 186</span>
837
+ <span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">write?</span>
838
+ <span class="ruby-ivar">@write</span>
839
+ <span class="ruby-keyword">end</span></pre>
840
+ </div>
841
+
842
+ </div>
843
+
844
+
845
+
846
+
847
+ </div>
848
+
849
+
850
+ <div id="method-i-write_file" class="method-detail ">
851
+
852
+ <div class="method-heading">
853
+ <span class="method-name">write_file</span><span
854
+ class="method-args">()</span>
855
+
856
+ <span class="method-click-advice">click to toggle source</span>
857
+
858
+ </div>
859
+
860
+
861
+ <div class="method-description">
862
+
863
+ <p>Writes entries to the file.</p>
864
+
865
+ <p>@return [Boolean] true if file was written</p>
866
+
867
+
868
+
869
+
870
+ <div class="method-source-code" id="write_file-source">
871
+ <pre><span class="ruby-comment"># File lib/standup_md/cli.rb, line 145</span>
872
+ <span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">write_file</span>
873
+ <span class="ruby-identifier">echo</span> <span class="ruby-string">&#39; Writing file&#39;</span>
874
+ <span class="ruby-identifier">standup</span>.<span class="ruby-identifier">write</span>
875
+ <span class="ruby-keyword">end</span></pre>
876
+ </div>
877
+
878
+ </div>
879
+
880
+
881
+
882
+
883
+ </div>
884
+
885
+
886
+ </section>
887
+
888
+ </section>
889
+
890
+ </main>
891
+
892
+
893
+ <footer id="validator-badges" role="contentinfo">
894
+ <p><a href="https://validator.w3.org/check/referer">Validate</a>
895
+ <p>Generated by <a href="https://ruby.github.io/rdoc/">RDoc</a> 6.1.2.
896
+ <p>Based on <a href="http://deveiate.org/projects/Darkfish-RDoc/">Darkfish</a> by <a href="http://deveiate.org">Michael Granger</a>.
897
+ </footer>
898
+