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,1453 @@
1
+ <!DOCTYPE html>
2
+
3
+ <html>
4
+ <head>
5
+ <meta charset="UTF-8">
6
+
7
+ <title>class StandupMD - 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
+ <div id="sections-section" class="nav-section">
62
+ <h3>Sections</h3>
63
+
64
+ <ul class="link-list" role="directory">
65
+
66
+ <li><a href="#5Buntitled-5D"></a></li>
67
+
68
+ <li><a href="#Attributes+that+are+settable+by+the+user-2C+but+have+custom+setters.">Attributes that are settable by the user, but have custom setters.</a></li>
69
+
70
+ <li><a href="#Attributes+that+aren-27t+settable+by+user-2C+but+are+gettable.">Attributes that aren&#39;t settable by user, but are gettable.</a></li>
71
+
72
+ <li><a href="#Attributes+with+default+getters+and+setters.">Attributes with default getters and setters.</a></li>
73
+
74
+ <li><a href="#Booleans">Booleans</a></li>
75
+
76
+ <li><a href="#Custom+setters">Custom setters</a></li>
77
+
78
+ <li><a href="#Misc">Misc</a></li>
79
+
80
+ </ul>
81
+ </div>
82
+
83
+ <div id="parent-class-section" class="nav-section">
84
+ <h3>Parent</h3>
85
+
86
+
87
+ <p class="link">Object
88
+
89
+ </div>
90
+
91
+
92
+
93
+ <!-- Method Quickref -->
94
+ <div id="method-list-section" class="nav-section">
95
+ <h3>Methods</h3>
96
+
97
+ <ul class="link-list" role="directory">
98
+
99
+ <li ><a href="#method-c-load">::load</a>
100
+
101
+ <li ><a href="#method-c-new">::new</a>
102
+
103
+ <li ><a href="#method-i-bullet_character-3D">#bullet_character=</a>
104
+
105
+ <li ><a href="#method-i-current_entry_tasks-3D">#current_entry_tasks=</a>
106
+
107
+ <li ><a href="#method-i-directory-3D">#directory=</a>
108
+
109
+ <li ><a href="#method-i-entry_previously_added-3F">#entry_previously_added?</a>
110
+
111
+ <li ><a href="#method-i-file_written-3F">#file_written?</a>
112
+
113
+ <li ><a href="#method-i-header_depth-3D">#header_depth=</a>
114
+
115
+ <li ><a href="#method-i-impediments-3D">#impediments=</a>
116
+
117
+ <li ><a href="#method-i-load">#load</a>
118
+
119
+ <li ><a href="#method-i-notes-3D">#notes=</a>
120
+
121
+ <li ><a href="#method-i-previous_entry_tasks-3D">#previous_entry_tasks=</a>
122
+
123
+ <li ><a href="#method-i-reload">#reload</a>
124
+
125
+ <li ><a href="#method-i-sub_header_depth-3D">#sub_header_depth=</a>
126
+
127
+ <li ><a href="#method-i-sub_header_order">#sub_header_order</a>
128
+
129
+ <li ><a href="#method-i-sub_header_order-3D">#sub_header_order=</a>
130
+
131
+ <li ><a href="#method-i-write">#write</a>
132
+
133
+ </ul>
134
+ </div>
135
+
136
+ </div>
137
+ </nav>
138
+
139
+ <main role="main" aria-labelledby="class-StandupMD">
140
+ <h1 id="class-StandupMD" class="class">
141
+ class StandupMD
142
+ </h1>
143
+
144
+ <section class="description">
145
+
146
+ <p>The class for handing reading/writing of entries.</p>
147
+
148
+ <p>@example</p>
149
+
150
+ <pre class="ruby"><span class="ruby-identifier">su</span> = <span class="ruby-constant">StandupMD</span>.<span class="ruby-identifier">new</span>
151
+ </pre>
152
+
153
+ </section>
154
+
155
+
156
+ <section id="5Buntitled-5D" class="documentation-section">
157
+
158
+
159
+
160
+
161
+
162
+
163
+
164
+
165
+
166
+ <section id="public-class-5Buntitled-5D-method-details" class="method-section">
167
+ <header>
168
+ <h3>Public Class Methods</h3>
169
+ </header>
170
+
171
+
172
+ <div id="method-c-load" class="method-detail ">
173
+
174
+ <div class="method-heading">
175
+ <span class="method-name">load</span><span
176
+ class="method-args">(attributes = {})</span>
177
+
178
+ <span class="method-click-advice">click to toggle source</span>
179
+
180
+ </div>
181
+
182
+
183
+ <div class="method-description">
184
+
185
+ <p>Convenience method for calling <code>new</code> + <code>load</code></p>
186
+
187
+ <p>@param [Hash] attributes Attributes to set before loading.</p>
188
+
189
+ <p>@example</p>
190
+
191
+ <pre class="ruby"><span class="ruby-identifier">su</span> = <span class="ruby-constant">StandupMD</span>.<span class="ruby-identifier">load</span>(<span class="ruby-value">bullet_character:</span> <span class="ruby-string">&#39;*&#39;</span>)
192
+ </pre>
193
+
194
+
195
+
196
+
197
+ <div class="method-source-code" id="load-source">
198
+ <pre><span class="ruby-comment"># File lib/standup_md.rb, line 21</span>
199
+ <span class="ruby-keyword">def</span> <span class="ruby-keyword">self</span>.<span class="ruby-identifier ruby-title">load</span>(<span class="ruby-identifier">attributes</span> = {})
200
+ <span class="ruby-keyword">self</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>
201
+ <span class="ruby-identifier">attributes</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>
202
+ <span class="ruby-keyword">next</span> <span class="ruby-keyword">unless</span> <span class="ruby-identifier">s</span>.<span class="ruby-identifier">respond_to?</span>(<span class="ruby-identifier">k</span>)
203
+ <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>)
204
+ <span class="ruby-keyword">end</span>
205
+ <span class="ruby-keyword">end</span>.<span class="ruby-identifier">load</span>
206
+ <span class="ruby-keyword">end</span></pre>
207
+ </div>
208
+
209
+ </div>
210
+
211
+
212
+
213
+
214
+ </div>
215
+
216
+
217
+ </section>
218
+
219
+ </section>
220
+
221
+ <section id="Attributes+that+are+settable+by+the+user-2C+but+have+custom+setters." class="documentation-section">
222
+
223
+ <header class="documentation-section-title">
224
+ <h2>
225
+ Attributes that are settable by the user, but have custom setters.
226
+ </h2>
227
+ <span class="section-click-top">
228
+ <a href="#top">&uarr; top</a>
229
+ </span>
230
+ </header>
231
+
232
+
233
+
234
+
235
+
236
+
237
+
238
+ <section class="attribute-method-details" class="method-section">
239
+ <header>
240
+ <h3>Attributes</h3>
241
+ </header>
242
+
243
+
244
+ <div id="attribute-i-bullet_character" class="method-detail">
245
+ <div class="method-heading attribute-method-heading">
246
+ <span class="method-name">bullet_character</span><span
247
+ class="attribute-access-type">[R]</span>
248
+ </div>
249
+
250
+ <div class="method-description">
251
+
252
+ <p>Character used as bullets for list entries.</p>
253
+
254
+ <p>@return [String] either - (dash) or * (asterisk)</p>
255
+
256
+ </div>
257
+ </div>
258
+
259
+ <div id="attribute-i-current_entry_tasks" class="method-detail">
260
+ <div class="method-heading attribute-method-heading">
261
+ <span class="method-name">current_entry_tasks</span><span
262
+ class="attribute-access-type">[R]</span>
263
+ </div>
264
+
265
+ <div class="method-description">
266
+
267
+ <p>Array of tasks for today. This is the work expected to be performed today. Default is an empty array, but when writing to file, the default is</p>
268
+
269
+ <p>@return [Array]</p>
270
+
271
+ <p>@default</p>
272
+
273
+ <pre class="ruby">[<span class="ruby-string">&quot;&lt;!-- ADD TODAY&#39;S WORK HERE --&gt;&quot;</span>]
274
+ </pre>
275
+
276
+ </div>
277
+ </div>
278
+
279
+ <div id="attribute-i-directory" class="method-detail">
280
+ <div class="method-heading attribute-method-heading">
281
+ <span class="method-name">directory</span><span
282
+ class="attribute-access-type">[R]</span>
283
+ </div>
284
+
285
+ <div class="method-description">
286
+
287
+ <p>The directory where the markdown files are kept.</p>
288
+
289
+ <p>@return [String]</p>
290
+
291
+ <p>@default</p>
292
+
293
+ <pre class="ruby"><span class="ruby-constant">File</span>.<span class="ruby-identifier">join</span>(<span class="ruby-constant">ENV</span>[<span class="ruby-string">&#39;HOME&#39;</span>], <span class="ruby-string">&#39;.cache&#39;</span>, <span class="ruby-string">&#39;standup_md&#39;</span>)
294
+ </pre>
295
+
296
+ </div>
297
+ </div>
298
+
299
+ <div id="attribute-i-header_depth" class="method-detail">
300
+ <div class="method-heading attribute-method-heading">
301
+ <span class="method-name">header_depth</span><span
302
+ class="attribute-access-type">[R]</span>
303
+ </div>
304
+
305
+ <div class="method-description">
306
+
307
+ <p>Number of octothorps that should preface entry headers.</p>
308
+
309
+ <p>@return [Integer] between 1 and 5</p>
310
+
311
+ </div>
312
+ </div>
313
+
314
+ <div id="attribute-i-impediments" class="method-detail">
315
+ <div class="method-heading attribute-method-heading">
316
+ <span class="method-name">impediments</span><span
317
+ class="attribute-access-type">[R]</span>
318
+ </div>
319
+
320
+ <div class="method-description">
321
+
322
+ <p>Array of impediments for today&#39;s entry.</p>
323
+
324
+ <p>@return [Array]</p>
325
+
326
+ </div>
327
+ </div>
328
+
329
+ <div id="attribute-i-notes" class="method-detail">
330
+ <div class="method-heading attribute-method-heading">
331
+ <span class="method-name">notes</span><span
332
+ class="attribute-access-type">[R]</span>
333
+ </div>
334
+
335
+ <div class="method-description">
336
+
337
+ <p>Array of notes to add to today&#39;s entry.</p>
338
+
339
+ <p>@return [Array]</p>
340
+
341
+ </div>
342
+ </div>
343
+
344
+ <div id="attribute-i-previous_entry_tasks" class="method-detail">
345
+ <div class="method-heading attribute-method-heading">
346
+ <span class="method-name">previous_entry_tasks</span><span
347
+ class="attribute-access-type">[R]</span>
348
+ </div>
349
+
350
+ <div class="method-description">
351
+
352
+ <p>The tasks from the previous task&#39;s “Current” section.</p>
353
+
354
+ <p>@return [Array]</p>
355
+
356
+ </div>
357
+ </div>
358
+
359
+ <div id="attribute-i-sub_header_depth" class="method-detail">
360
+ <div class="method-heading attribute-method-heading">
361
+ <span class="method-name">sub_header_depth</span><span
362
+ class="attribute-access-type">[R]</span>
363
+ </div>
364
+
365
+ <div class="method-description">
366
+
367
+ <p>Number of octothorps that should preface sub-headers.</p>
368
+
369
+ <p>@return [Integer] between 2 and 6</p>
370
+
371
+ </div>
372
+ </div>
373
+
374
+ </section>
375
+
376
+
377
+
378
+ </section>
379
+
380
+ <section id="Attributes+that+aren-27t+settable+by+user-2C+but+are+gettable." class="documentation-section">
381
+
382
+ <header class="documentation-section-title">
383
+ <h2>
384
+ Attributes that aren't settable by user, but are gettable.
385
+ </h2>
386
+ <span class="section-click-top">
387
+ <a href="#top">&uarr; top</a>
388
+ </span>
389
+ </header>
390
+
391
+
392
+
393
+
394
+
395
+
396
+
397
+ <section class="attribute-method-details" class="method-section">
398
+ <header>
399
+ <h3>Attributes</h3>
400
+ </header>
401
+
402
+
403
+ <div id="attribute-i-all_entries" class="method-detail">
404
+ <div class="method-heading attribute-method-heading">
405
+ <span class="method-name">all_entries</span><span
406
+ class="attribute-access-type">[R]</span>
407
+ </div>
408
+
409
+ <div class="method-description">
410
+
411
+ <p>Current entry plus all previous entries. This will be a hash in the same format at <code>current_entry</code> and <code>all_previous_entries</code>.</p>
412
+
413
+ <p>@return [Hash]</p>
414
+
415
+ </div>
416
+ </div>
417
+
418
+ <div id="attribute-i-all_previous_entries" class="method-detail">
419
+ <div class="method-heading attribute-method-heading">
420
+ <span class="method-name">all_previous_entries</span><span
421
+ class="attribute-access-type">[R]</span>
422
+ </div>
423
+
424
+ <div class="method-description">
425
+
426
+ <p>All previous entry for the same month as today. If it&#39;s the first day of the month, <code>all_previous_entries</code> will be all of last month&#39;s entries. They will be a hash in the same format as <code>current_entry</code>.</p>
427
+
428
+ <p>@return [Hash]</p>
429
+
430
+ </div>
431
+ </div>
432
+
433
+ <div id="attribute-i-current_entry" class="method-detail">
434
+ <div class="method-heading attribute-method-heading">
435
+ <span class="method-name">current_entry</span><span
436
+ class="attribute-access-type">[R]</span>
437
+ </div>
438
+
439
+ <div class="method-description">
440
+
441
+ <p>The entry for today&#39;s date as a hash. If <code>file</code> already has an entry for today, it will be read and used as <code>current_entry</code>. If there is no entry for today, one should be generated from scaffolding.</p>
442
+
443
+ <p>@return [Hash]</p>
444
+
445
+ <p>@example</p>
446
+
447
+ <pre class="ruby"><span class="ruby-constant">StandupMD</span>.<span class="ruby-identifier">new</span>.<span class="ruby-identifier">current_entry</span>
448
+ <span class="ruby-comment"># =&gt; {</span>
449
+ <span class="ruby-comment"># &#39;2020-04-02&#39; =&gt; {</span>
450
+ <span class="ruby-comment"># &#39;Previous&#39; =&gt; [&#39;Task from yesterday&#39;],</span>
451
+ <span class="ruby-comment"># &#39;Current&#39; =&gt; [&quot;&lt;!-- ADD TODAY&#39;S WORK HERE --&gt;&quot;],</span>
452
+ <span class="ruby-comment"># &#39;Impediments&#39; =&gt; [&#39;None&#39;],</span>
453
+ <span class="ruby-comment"># &#39;Notes&#39; =&gt; [],</span>
454
+ <span class="ruby-comment"># }</span>
455
+ <span class="ruby-comment"># }</span>
456
+ </pre>
457
+
458
+ </div>
459
+ </div>
460
+
461
+ <div id="attribute-i-file" class="method-detail">
462
+ <div class="method-heading attribute-method-heading">
463
+ <span class="method-name">file</span><span
464
+ class="attribute-access-type">[R]</span>
465
+ </div>
466
+
467
+ <div class="method-description">
468
+
469
+ <p>The file name should equal <a href="StandupMD.html#attribute-i-file_name_format"><code>file_name_format</code></a> parsed by Date.strftime. The default is +Date.today.strftime(&#39;%Y_%m.md&#39;)+</p>
470
+
471
+ <p>@return [String]</p>
472
+
473
+ <p>@example</p>
474
+
475
+ <pre class="ruby"><span class="ruby-identifier">su</span> = <span class="ruby-constant">StandupMD</span>.<span class="ruby-identifier">new</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">s</span><span class="ruby-operator">|</span> <span class="ruby-identifier">s</span>.<span class="ruby-identifier">file_name_format</span> = <span class="ruby-string">&#39;%y_%m.markdown&#39;</span> }
476
+ <span class="ruby-identifier">su</span>.<span class="ruby-identifier">file</span>
477
+ <span class="ruby-comment"># =&gt; Users/johnsmith/.cache/standup_md/20_04.markdown</span>
478
+ </pre>
479
+
480
+ </div>
481
+ </div>
482
+
483
+ <div id="attribute-i-header" class="method-detail">
484
+ <div class="method-heading attribute-method-heading">
485
+ <span class="method-name">header</span><span
486
+ class="attribute-access-type">[R]</span>
487
+ </div>
488
+
489
+ <div class="method-description">
490
+
491
+ <p>The string that will be used for the entry headers.</p>
492
+
493
+ <p>@return [String]</p>
494
+
495
+ </div>
496
+ </div>
497
+
498
+ <div id="attribute-i-previous_file" class="method-detail">
499
+ <div class="method-heading attribute-method-heading">
500
+ <span class="method-name">previous_file</span><span
501
+ class="attribute-access-type">[R]</span>
502
+ </div>
503
+
504
+ <div class="method-description">
505
+
506
+ <p>The file that contains previous entries. When last month&#39;s file exists, but this month&#39;s doesn&#39;t or is empty, <a href="StandupMD.html#attribute-i-previous_file"><code>previous_file</code></a> should equal last month&#39;s file.</p>
507
+
508
+ <p>@return [String]</p>
509
+
510
+ <p>@example</p>
511
+
512
+ <pre class="ruby"><span class="ruby-comment"># Assuming the current month is April, 2020</span>
513
+
514
+ <span class="ruby-constant">Dir</span>.<span class="ruby-identifier">entries</span>(<span class="ruby-identifier">su</span>.<span class="ruby-identifier">directory</span>)
515
+ <span class="ruby-comment"># =&gt; []</span>
516
+ <span class="ruby-identifier">su</span> = <span class="ruby-constant">StandupMD</span>.<span class="ruby-identifier">new</span>
517
+ <span class="ruby-identifier">su</span>.<span class="ruby-identifier">previous_file</span>
518
+ <span class="ruby-comment"># =&gt; &#39;&#39;</span>
519
+
520
+ <span class="ruby-constant">Dir</span>.<span class="ruby-identifier">entries</span>(<span class="ruby-identifier">su</span>.<span class="ruby-identifier">directory</span>)
521
+ <span class="ruby-comment"># =&gt; [&#39;2020_03.md&#39;]</span>
522
+ <span class="ruby-identifier">su</span> = <span class="ruby-constant">StandupMD</span>.<span class="ruby-identifier">new</span>
523
+ <span class="ruby-identifier">su</span>.<span class="ruby-identifier">previous_file</span>
524
+ <span class="ruby-comment"># =&gt; &#39;2020_03.md&#39;</span>
525
+
526
+ <span class="ruby-constant">Dir</span>.<span class="ruby-identifier">entries</span>(<span class="ruby-identifier">su</span>.<span class="ruby-identifier">directory</span>)
527
+ <span class="ruby-comment"># =&gt; [&#39;2020_03.md&#39;, &#39;2020_04.md&#39;]</span>
528
+ <span class="ruby-identifier">su</span> = <span class="ruby-constant">StandupMD</span>.<span class="ruby-identifier">new</span>
529
+ <span class="ruby-identifier">su</span>.<span class="ruby-identifier">previous_file</span>
530
+ <span class="ruby-comment"># =&gt; &#39;2020_04.md&#39;</span>
531
+ </pre>
532
+
533
+ </div>
534
+ </div>
535
+
536
+ </section>
537
+
538
+
539
+
540
+ </section>
541
+
542
+ <section id="Attributes+with+default+getters+and+setters." class="documentation-section">
543
+
544
+ <header class="documentation-section-title">
545
+ <h2>
546
+ Attributes with default getters and setters.
547
+ </h2>
548
+ <span class="section-click-top">
549
+ <a href="#top">&uarr; top</a>
550
+ </span>
551
+ </header>
552
+
553
+
554
+
555
+
556
+
557
+
558
+
559
+ <section class="attribute-method-details" class="method-section">
560
+ <header>
561
+ <h3>Attributes</h3>
562
+ </header>
563
+
564
+
565
+ <div id="attribute-i-current_header" class="method-detail">
566
+ <div class="method-heading attribute-method-heading">
567
+ <span class="method-name">current_header</span><span
568
+ class="attribute-access-type">[RW]</span>
569
+ </div>
570
+
571
+ <div class="method-description">
572
+
573
+ <p>The header to use for the <code>Current</code> section.</p>
574
+
575
+ <p>@param [String] <a href="StandupMD.html#attribute-i-current_header"><code>current_header</code></a></p>
576
+
577
+ <p>@return [String]</p>
578
+
579
+ </div>
580
+ </div>
581
+
582
+ <div id="attribute-i-file_name_format" class="method-detail">
583
+ <div class="method-heading attribute-method-heading">
584
+ <span class="method-name">file_name_format</span><span
585
+ class="attribute-access-type">[RW]</span>
586
+ </div>
587
+
588
+ <div class="method-description">
589
+
590
+ <p>The format to use for file names. This should include a month (%m) and year (%y) so the file can rotate every month. This will prevent files from getting too large.</p>
591
+
592
+ <p>@param [String] <a href="StandupMD.html#attribute-i-file_name_format"><code>file_name_format</code></a> Parsed by <code>strftime</code></p>
593
+
594
+ <p>@return [String]</p>
595
+
596
+ </div>
597
+ </div>
598
+
599
+ <div id="attribute-i-header_date_format" class="method-detail">
600
+ <div class="method-heading attribute-method-heading">
601
+ <span class="method-name">header_date_format</span><span
602
+ class="attribute-access-type">[RW]</span>
603
+ </div>
604
+
605
+ <div class="method-description">
606
+
607
+ <p>The date format to use for entry headers.</p>
608
+
609
+ <p>@param [String] <a href="StandupMD.html#attribute-i-header_date_format"><code>header_date_format</code></a> Parsed by <code>strftime</code></p>
610
+
611
+ <p>@return [String]</p>
612
+
613
+ </div>
614
+ </div>
615
+
616
+ <div id="attribute-i-impediments_header" class="method-detail">
617
+ <div class="method-heading attribute-method-heading">
618
+ <span class="method-name">impediments_header</span><span
619
+ class="attribute-access-type">[RW]</span>
620
+ </div>
621
+
622
+ <div class="method-description">
623
+
624
+ <p>The header to use for the <code>Impediments</code> section.</p>
625
+
626
+ <p>@param [String] <a href="StandupMD.html#attribute-i-impediments_header"><code>impediments_header</code></a></p>
627
+
628
+ <p>@return [String]</p>
629
+
630
+ </div>
631
+ </div>
632
+
633
+ <div id="attribute-i-notes_header" class="method-detail">
634
+ <div class="method-heading attribute-method-heading">
635
+ <span class="method-name">notes_header</span><span
636
+ class="attribute-access-type">[RW]</span>
637
+ </div>
638
+
639
+ <div class="method-description">
640
+
641
+ <p>The header to use for the <code>Notes</code> section.</p>
642
+
643
+ <p>@param [String] <a href="StandupMD.html#attribute-i-notes_header"><code>notes_header</code></a></p>
644
+
645
+ <p>@return [String]</p>
646
+
647
+ </div>
648
+ </div>
649
+
650
+ <div id="attribute-i-previous_header" class="method-detail">
651
+ <div class="method-heading attribute-method-heading">
652
+ <span class="method-name">previous_header</span><span
653
+ class="attribute-access-type">[RW]</span>
654
+ </div>
655
+
656
+ <div class="method-description">
657
+
658
+ <p>The header to use for the <code>Previous</code> section.</p>
659
+
660
+ <p>@param [String] <a href="StandupMD.html#attribute-i-previous_header"><code>previous_header</code></a></p>
661
+
662
+ <p>@return [String]</p>
663
+
664
+ </div>
665
+ </div>
666
+
667
+ </section>
668
+
669
+
670
+
671
+ <section id="public-class-Attributes+with+default+getters+and+setters.-method-details" class="method-section">
672
+ <header>
673
+ <h3>Public Class Methods</h3>
674
+ </header>
675
+
676
+
677
+ <div id="method-c-new" class="method-detail ">
678
+
679
+ <div class="method-heading">
680
+ <span class="method-name">new</span><span
681
+ class="method-args">() { |self| ... }</span>
682
+
683
+ <span class="method-click-advice">click to toggle source</span>
684
+
685
+ </div>
686
+
687
+
688
+ <div class="method-description">
689
+
690
+ <p>Constructor. Yields the instance so you can pass a block to access setters.</p>
691
+
692
+ <p>@return [self]</p>
693
+
694
+ <p>@example</p>
695
+
696
+ <pre class="ruby"><span class="ruby-identifier">su</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>
697
+ <span class="ruby-identifier">s</span>.<span class="ruby-identifier">directory</span> = <span class="ruby-ivar">@workdir</span>
698
+ <span class="ruby-identifier">s</span>.<span class="ruby-identifier">file_name_format</span> = <span class="ruby-string">&#39;%y_%m.markdown&#39;</span>
699
+ <span class="ruby-identifier">s</span>.<span class="ruby-identifier">bullet_character</span> = <span class="ruby-string">&#39;*&#39;</span>
700
+ <span class="ruby-keyword">end</span>
701
+ </pre>
702
+
703
+
704
+
705
+
706
+ <div class="method-source-code" id="new-source">
707
+ <pre><span class="ruby-comment"># File lib/standup_md.rb, line 233</span>
708
+ <span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">initialize</span>
709
+ <span class="ruby-ivar">@notes</span> = []
710
+ <span class="ruby-ivar">@header_depth</span> = <span class="ruby-value">1</span>
711
+ <span class="ruby-ivar">@sub_header_depth</span> = <span class="ruby-value">2</span>
712
+ <span class="ruby-ivar">@bullet_character</span> = <span class="ruby-string">&#39;-&#39;</span>
713
+ <span class="ruby-ivar">@current_entry_tasks</span> = [<span class="ruby-string">&quot;&lt;!-- ADD TODAY&#39;S WORK HERE --&gt;&quot;</span>]
714
+ <span class="ruby-ivar">@impediments</span> = [<span class="ruby-string">&#39;None&#39;</span>]
715
+ <span class="ruby-ivar">@file_name_format</span> = <span class="ruby-string">&#39;%Y_%m.md&#39;</span>
716
+ <span class="ruby-ivar">@directory</span> = <span class="ruby-constant">File</span>.<span class="ruby-identifier">join</span>(<span class="ruby-constant">ENV</span>[<span class="ruby-string">&#39;HOME&#39;</span>], <span class="ruby-string">&#39;.cache&#39;</span>, <span class="ruby-string">&#39;standup_md&#39;</span>)
717
+ <span class="ruby-ivar">@header_date_format</span> = <span class="ruby-string">&#39;%Y-%m-%d&#39;</span>
718
+ <span class="ruby-ivar">@current_header</span> = <span class="ruby-string">&#39;Current&#39;</span>
719
+ <span class="ruby-ivar">@previous_header</span> = <span class="ruby-string">&#39;Previous&#39;</span>
720
+ <span class="ruby-ivar">@impediments_header</span> = <span class="ruby-string">&#39;Impediments&#39;</span>
721
+ <span class="ruby-ivar">@notes_header</span> = <span class="ruby-string">&#39;Notes&#39;</span>
722
+ <span class="ruby-ivar">@sub_header_order</span> = <span class="ruby-node">%w[previous current impediments notes]</span>
723
+
724
+ <span class="ruby-keyword">yield</span> <span class="ruby-keyword">self</span> <span class="ruby-keyword">if</span> <span class="ruby-identifier">block_given?</span>
725
+ <span class="ruby-keyword">end</span></pre>
726
+ </div>
727
+
728
+ </div>
729
+
730
+
731
+
732
+
733
+ </div>
734
+
735
+
736
+ </section>
737
+
738
+ </section>
739
+
740
+ <section id="Booleans" class="documentation-section">
741
+
742
+ <header class="documentation-section-title">
743
+ <h2>
744
+ Booleans
745
+ </h2>
746
+ <span class="section-click-top">
747
+ <a href="#top">&uarr; top</a>
748
+ </span>
749
+ </header>
750
+
751
+
752
+
753
+
754
+
755
+
756
+
757
+
758
+
759
+ <section id="public-instance-Booleans-method-details" class="method-section">
760
+ <header>
761
+ <h3>Public Instance Methods</h3>
762
+ </header>
763
+
764
+
765
+ <div id="method-i-entry_previously_added-3F" class="method-detail ">
766
+
767
+ <div class="method-heading">
768
+ <span class="method-name">entry_previously_added?</span><span
769
+ class="method-args">()</span>
770
+
771
+ <span class="method-click-advice">click to toggle source</span>
772
+
773
+ </div>
774
+
775
+
776
+ <div class="method-description">
777
+
778
+ <p>Was today&#39;s entry already in the file?</p>
779
+
780
+ <p>@return [boolean] true if today&#39;s entry was already in the file</p>
781
+
782
+
783
+
784
+
785
+ <div class="method-source-code" id="entry_previously_added-3F-source">
786
+ <pre><span class="ruby-comment"># File lib/standup_md.rb, line 275</span>
787
+ <span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">entry_previously_added?</span>
788
+ <span class="ruby-ivar">@entry_previously_added</span>
789
+ <span class="ruby-keyword">end</span></pre>
790
+ </div>
791
+
792
+ </div>
793
+
794
+
795
+
796
+
797
+ </div>
798
+
799
+
800
+ <div id="method-i-file_written-3F" class="method-detail ">
801
+
802
+ <div class="method-heading">
803
+ <span class="method-name">file_written?</span><span
804
+ class="method-args">()</span>
805
+
806
+ <span class="method-click-advice">click to toggle source</span>
807
+
808
+ </div>
809
+
810
+
811
+ <div class="method-description">
812
+
813
+ <p>Has the file been written since instantiated?</p>
814
+
815
+ <p>@return [boolean]</p>
816
+
817
+ <p>@example</p>
818
+
819
+ <pre class="ruby"><span class="ruby-identifier">su</span> = <span class="ruby-constant">StandupMD</span>.<span class="ruby-identifier">new</span>
820
+ <span class="ruby-identifier">su</span>.<span class="ruby-identifier">file_written?</span>
821
+ <span class="ruby-comment"># =&gt; false</span>
822
+ <span class="ruby-identifier">su</span>.<span class="ruby-identifier">write</span>
823
+ <span class="ruby-identifier">su</span>.<span class="ruby-identifier">file_written?</span>
824
+ <span class="ruby-comment"># =&gt; true</span>
825
+ </pre>
826
+
827
+
828
+
829
+
830
+ <div class="method-source-code" id="file_written-3F-source">
831
+ <pre><span class="ruby-comment"># File lib/standup_md.rb, line 267</span>
832
+ <span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">file_written?</span>
833
+ <span class="ruby-ivar">@file_written</span>
834
+ <span class="ruby-keyword">end</span></pre>
835
+ </div>
836
+
837
+ </div>
838
+
839
+
840
+
841
+
842
+ </div>
843
+
844
+
845
+ </section>
846
+
847
+ </section>
848
+
849
+ <section id="Custom+setters" class="documentation-section">
850
+
851
+ <header class="documentation-section-title">
852
+ <h2>
853
+ Custom setters
854
+ </h2>
855
+ <span class="section-click-top">
856
+ <a href="#top">&uarr; top</a>
857
+ </span>
858
+ </header>
859
+
860
+
861
+
862
+
863
+
864
+
865
+
866
+
867
+
868
+ <section id="public-instance-Custom+setters-method-details" class="method-section">
869
+ <header>
870
+ <h3>Public Instance Methods</h3>
871
+ </header>
872
+
873
+
874
+ <div id="method-i-bullet_character-3D" class="method-detail ">
875
+
876
+ <div class="method-heading">
877
+ <span class="method-name">bullet_character=</span><span
878
+ class="method-args">(character)</span>
879
+
880
+ <span class="method-click-advice">click to toggle source</span>
881
+
882
+ </div>
883
+
884
+
885
+ <div class="method-description">
886
+
887
+ <p>Setter for bullet_character. Must be * (asterisk) or - (dash).</p>
888
+
889
+ <p>@param [String] character</p>
890
+
891
+ <p>@return [String]</p>
892
+
893
+
894
+
895
+
896
+ <div class="method-source-code" id="bullet_character-3D-source">
897
+ <pre><span class="ruby-comment"># File lib/standup_md.rb, line 332</span>
898
+ <span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">bullet_character=</span>(<span class="ruby-identifier">character</span>)
899
+ <span class="ruby-identifier">raise</span> <span class="ruby-string">&#39;Must be &quot;-&quot; or &quot;*&quot;&#39;</span> <span class="ruby-keyword">unless</span> <span class="ruby-node">%w[- *]</span>.<span class="ruby-identifier">include?</span>(<span class="ruby-identifier">character</span>)
900
+ <span class="ruby-ivar">@bullet_character</span> = <span class="ruby-identifier">character</span>
901
+ <span class="ruby-keyword">end</span></pre>
902
+ </div>
903
+
904
+ </div>
905
+
906
+
907
+
908
+
909
+ </div>
910
+
911
+
912
+ <div id="method-i-current_entry_tasks-3D" class="method-detail ">
913
+
914
+ <div class="method-heading">
915
+ <span class="method-name">current_entry_tasks=</span><span
916
+ class="method-args">(tasks)</span>
917
+
918
+ <span class="method-click-advice">click to toggle source</span>
919
+
920
+ </div>
921
+
922
+
923
+ <div class="method-description">
924
+
925
+ <p>Setter for current entry tasks.</p>
926
+
927
+ <p>@param [Array] tasks</p>
928
+
929
+ <p>@return [Array]</p>
930
+
931
+
932
+
933
+
934
+ <div class="method-source-code" id="current_entry_tasks-3D-source">
935
+ <pre><span class="ruby-comment"># File lib/standup_md.rb, line 310</span>
936
+ <span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">current_entry_tasks=</span>(<span class="ruby-identifier">tasks</span>)
937
+ <span class="ruby-identifier">raise</span> <span class="ruby-string">&#39;Must be an Array&#39;</span> <span class="ruby-keyword">unless</span> <span class="ruby-identifier">tasks</span>.<span class="ruby-identifier">is_a?</span>(<span class="ruby-constant">Array</span>)
938
+ <span class="ruby-ivar">@current_entry_tasks</span> = <span class="ruby-identifier">tasks</span>
939
+ <span class="ruby-keyword">end</span></pre>
940
+ </div>
941
+
942
+ </div>
943
+
944
+
945
+
946
+
947
+ </div>
948
+
949
+
950
+ <div id="method-i-directory-3D" class="method-detail ">
951
+
952
+ <div class="method-heading">
953
+ <span class="method-name">directory=</span><span
954
+ class="method-args">(directory)</span>
955
+
956
+ <span class="method-click-advice">click to toggle source</span>
957
+
958
+ </div>
959
+
960
+
961
+ <div class="method-description">
962
+
963
+ <p>Setter for directory. Must be expanded in case the user uses `~` for home. If the directory doesn&#39;t exist, it will be created. To reset instance variables after changing the directory, you&#39;ll need to call load.</p>
964
+
965
+ <p>@param [String] directory</p>
966
+
967
+ <p>@return [String]</p>
968
+
969
+
970
+
971
+
972
+ <div class="method-source-code" id="directory-3D-source">
973
+ <pre><span class="ruby-comment"># File lib/standup_md.rb, line 345</span>
974
+ <span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">directory=</span>(<span class="ruby-identifier">directory</span>)
975
+ <span class="ruby-comment"># TODO test this</span>
976
+ <span class="ruby-identifier">directory</span> = <span class="ruby-constant">File</span>.<span class="ruby-identifier">expand_path</span>(<span class="ruby-identifier">directory</span>)
977
+ <span class="ruby-constant">FileUtils</span>.<span class="ruby-identifier">mkdir_p</span>(<span class="ruby-identifier">directory</span>) <span class="ruby-keyword">unless</span> <span class="ruby-constant">File</span>.<span class="ruby-identifier">directory?</span>(<span class="ruby-identifier">directory</span>)
978
+ <span class="ruby-ivar">@directory</span> = <span class="ruby-identifier">directory</span>
979
+ <span class="ruby-keyword">end</span></pre>
980
+ </div>
981
+
982
+ </div>
983
+
984
+
985
+
986
+
987
+ </div>
988
+
989
+
990
+ <div id="method-i-header_depth-3D" class="method-detail ">
991
+
992
+ <div class="method-heading">
993
+ <span class="method-name">header_depth=</span><span
994
+ class="method-args">(depth)</span>
995
+
996
+ <span class="method-click-advice">click to toggle source</span>
997
+
998
+ </div>
999
+
1000
+
1001
+ <div class="method-description">
1002
+
1003
+ <p>Number of octothorps (#) to use before the main header.</p>
1004
+
1005
+ <p>@param [Integer] depth</p>
1006
+
1007
+ <p>@return [Integer]</p>
1008
+
1009
+
1010
+
1011
+
1012
+ <div class="method-source-code" id="header_depth-3D-source">
1013
+ <pre><span class="ruby-comment"># File lib/standup_md.rb, line 358</span>
1014
+ <span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">header_depth=</span>(<span class="ruby-identifier">depth</span>)
1015
+ <span class="ruby-keyword">if</span> <span class="ruby-operator">!</span><span class="ruby-identifier">depth</span>.<span class="ruby-identifier">between?</span>(<span class="ruby-value">1</span>, <span class="ruby-value">5</span>)
1016
+ <span class="ruby-identifier">raise</span> <span class="ruby-string">&#39;Header depth out of bounds (1..5)&#39;</span>
1017
+ <span class="ruby-keyword">elsif</span> <span class="ruby-identifier">depth</span> <span class="ruby-operator">&gt;=</span> <span class="ruby-identifier">sub_header_depth</span>
1018
+ <span class="ruby-identifier">raise</span> <span class="ruby-string">&#39;header_depth must be larger than sub_header_depth&#39;</span>
1019
+ <span class="ruby-keyword">end</span>
1020
+ <span class="ruby-ivar">@header_depth</span> = <span class="ruby-identifier">depth</span>
1021
+ <span class="ruby-keyword">end</span></pre>
1022
+ </div>
1023
+
1024
+ </div>
1025
+
1026
+
1027
+
1028
+
1029
+ </div>
1030
+
1031
+
1032
+ <div id="method-i-impediments-3D" class="method-detail ">
1033
+
1034
+ <div class="method-heading">
1035
+ <span class="method-name">impediments=</span><span
1036
+ class="method-args">(tasks)</span>
1037
+
1038
+ <span class="method-click-advice">click to toggle source</span>
1039
+
1040
+ </div>
1041
+
1042
+
1043
+ <div class="method-description">
1044
+
1045
+ <p>Setter for impediments.</p>
1046
+
1047
+ <p>@param [Array] tasks</p>
1048
+
1049
+ <p>@return [Array]</p>
1050
+
1051
+
1052
+
1053
+
1054
+ <div class="method-source-code" id="impediments-3D-source">
1055
+ <pre><span class="ruby-comment"># File lib/standup_md.rb, line 321</span>
1056
+ <span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">impediments=</span>(<span class="ruby-identifier">tasks</span>)
1057
+ <span class="ruby-identifier">raise</span> <span class="ruby-string">&#39;Must be an Array&#39;</span> <span class="ruby-keyword">unless</span> <span class="ruby-identifier">tasks</span>.<span class="ruby-identifier">is_a?</span>(<span class="ruby-constant">Array</span>)
1058
+ <span class="ruby-ivar">@impediments</span> = <span class="ruby-identifier">tasks</span>
1059
+ <span class="ruby-keyword">end</span></pre>
1060
+ </div>
1061
+
1062
+ </div>
1063
+
1064
+
1065
+
1066
+
1067
+ </div>
1068
+
1069
+
1070
+ <div id="method-i-notes-3D" class="method-detail ">
1071
+
1072
+ <div class="method-heading">
1073
+ <span class="method-name">notes=</span><span
1074
+ class="method-args">(tasks)</span>
1075
+
1076
+ <span class="method-click-advice">click to toggle source</span>
1077
+
1078
+ </div>
1079
+
1080
+
1081
+ <div class="method-description">
1082
+
1083
+ <p>Setter for notes.</p>
1084
+
1085
+ <p>@param [Array] notes</p>
1086
+
1087
+ <p>@return [Array]</p>
1088
+
1089
+
1090
+
1091
+
1092
+ <div class="method-source-code" id="notes-3D-source">
1093
+ <pre><span class="ruby-comment"># File lib/standup_md.rb, line 299</span>
1094
+ <span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">notes=</span>(<span class="ruby-identifier">tasks</span>)
1095
+ <span class="ruby-identifier">raise</span> <span class="ruby-string">&#39;Must be an Array&#39;</span> <span class="ruby-keyword">unless</span> <span class="ruby-identifier">tasks</span>.<span class="ruby-identifier">is_a?</span>(<span class="ruby-constant">Array</span>)
1096
+ <span class="ruby-ivar">@notes</span> = <span class="ruby-identifier">tasks</span>
1097
+ <span class="ruby-keyword">end</span></pre>
1098
+ </div>
1099
+
1100
+ </div>
1101
+
1102
+
1103
+
1104
+
1105
+ </div>
1106
+
1107
+
1108
+ <div id="method-i-previous_entry_tasks-3D" class="method-detail ">
1109
+
1110
+ <div class="method-heading">
1111
+ <span class="method-name">previous_entry_tasks=</span><span
1112
+ class="method-args">(tasks)</span>
1113
+
1114
+ <span class="method-click-advice">click to toggle source</span>
1115
+
1116
+ </div>
1117
+
1118
+
1119
+ <div class="method-description">
1120
+
1121
+ <p>Setter for current entry tasks.</p>
1122
+
1123
+ <p>@param [Array] tasks</p>
1124
+
1125
+ <p>@return [Array]</p>
1126
+
1127
+
1128
+
1129
+
1130
+ <div class="method-source-code" id="previous_entry_tasks-3D-source">
1131
+ <pre><span class="ruby-comment"># File lib/standup_md.rb, line 288</span>
1132
+ <span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">previous_entry_tasks=</span>(<span class="ruby-identifier">tasks</span>)
1133
+ <span class="ruby-identifier">raise</span> <span class="ruby-string">&#39;Must be an Array&#39;</span> <span class="ruby-keyword">unless</span> <span class="ruby-identifier">tasks</span>.<span class="ruby-identifier">is_a?</span>(<span class="ruby-constant">Array</span>)
1134
+ <span class="ruby-ivar">@previous_entry_tasks</span> = <span class="ruby-identifier">tasks</span>
1135
+ <span class="ruby-keyword">end</span></pre>
1136
+ </div>
1137
+
1138
+ </div>
1139
+
1140
+
1141
+
1142
+
1143
+ </div>
1144
+
1145
+
1146
+ <div id="method-i-sub_header_depth-3D" class="method-detail ">
1147
+
1148
+ <div class="method-heading">
1149
+ <span class="method-name">sub_header_depth=</span><span
1150
+ class="method-args">(depth)</span>
1151
+
1152
+ <span class="method-click-advice">click to toggle source</span>
1153
+
1154
+ </div>
1155
+
1156
+
1157
+ <div class="method-description">
1158
+
1159
+ <p>Number of octothorps (#) to use before sub headers (Current, Previous, etc).</p>
1160
+
1161
+ <p>@param [Integer] depth</p>
1162
+
1163
+ <p>@return [Integer]</p>
1164
+
1165
+
1166
+
1167
+
1168
+ <div class="method-source-code" id="sub_header_depth-3D-source">
1169
+ <pre><span class="ruby-comment"># File lib/standup_md.rb, line 373</span>
1170
+ <span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">sub_header_depth=</span>(<span class="ruby-identifier">depth</span>)
1171
+ <span class="ruby-keyword">if</span> <span class="ruby-operator">!</span><span class="ruby-identifier">depth</span>.<span class="ruby-identifier">between?</span>(<span class="ruby-value">2</span>, <span class="ruby-value">6</span>)
1172
+ <span class="ruby-identifier">raise</span> <span class="ruby-string">&#39;Sub-header depth out of bounds (2..6)&#39;</span>
1173
+ <span class="ruby-keyword">elsif</span> <span class="ruby-identifier">depth</span> <span class="ruby-operator">&lt;=</span> <span class="ruby-identifier">header_depth</span>
1174
+ <span class="ruby-identifier">raise</span> <span class="ruby-string">&#39;sub_header_depth must be smaller than header_depth&#39;</span>
1175
+ <span class="ruby-keyword">end</span>
1176
+ <span class="ruby-ivar">@sub_header_depth</span> = <span class="ruby-identifier">depth</span>
1177
+ <span class="ruby-keyword">end</span></pre>
1178
+ </div>
1179
+
1180
+ </div>
1181
+
1182
+
1183
+
1184
+
1185
+ </div>
1186
+
1187
+
1188
+ <div id="method-i-sub_header_order-3D" class="method-detail ">
1189
+
1190
+ <div class="method-heading">
1191
+ <span class="method-name">sub_header_order=</span><span
1192
+ class="method-args">(array)</span>
1193
+
1194
+ <span class="method-click-advice">click to toggle source</span>
1195
+
1196
+ </div>
1197
+
1198
+
1199
+ <div class="method-description">
1200
+
1201
+ <p>Preferred order for sub-headers.</p>
1202
+
1203
+ <p>@param [Array] Values must be %w[previous current impediment notes]</p>
1204
+
1205
+ <p>@return [Array]</p>
1206
+
1207
+
1208
+
1209
+
1210
+ <div class="method-source-code" id="sub_header_order-3D-source">
1211
+ <pre><span class="ruby-comment"># File lib/standup_md.rb, line 388</span>
1212
+ <span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">sub_header_order=</span>(<span class="ruby-identifier">array</span>)
1213
+ <span class="ruby-identifier">order</span> = <span class="ruby-node">%w[previous current impediments notes]</span>
1214
+ <span class="ruby-identifier">raise</span> <span class="ruby-node">&quot;Values must be #{order.join{&#39;, &#39;}}&quot;</span> <span class="ruby-keyword">unless</span> <span class="ruby-identifier">order</span>.<span class="ruby-identifier">sort</span> <span class="ruby-operator">==</span> <span class="ruby-identifier">array</span>.<span class="ruby-identifier">sort</span>
1215
+ <span class="ruby-ivar">@sub_header_order</span> = <span class="ruby-identifier">array</span>
1216
+ <span class="ruby-keyword">end</span></pre>
1217
+ </div>
1218
+
1219
+ </div>
1220
+
1221
+
1222
+
1223
+
1224
+ </div>
1225
+
1226
+
1227
+ </section>
1228
+
1229
+ </section>
1230
+
1231
+ <section id="Misc" class="documentation-section">
1232
+
1233
+ <header class="documentation-section-title">
1234
+ <h2>
1235
+ Misc
1236
+ </h2>
1237
+ <span class="section-click-top">
1238
+ <a href="#top">&uarr; top</a>
1239
+ </span>
1240
+ </header>
1241
+
1242
+
1243
+
1244
+
1245
+
1246
+ <section class="constants-list">
1247
+ <header>
1248
+ <h3>Constants</h3>
1249
+ </header>
1250
+ <dl>
1251
+
1252
+ <dt id="VERSION">VERSION
1253
+
1254
+ <dd><p>The gem verision</p>
1255
+
1256
+ <p>@example</p>
1257
+
1258
+ <pre class="ruby"><span class="ruby-constant">StandupMD</span><span class="ruby-operator">::</span><span class="ruby-constant">VERSION</span>
1259
+ <span class="ruby-comment"># =&gt; &#39;0.9.0&#39;</span>
1260
+ </pre>
1261
+
1262
+
1263
+ </dl>
1264
+ </section>
1265
+
1266
+
1267
+
1268
+
1269
+
1270
+ <section id="public-instance-Misc-method-details" class="method-section">
1271
+ <header>
1272
+ <h3>Public Instance Methods</h3>
1273
+ </header>
1274
+
1275
+
1276
+ <div id="method-i-load" class="method-detail ">
1277
+
1278
+ <div class="method-heading">
1279
+ <span class="method-name">load</span><span
1280
+ class="method-args">()</span>
1281
+
1282
+ <span class="method-click-advice">click to toggle source</span>
1283
+
1284
+ </div>
1285
+
1286
+
1287
+ <div class="method-description">
1288
+
1289
+ <p>Sets internal instance variables. Called when first instantiated, or after directory is set.</p>
1290
+
1291
+ <p>@return [self]</p>
1292
+
1293
+
1294
+
1295
+
1296
+ <div class="method-source-code" id="load-source">
1297
+ <pre><span class="ruby-comment"># File lib/standup_md.rb, line 430</span>
1298
+ <span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">load</span>
1299
+ <span class="ruby-constant">FileUtils</span>.<span class="ruby-identifier">mkdir_p</span>(<span class="ruby-identifier">directory</span>) <span class="ruby-keyword">unless</span> <span class="ruby-constant">File</span>.<span class="ruby-identifier">directory?</span>(<span class="ruby-identifier">directory</span>)
1300
+
1301
+ <span class="ruby-ivar">@today</span> = <span class="ruby-constant">Date</span>.<span class="ruby-identifier">today</span>
1302
+ <span class="ruby-ivar">@header</span> = <span class="ruby-identifier">today</span>.<span class="ruby-identifier">strftime</span>(<span class="ruby-identifier">header_date_format</span>)
1303
+ <span class="ruby-ivar">@file_written</span> = <span class="ruby-keyword">false</span>
1304
+ <span class="ruby-ivar">@file</span> = <span class="ruby-constant">File</span>.<span class="ruby-identifier">expand_path</span>(<span class="ruby-constant">File</span>.<span class="ruby-identifier">join</span>(<span class="ruby-identifier">directory</span>, <span class="ruby-identifier">today</span>.<span class="ruby-identifier">strftime</span>(<span class="ruby-identifier">file_name_format</span>)))
1305
+ <span class="ruby-ivar">@previous_file</span> = <span class="ruby-identifier">get_previous_file</span>
1306
+ <span class="ruby-ivar">@all_previous_entries</span> = <span class="ruby-identifier">get_all_previous_entries</span>
1307
+ <span class="ruby-ivar">@entry_previously_added</span> = <span class="ruby-identifier">all_previous_entries</span>.<span class="ruby-identifier">key?</span>(<span class="ruby-identifier">header</span>)
1308
+ <span class="ruby-ivar">@previous_entry_tasks</span> = <span class="ruby-identifier">previous_entry</span>[<span class="ruby-identifier">current_header</span>]
1309
+ <span class="ruby-ivar">@current_entry</span> = <span class="ruby-ivar">@all_previous_entries</span>.<span class="ruby-identifier">delete</span>(<span class="ruby-identifier">header</span>) <span class="ruby-operator">||</span> <span class="ruby-identifier">new_entry</span>
1310
+ <span class="ruby-ivar">@all_entries</span> = {<span class="ruby-identifier">header</span> <span class="ruby-operator">=&gt;</span> <span class="ruby-identifier">current_entry</span>}.<span class="ruby-identifier">merge</span>(<span class="ruby-identifier">all_previous_entries</span>)
1311
+
1312
+ <span class="ruby-constant">FileUtils</span>.<span class="ruby-identifier">touch</span>(<span class="ruby-identifier">file</span>) <span class="ruby-keyword">unless</span> <span class="ruby-constant">File</span>.<span class="ruby-identifier">file?</span>(<span class="ruby-identifier">file</span>)
1313
+ <span class="ruby-keyword">self</span>
1314
+ <span class="ruby-keyword">end</span></pre>
1315
+ </div>
1316
+
1317
+ </div>
1318
+
1319
+
1320
+ <div class="aliases">
1321
+ Also aliased as: <a href="StandupMD.html#method-i-reload">reload</a>
1322
+ </div>
1323
+
1324
+
1325
+
1326
+ </div>
1327
+
1328
+
1329
+ <div id="method-i-reload" class="method-detail method-alias">
1330
+
1331
+ <div class="method-heading">
1332
+ <span class="method-name">reload</span><span
1333
+ class="method-args">()</span>
1334
+
1335
+ </div>
1336
+
1337
+
1338
+ <div class="method-description">
1339
+
1340
+ <p>Alias of <code>load</code></p>
1341
+
1342
+ <p>@return [self]</p>
1343
+
1344
+
1345
+
1346
+
1347
+ </div>
1348
+
1349
+
1350
+
1351
+
1352
+ <div class="aliases">
1353
+ Alias for: <a href="StandupMD.html#method-i-load">load</a>
1354
+ </div>
1355
+
1356
+ </div>
1357
+
1358
+
1359
+ <div id="method-i-sub_header_order" class="method-detail ">
1360
+
1361
+ <div class="method-heading">
1362
+ <span class="method-name">sub_header_order</span><span
1363
+ class="method-args">()</span>
1364
+
1365
+ <span class="method-click-advice">click to toggle source</span>
1366
+
1367
+ </div>
1368
+
1369
+
1370
+ <div class="method-description">
1371
+
1372
+ <p>Return a copy of the sub-header order so the user can&#39;t modify the array.</p>
1373
+
1374
+ <p>@return [Array]</p>
1375
+
1376
+
1377
+
1378
+
1379
+ <div class="method-source-code" id="sub_header_order-source">
1380
+ <pre><span class="ruby-comment"># File lib/standup_md.rb, line 401</span>
1381
+ <span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">sub_header_order</span>
1382
+ <span class="ruby-ivar">@sub_header_order</span>.<span class="ruby-identifier">dup</span>
1383
+ <span class="ruby-keyword">end</span></pre>
1384
+ </div>
1385
+
1386
+ </div>
1387
+
1388
+
1389
+
1390
+
1391
+ </div>
1392
+
1393
+
1394
+ <div id="method-i-write" class="method-detail ">
1395
+
1396
+ <div class="method-heading">
1397
+ <span class="method-name">write</span><span
1398
+ class="method-args">()</span>
1399
+
1400
+ <span class="method-click-advice">click to toggle source</span>
1401
+
1402
+ </div>
1403
+
1404
+
1405
+ <div class="method-description">
1406
+
1407
+ <p>Writes a new entry to the file if the first entry in the file isn&#39;t today.</p>
1408
+
1409
+ <p>@return [Boolean]</p>
1410
+
1411
+
1412
+
1413
+
1414
+ <div class="method-source-code" id="write-source">
1415
+ <pre><span class="ruby-comment"># File lib/standup_md.rb, line 409</span>
1416
+ <span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">write</span>
1417
+ <span class="ruby-constant">File</span>.<span class="ruby-identifier">open</span>(<span class="ruby-identifier">file</span>, <span class="ruby-string">&#39;w&#39;</span>) <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">f</span><span class="ruby-operator">|</span>
1418
+ <span class="ruby-identifier">all_entries</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-identifier">s_heads</span><span class="ruby-operator">|</span>
1419
+ <span class="ruby-identifier">f</span>.<span class="ruby-identifier">puts</span> <span class="ruby-string">&#39;#&#39;</span> <span class="ruby-operator">*</span> <span class="ruby-identifier">header_depth</span> <span class="ruby-operator">+</span> <span class="ruby-string">&#39; &#39;</span> <span class="ruby-operator">+</span> <span class="ruby-identifier">head</span>
1420
+ <span class="ruby-identifier">sub_header_order</span>.<span class="ruby-identifier">map</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">value</span><span class="ruby-operator">|</span> <span class="ruby-node">&quot;#{value}_header&quot;</span> }.<span class="ruby-identifier">each</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">sub_head</span><span class="ruby-operator">|</span>
1421
+ <span class="ruby-identifier">sh</span> = <span class="ruby-identifier">send</span>(<span class="ruby-identifier">sub_head</span>).<span class="ruby-identifier">capitalize</span>
1422
+ <span class="ruby-keyword">next</span> <span class="ruby-keyword">if</span> <span class="ruby-operator">!</span><span class="ruby-identifier">s_heads</span>[<span class="ruby-identifier">sh</span>] <span class="ruby-operator">||</span> <span class="ruby-identifier">s_heads</span>[<span class="ruby-identifier">sh</span>].<span class="ruby-identifier">empty?</span>
1423
+ <span class="ruby-identifier">f</span>.<span class="ruby-identifier">puts</span> <span class="ruby-string">&#39;#&#39;</span> <span class="ruby-operator">*</span> <span class="ruby-identifier">sub_header_depth</span> <span class="ruby-operator">+</span> <span class="ruby-string">&#39; &#39;</span> <span class="ruby-operator">+</span> <span class="ruby-identifier">sh</span>
1424
+ <span class="ruby-identifier">s_heads</span>[<span class="ruby-identifier">sh</span>].<span class="ruby-identifier">each</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">task</span><span class="ruby-operator">|</span> <span class="ruby-identifier">f</span>.<span class="ruby-identifier">puts</span> <span class="ruby-identifier">bullet_character</span> <span class="ruby-operator">+</span> <span class="ruby-string">&#39; &#39;</span> <span class="ruby-operator">+</span> <span class="ruby-identifier">task</span> }
1425
+ <span class="ruby-keyword">end</span>
1426
+ <span class="ruby-identifier">f</span>.<span class="ruby-identifier">puts</span>
1427
+ <span class="ruby-keyword">end</span>
1428
+ <span class="ruby-keyword">end</span>
1429
+ <span class="ruby-ivar">@file_written</span> = <span class="ruby-keyword">true</span>
1430
+ <span class="ruby-keyword">end</span></pre>
1431
+ </div>
1432
+
1433
+ </div>
1434
+
1435
+
1436
+
1437
+
1438
+ </div>
1439
+
1440
+
1441
+ </section>
1442
+
1443
+ </section>
1444
+
1445
+ </main>
1446
+
1447
+
1448
+ <footer id="validator-badges" role="contentinfo">
1449
+ <p><a href="https://validator.w3.org/check/referer">Validate</a>
1450
+ <p>Generated by <a href="https://ruby.github.io/rdoc/">RDoc</a> 6.1.2.
1451
+ <p>Based on <a href="http://deveiate.org/projects/Darkfish-RDoc/">Darkfish</a> by <a href="http://deveiate.org">Michael Granger</a>.
1452
+ </footer>
1453
+