standup_md 0.2.0 → 0.3.3

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,613 @@
1
+ <!DOCTYPE html>
2
+
3
+ <html>
4
+ <head>
5
+ <meta charset="UTF-8">
6
+
7
+ <title>class StandupMD::Config::File - 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-new">::new</a>
79
+
80
+ <li ><a href="#method-i-bullet_character-3D">#bullet_character=</a>
81
+
82
+ <li ><a href="#method-i-directory-3D">#directory=</a>
83
+
84
+ <li ><a href="#method-i-header_depth-3D">#header_depth=</a>
85
+
86
+ <li ><a href="#method-i-reset">#reset</a>
87
+
88
+ <li ><a href="#method-i-sub_header_depth-3D">#sub_header_depth=</a>
89
+
90
+ </ul>
91
+ </div>
92
+
93
+ </div>
94
+ </nav>
95
+
96
+ <main role="main" aria-labelledby="class-StandupMD::Config::File">
97
+ <h1 id="class-StandupMD::Config::File" class="class">
98
+ class StandupMD::Config::File
99
+ </h1>
100
+
101
+ <section class="description">
102
+
103
+ <p>The configuration class for <a href="../File.html"><code>StandupMD::File</code></a></p>
104
+
105
+ </section>
106
+
107
+
108
+ <section id="5Buntitled-5D" class="documentation-section">
109
+
110
+
111
+
112
+
113
+
114
+ <section class="constants-list">
115
+ <header>
116
+ <h3>Constants</h3>
117
+ </header>
118
+ <dl>
119
+
120
+ <dt id="DEFAULTS">DEFAULTS
121
+
122
+ <dd><p>The default options.</p>
123
+
124
+ <p>@return [Hash]</p>
125
+
126
+
127
+ </dl>
128
+ </section>
129
+
130
+
131
+
132
+ <section class="attribute-method-details" class="method-section">
133
+ <header>
134
+ <h3>Attributes</h3>
135
+ </header>
136
+
137
+
138
+ <div id="attribute-i-bullet_character" class="method-detail">
139
+ <div class="method-heading attribute-method-heading">
140
+ <span class="method-name">bullet_character</span><span
141
+ class="attribute-access-type">[R]</span>
142
+ </div>
143
+
144
+ <div class="method-description">
145
+
146
+ <p>Character used as bullets for list entries.</p>
147
+
148
+ <p>@return [String] either - (dash) or * (asterisk)</p>
149
+
150
+ <p>@default “-” (dash)</p>
151
+
152
+ </div>
153
+ </div>
154
+
155
+ <div id="attribute-i-create" class="method-detail">
156
+ <div class="method-heading attribute-method-heading">
157
+ <span class="method-name">create</span><span
158
+ class="attribute-access-type">[RW]</span>
159
+ </div>
160
+
161
+ <div class="method-description">
162
+
163
+ <p>Should the file be created if it doesn&#39;t exist?</p>
164
+
165
+ <p>@param [Boolean] create</p>
166
+
167
+ <p>@return [boolean]</p>
168
+
169
+ </div>
170
+ </div>
171
+
172
+ <div id="attribute-i-current_header" class="method-detail">
173
+ <div class="method-heading attribute-method-heading">
174
+ <span class="method-name">current_header</span><span
175
+ class="attribute-access-type">[RW]</span>
176
+ </div>
177
+
178
+ <div class="method-description">
179
+
180
+ <p>String to be used as “Current” header.</p>
181
+
182
+ <p>@param [String] header</p>
183
+
184
+ <p>@return [String]</p>
185
+
186
+ <p>@default “Current”</p>
187
+
188
+ </div>
189
+ </div>
190
+
191
+ <div id="attribute-i-directory" class="method-detail">
192
+ <div class="method-heading attribute-method-heading">
193
+ <span class="method-name">directory</span><span
194
+ class="attribute-access-type">[R]</span>
195
+ </div>
196
+
197
+ <div class="method-description">
198
+
199
+ <p>The directory in which the files are located.</p>
200
+
201
+ <p>@return [String]</p>
202
+
203
+ <p>@default “~/.cache/standup_md”</p>
204
+
205
+ </div>
206
+ </div>
207
+
208
+ <div id="attribute-i-header_date_format" class="method-detail">
209
+ <div class="method-heading attribute-method-heading">
210
+ <span class="method-name">header_date_format</span><span
211
+ class="attribute-access-type">[RW]</span>
212
+ </div>
213
+
214
+ <div class="method-description">
215
+
216
+ <p>The date format for entry headers. Will be parsed by <code>strftime</code>.</p>
217
+
218
+ <p>@param [String] format</p>
219
+
220
+ <p>@return [String]</p>
221
+
222
+ </div>
223
+ </div>
224
+
225
+ <div id="attribute-i-header_depth" class="method-detail">
226
+ <div class="method-heading attribute-method-heading">
227
+ <span class="method-name">header_depth</span><span
228
+ class="attribute-access-type">[R]</span>
229
+ </div>
230
+
231
+ <div class="method-description">
232
+
233
+ <p>Number of octothorps that should preface entry headers.</p>
234
+
235
+ <p>@return [Integer] between 1 and 5</p>
236
+
237
+ <p>@default 1</p>
238
+
239
+ </div>
240
+ </div>
241
+
242
+ <div id="attribute-i-impediments_header" class="method-detail">
243
+ <div class="method-heading attribute-method-heading">
244
+ <span class="method-name">impediments_header</span><span
245
+ class="attribute-access-type">[RW]</span>
246
+ </div>
247
+
248
+ <div class="method-description">
249
+
250
+ <p>String to be used as “Impediments” header.</p>
251
+
252
+ <p>@param [String] header</p>
253
+
254
+ <p>@return [String]</p>
255
+
256
+ <p>@default “Impediments”</p>
257
+
258
+ </div>
259
+ </div>
260
+
261
+ <div id="attribute-i-name_format" class="method-detail">
262
+ <div class="method-heading attribute-method-heading">
263
+ <span class="method-name">name_format</span><span
264
+ class="attribute-access-type">[RW]</span>
265
+ </div>
266
+
267
+ <div class="method-description">
268
+
269
+ <p>Format to be used for standup file names. Should be parse-able by strftime, and should be a monthly date.</p>
270
+
271
+ <p>@param [String] <a href="File.html#attribute-i-name_format"><code>name_format</code></a></p>
272
+
273
+ <p>@return [String]</p>
274
+
275
+ <p>@default “%Y_%m.md”</p>
276
+
277
+ </div>
278
+ </div>
279
+
280
+ <div id="attribute-i-notes_header" class="method-detail">
281
+ <div class="method-heading attribute-method-heading">
282
+ <span class="method-name">notes_header</span><span
283
+ class="attribute-access-type">[RW]</span>
284
+ </div>
285
+
286
+ <div class="method-description">
287
+
288
+ <p>String to be used as “Notes” header.</p>
289
+
290
+ <p>@param [String] header</p>
291
+
292
+ <p>@return [String]</p>
293
+
294
+ <p>@default “Notes”</p>
295
+
296
+ </div>
297
+ </div>
298
+
299
+ <div id="attribute-i-previous_header" class="method-detail">
300
+ <div class="method-heading attribute-method-heading">
301
+ <span class="method-name">previous_header</span><span
302
+ class="attribute-access-type">[RW]</span>
303
+ </div>
304
+
305
+ <div class="method-description">
306
+
307
+ <p>String to be used as “Previous” header.</p>
308
+
309
+ <p>@param [String] header</p>
310
+
311
+ <p>@return [String]</p>
312
+
313
+ <p>@default “Previous”</p>
314
+
315
+ </div>
316
+ </div>
317
+
318
+ <div id="attribute-i-sub_header_depth" class="method-detail">
319
+ <div class="method-heading attribute-method-heading">
320
+ <span class="method-name">sub_header_depth</span><span
321
+ class="attribute-access-type">[R]</span>
322
+ </div>
323
+
324
+ <div class="method-description">
325
+
326
+ <p>Number of octothorps that should preface sub-headers.</p>
327
+
328
+ <p>@return [Integer] between 2 and 6</p>
329
+
330
+ <p>@default 2</p>
331
+
332
+ </div>
333
+ </div>
334
+
335
+ <div id="attribute-i-sub_header_order" class="method-detail">
336
+ <div class="method-heading attribute-method-heading">
337
+ <span class="method-name">sub_header_order</span><span
338
+ class="attribute-access-type">[RW]</span>
339
+ </div>
340
+
341
+ <div class="method-description">
342
+
343
+ <p>Preferred order for sub-headers.</p>
344
+
345
+ <p>@param [Array] <a href="File.html#attribute-i-sub_header_order"><code>sub_header_order</code></a></p>
346
+
347
+ <p>@return [Array]</p>
348
+
349
+ <p>@default %w[previous current impediment notes]</p>
350
+
351
+ </div>
352
+ </div>
353
+
354
+ </section>
355
+
356
+
357
+
358
+ <section id="public-class-5Buntitled-5D-method-details" class="method-section">
359
+ <header>
360
+ <h3>Public Class Methods</h3>
361
+ </header>
362
+
363
+
364
+ <div id="method-c-new" class="method-detail ">
365
+
366
+ <div class="method-heading">
367
+ <span class="method-name">new</span><span
368
+ class="method-args">()</span>
369
+
370
+ <span class="method-click-advice">click to toggle source</span>
371
+
372
+ </div>
373
+
374
+
375
+ <div class="method-description">
376
+
377
+ <p>Initializes the config with default values.</p>
378
+
379
+
380
+
381
+
382
+ <div class="method-source-code" id="new-source">
383
+ <pre><span class="ruby-comment"># File lib/standup_md/config/file.rb, line 138</span>
384
+ <span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">initialize</span>
385
+ <span class="ruby-identifier">reset</span>
386
+ <span class="ruby-keyword">end</span></pre>
387
+ </div>
388
+
389
+ </div>
390
+
391
+
392
+
393
+
394
+ </div>
395
+
396
+
397
+ </section>
398
+
399
+ <section id="public-instance-5Buntitled-5D-method-details" class="method-section">
400
+ <header>
401
+ <h3>Public Instance Methods</h3>
402
+ </header>
403
+
404
+
405
+ <div id="method-i-bullet_character-3D" class="method-detail ">
406
+
407
+ <div class="method-heading">
408
+ <span class="method-name">bullet_character=</span><span
409
+ class="method-args">(char)</span>
410
+
411
+ <span class="method-click-advice">click to toggle source</span>
412
+
413
+ </div>
414
+
415
+
416
+ <div class="method-description">
417
+
418
+ <p>Setter for bullet_character. Must be * (asterisk) or - (dash).</p>
419
+
420
+ <p>@param [String] character</p>
421
+
422
+ <p>@return [String]</p>
423
+
424
+
425
+
426
+
427
+ <div class="method-source-code" id="bullet_character-3D-source">
428
+ <pre><span class="ruby-comment"># File lib/standup_md/config/file.rb, line 187</span>
429
+ <span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">bullet_character=</span>(<span class="ruby-identifier">char</span>)
430
+ <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">char</span>)
431
+ <span class="ruby-ivar">@bullet_character</span> = <span class="ruby-identifier">char</span>
432
+ <span class="ruby-keyword">end</span></pre>
433
+ </div>
434
+
435
+ </div>
436
+
437
+
438
+
439
+
440
+ </div>
441
+
442
+
443
+ <div id="method-i-directory-3D" class="method-detail ">
444
+
445
+ <div class="method-heading">
446
+ <span class="method-name">directory=</span><span
447
+ class="method-args">(directory)</span>
448
+
449
+ <span class="method-click-advice">click to toggle source</span>
450
+
451
+ </div>
452
+
453
+
454
+ <div class="method-description">
455
+
456
+ <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>
457
+
458
+ <p>@param [String] directory</p>
459
+
460
+ <p>@return [String]</p>
461
+
462
+
463
+
464
+
465
+ <div class="method-source-code" id="directory-3D-source">
466
+ <pre><span class="ruby-comment"># File lib/standup_md/config/file.rb, line 200</span>
467
+ <span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">directory=</span>(<span class="ruby-identifier">directory</span>)
468
+ <span class="ruby-identifier">directory</span> = <span class="ruby-operator">::</span><span class="ruby-constant">File</span>.<span class="ruby-identifier">expand_path</span>(<span class="ruby-identifier">directory</span>)
469
+ <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-operator">::</span><span class="ruby-constant">File</span>.<span class="ruby-identifier">directory?</span>(<span class="ruby-identifier">directory</span>)
470
+ <span class="ruby-ivar">@directory</span> = <span class="ruby-identifier">directory</span>
471
+ <span class="ruby-keyword">end</span></pre>
472
+ </div>
473
+
474
+ </div>
475
+
476
+
477
+
478
+
479
+ </div>
480
+
481
+
482
+ <div id="method-i-header_depth-3D" class="method-detail ">
483
+
484
+ <div class="method-heading">
485
+ <span class="method-name">header_depth=</span><span
486
+ class="method-args">(depth)</span>
487
+
488
+ <span class="method-click-advice">click to toggle source</span>
489
+
490
+ </div>
491
+
492
+
493
+ <div class="method-description">
494
+
495
+ <p>Number of octothorps (#) to use before the main header.</p>
496
+
497
+ <p>@param [Integer] depth</p>
498
+
499
+ <p>@return [Integer]</p>
500
+
501
+
502
+
503
+
504
+ <div class="method-source-code" id="header_depth-3D-source">
505
+ <pre><span class="ruby-comment"># File lib/standup_md/config/file.rb, line 156</span>
506
+ <span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">header_depth=</span>(<span class="ruby-identifier">depth</span>)
507
+ <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>)
508
+ <span class="ruby-identifier">raise</span> <span class="ruby-string">&#39;Header depth out of bounds (1..5)&#39;</span>
509
+ <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>
510
+ <span class="ruby-ivar">@sub_header_depth</span> = <span class="ruby-identifier">depth</span> <span class="ruby-operator">+</span> <span class="ruby-value">1</span>
511
+ <span class="ruby-keyword">end</span>
512
+ <span class="ruby-ivar">@header_depth</span> = <span class="ruby-identifier">depth</span>
513
+ <span class="ruby-keyword">end</span></pre>
514
+ </div>
515
+
516
+ </div>
517
+
518
+
519
+
520
+
521
+ </div>
522
+
523
+
524
+ <div id="method-i-reset" class="method-detail ">
525
+
526
+ <div class="method-heading">
527
+ <span class="method-name">reset</span><span
528
+ class="method-args">()</span>
529
+
530
+ <span class="method-click-advice">click to toggle source</span>
531
+
532
+ </div>
533
+
534
+
535
+ <div class="method-description">
536
+
537
+ <p>Sets all config values back to their defaults.</p>
538
+
539
+ <p>@return [Hash]</p>
540
+
541
+
542
+
543
+
544
+ <div class="method-source-code" id="reset-source">
545
+ <pre><span class="ruby-comment"># File lib/standup_md/config/file.rb, line 146</span>
546
+ <span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">reset</span>
547
+ <span class="ruby-constant">DEFAULTS</span>.<span class="ruby-identifier">each</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">k</span>, <span class="ruby-identifier">v</span><span class="ruby-operator">|</span> <span class="ruby-identifier">instance_variable_set</span>(<span class="ruby-node">&quot;@#{k}&quot;</span>, <span class="ruby-identifier">v</span>) }
548
+ <span class="ruby-keyword">end</span></pre>
549
+ </div>
550
+
551
+ </div>
552
+
553
+
554
+
555
+
556
+ </div>
557
+
558
+
559
+ <div id="method-i-sub_header_depth-3D" class="method-detail ">
560
+
561
+ <div class="method-heading">
562
+ <span class="method-name">sub_header_depth=</span><span
563
+ class="method-args">(depth)</span>
564
+
565
+ <span class="method-click-advice">click to toggle source</span>
566
+
567
+ </div>
568
+
569
+
570
+ <div class="method-description">
571
+
572
+ <p>Number of octothorps (#) to use before sub headers (Current, Previous, etc).</p>
573
+
574
+ <p>@param [Integer] depth</p>
575
+
576
+ <p>@return [Integer]</p>
577
+
578
+
579
+
580
+
581
+ <div class="method-source-code" id="sub_header_depth-3D-source">
582
+ <pre><span class="ruby-comment"># File lib/standup_md/config/file.rb, line 172</span>
583
+ <span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">sub_header_depth=</span>(<span class="ruby-identifier">depth</span>)
584
+ <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>)
585
+ <span class="ruby-identifier">raise</span> <span class="ruby-string">&#39;Sub-header depth out of bounds (2..6)&#39;</span>
586
+ <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>
587
+ <span class="ruby-ivar">@header_depth</span> = <span class="ruby-identifier">depth</span> <span class="ruby-operator">-</span> <span class="ruby-value">1</span>
588
+ <span class="ruby-keyword">end</span>
589
+ <span class="ruby-ivar">@sub_header_depth</span> = <span class="ruby-identifier">depth</span>
590
+ <span class="ruby-keyword">end</span></pre>
591
+ </div>
592
+
593
+ </div>
594
+
595
+
596
+
597
+
598
+ </div>
599
+
600
+
601
+ </section>
602
+
603
+ </section>
604
+
605
+ </main>
606
+
607
+
608
+ <footer id="validator-badges" role="contentinfo">
609
+ <p><a href="https://validator.w3.org/check/referer">Validate</a>
610
+ <p>Generated by <a href="https://ruby.github.io/rdoc/">RDoc</a> 6.2.1.
611
+ <p>Based on <a href="http://deveiate.org/projects/Darkfish-RDoc/">Darkfish</a> by <a href="http://deveiate.org">Michael Granger</a>.
612
+ </footer>
613
+