standup_md 0.2.1 → 0.3.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,478 @@
1
+ <!DOCTYPE html>
2
+
3
+ <html>
4
+ <head>
5
+ <meta charset="UTF-8">
6
+
7
+ <title>class StandupMD::Entry - 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
+ <div id="includes-section" class="nav-section">
71
+ <h3>Included Modules</h3>
72
+
73
+ <ul class="link-list">
74
+
75
+
76
+ <li><span class="include">Comparable</span>
77
+
78
+
79
+ </ul>
80
+ </div>
81
+
82
+
83
+ <!-- Method Quickref -->
84
+ <div id="method-list-section" class="nav-section">
85
+ <h3>Methods</h3>
86
+
87
+ <ul class="link-list" role="directory">
88
+
89
+ <li ><a href="#method-c-config">::config</a>
90
+
91
+ <li ><a href="#method-c-create">::create</a>
92
+
93
+ <li ><a href="#method-c-new">::new</a>
94
+
95
+ <li ><a href="#method-i-3C-3D-3E">#&lt;=&gt;</a>
96
+
97
+ <li ><a href="#method-i-to_h">#to_h</a>
98
+
99
+ <li ><a href="#method-i-to_json">#to_json</a>
100
+
101
+ </ul>
102
+ </div>
103
+
104
+ </div>
105
+ </nav>
106
+
107
+ <main role="main" aria-labelledby="class-StandupMD::Entry">
108
+ <h1 id="class-StandupMD::Entry" class="class">
109
+ class StandupMD::Entry
110
+ </h1>
111
+
112
+ <section class="description">
113
+
114
+ <p>Class for handling single entries. Includes the comparable module, and compares by date.</p>
115
+
116
+ </section>
117
+
118
+
119
+ <section id="5Buntitled-5D" class="documentation-section">
120
+
121
+
122
+
123
+
124
+
125
+
126
+
127
+ <section class="attribute-method-details" class="method-section">
128
+ <header>
129
+ <h3>Attributes</h3>
130
+ </header>
131
+
132
+
133
+ <div id="attribute-i-current" class="method-detail">
134
+ <div class="method-heading attribute-method-heading">
135
+ <span class="method-name">current</span><span
136
+ class="attribute-access-type">[RW]</span>
137
+ </div>
138
+
139
+ <div class="method-description">
140
+
141
+ <p>The tasks for today.</p>
142
+
143
+ <p>@return [Array]</p>
144
+
145
+ </div>
146
+ </div>
147
+
148
+ <div id="attribute-i-date" class="method-detail">
149
+ <div class="method-heading attribute-method-heading">
150
+ <span class="method-name">date</span><span
151
+ class="attribute-access-type">[RW]</span>
152
+ </div>
153
+
154
+ <div class="method-description">
155
+
156
+ <p>The date of the entry.</p>
157
+
158
+ <p>@param [Date] date</p>
159
+
160
+ <p>@return [Date]</p>
161
+
162
+ </div>
163
+ </div>
164
+
165
+ <div id="attribute-i-impediments" class="method-detail">
166
+ <div class="method-heading attribute-method-heading">
167
+ <span class="method-name">impediments</span><span
168
+ class="attribute-access-type">[RW]</span>
169
+ </div>
170
+
171
+ <div class="method-description">
172
+
173
+ <p>Iimpediments for this entry.</p>
174
+
175
+ <p>@return [Array]</p>
176
+
177
+ </div>
178
+ </div>
179
+
180
+ <div id="attribute-i-notes" class="method-detail">
181
+ <div class="method-heading attribute-method-heading">
182
+ <span class="method-name">notes</span><span
183
+ class="attribute-access-type">[RW]</span>
184
+ </div>
185
+
186
+ <div class="method-description">
187
+
188
+ <p>Nnotes to add to this entry.</p>
189
+
190
+ <p>@return [Array]</p>
191
+
192
+ </div>
193
+ </div>
194
+
195
+ <div id="attribute-i-previous" class="method-detail">
196
+ <div class="method-heading attribute-method-heading">
197
+ <span class="method-name">previous</span><span
198
+ class="attribute-access-type">[RW]</span>
199
+ </div>
200
+
201
+ <div class="method-description">
202
+
203
+ <p>The tasks from the previous day.</p>
204
+
205
+ <p>@return [Array]</p>
206
+
207
+ </div>
208
+ </div>
209
+
210
+ </section>
211
+
212
+
213
+
214
+ <section id="public-class-5Buntitled-5D-method-details" class="method-section">
215
+ <header>
216
+ <h3>Public Class Methods</h3>
217
+ </header>
218
+
219
+
220
+ <div id="method-c-config" class="method-detail ">
221
+
222
+ <div class="method-heading">
223
+ <span class="method-name">config</span><span
224
+ class="method-args">()</span>
225
+
226
+ <span class="method-click-advice">click to toggle source</span>
227
+
228
+ </div>
229
+
230
+
231
+ <div class="method-description">
232
+
233
+ <p>Access to the class&#39;s configuration.</p>
234
+
235
+ <p>@return [StandupMD::Config::Entry]</p>
236
+
237
+
238
+
239
+
240
+ <div class="method-source-code" id="config-source">
241
+ <pre><span class="ruby-comment"># File lib/standup_md/entry.rb, line 16</span>
242
+ <span class="ruby-keyword">def</span> <span class="ruby-keyword">self</span>.<span class="ruby-identifier ruby-title">config</span>
243
+ <span class="ruby-ivar">@config</span> <span class="ruby-operator">||=</span> <span class="ruby-constant">StandupMD</span>.<span class="ruby-identifier">config</span>.<span class="ruby-identifier">entry</span>
244
+ <span class="ruby-keyword">end</span></pre>
245
+ </div>
246
+
247
+ </div>
248
+
249
+
250
+
251
+
252
+ </div>
253
+
254
+
255
+ <div id="method-c-create" class="method-detail ">
256
+
257
+ <div class="method-heading">
258
+ <span class="method-name">create</span><span
259
+ class="method-args">() { |config| ... }</span>
260
+
261
+ <span class="method-click-advice">click to toggle source</span>
262
+
263
+ </div>
264
+
265
+
266
+ <div class="method-description">
267
+
268
+ <p>Creates a generic entry. Default values can be set via configuration. Yields the entry if a block is passed so you can change values.</p>
269
+
270
+ <p>@return [StandupMD::Entry]</p>
271
+
272
+
273
+
274
+
275
+ <div class="method-source-code" id="create-source">
276
+ <pre><span class="ruby-comment"># File lib/standup_md/entry.rb, line 57</span>
277
+ <span class="ruby-keyword">def</span> <span class="ruby-keyword">self</span>.<span class="ruby-identifier ruby-title">create</span>
278
+ <span class="ruby-identifier">entry</span> = <span class="ruby-identifier">new</span>(
279
+ <span class="ruby-constant">Date</span>.<span class="ruby-identifier">today</span>,
280
+ <span class="ruby-identifier">config</span>.<span class="ruby-identifier">current</span>,
281
+ <span class="ruby-identifier">config</span>.<span class="ruby-identifier">previous</span>,
282
+ <span class="ruby-identifier">config</span>.<span class="ruby-identifier">impediments</span>,
283
+ <span class="ruby-identifier">config</span>.<span class="ruby-identifier">notes</span>
284
+ )
285
+ <span class="ruby-keyword">yield</span> <span class="ruby-identifier">config</span> <span class="ruby-keyword">if</span> <span class="ruby-identifier">block_given?</span>
286
+ <span class="ruby-identifier">entry</span>
287
+ <span class="ruby-keyword">end</span></pre>
288
+ </div>
289
+
290
+ </div>
291
+
292
+
293
+
294
+
295
+ </div>
296
+
297
+
298
+ <div id="method-c-new" class="method-detail ">
299
+
300
+ <div class="method-heading">
301
+ <span class="method-name">new</span><span
302
+ class="method-args">(date, current, previous, impediments, notes = [])</span>
303
+
304
+ <span class="method-click-advice">click to toggle source</span>
305
+
306
+ </div>
307
+
308
+
309
+ <div class="method-description">
310
+
311
+ <p>Constructs instance of <code>StandupMD::Entry</code>.</p>
312
+
313
+ <p>@param [Date] date</p>
314
+
315
+ <p>@param [Array] current</p>
316
+
317
+ <p>@param [Array] previous</p>
318
+
319
+ <p>@param [Array] impediments</p>
320
+
321
+ <p>@param [Array] notes</p>
322
+
323
+
324
+
325
+
326
+ <div class="method-source-code" id="new-source">
327
+ <pre><span class="ruby-comment"># File lib/standup_md/entry.rb, line 81</span>
328
+ <span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">initialize</span>(<span class="ruby-identifier">date</span>, <span class="ruby-identifier">current</span>, <span class="ruby-identifier">previous</span>, <span class="ruby-identifier">impediments</span>, <span class="ruby-identifier">notes</span> = [])
329
+ <span class="ruby-identifier">raise</span> <span class="ruby-keyword">unless</span> <span class="ruby-identifier">date</span>.<span class="ruby-identifier">is_a?</span>(<span class="ruby-constant">Date</span>)
330
+ <span class="ruby-ivar">@config</span> = <span class="ruby-keyword">self</span>.<span class="ruby-identifier">class</span>.<span class="ruby-identifier">config</span>
331
+
332
+ <span class="ruby-ivar">@date</span> = <span class="ruby-identifier">date</span>
333
+ <span class="ruby-ivar">@current</span> = <span class="ruby-identifier">current</span>
334
+ <span class="ruby-ivar">@previous</span> = <span class="ruby-identifier">previous</span>
335
+ <span class="ruby-ivar">@impediments</span> = <span class="ruby-identifier">impediments</span>
336
+ <span class="ruby-ivar">@notes</span> = <span class="ruby-identifier">notes</span>
337
+ <span class="ruby-keyword">end</span></pre>
338
+ </div>
339
+
340
+ </div>
341
+
342
+
343
+
344
+
345
+ </div>
346
+
347
+
348
+ </section>
349
+
350
+ <section id="public-instance-5Buntitled-5D-method-details" class="method-section">
351
+ <header>
352
+ <h3>Public Instance Methods</h3>
353
+ </header>
354
+
355
+
356
+ <div id="method-i-3C-3D-3E" class="method-detail ">
357
+
358
+ <div class="method-heading">
359
+ <span class="method-name">&lt;=&gt;</span><span
360
+ class="method-args">(other)</span>
361
+
362
+ <span class="method-click-advice">click to toggle source</span>
363
+
364
+ </div>
365
+
366
+
367
+ <div class="method-description">
368
+
369
+ <p>Sorting method for Comparable. Entries are compared by date.</p>
370
+
371
+
372
+
373
+
374
+ <div class="method-source-code" id="3C-3D-3E-source">
375
+ <pre><span class="ruby-comment"># File lib/standup_md/entry.rb, line 94</span>
376
+ <span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">&lt;=&gt;</span>(<span class="ruby-identifier">other</span>)
377
+ <span class="ruby-identifier">date</span> <span class="ruby-operator">&lt;=&gt;</span> <span class="ruby-identifier">other</span>.<span class="ruby-identifier">date</span>
378
+ <span class="ruby-keyword">end</span></pre>
379
+ </div>
380
+
381
+ </div>
382
+
383
+
384
+
385
+
386
+ </div>
387
+
388
+
389
+ <div id="method-i-to_h" class="method-detail ">
390
+
391
+ <div class="method-heading">
392
+ <span class="method-name">to_h</span><span
393
+ class="method-args">()</span>
394
+
395
+ <span class="method-click-advice">click to toggle source</span>
396
+
397
+ </div>
398
+
399
+
400
+ <div class="method-description">
401
+
402
+ <p><a href="Entry.html"><code>Entry</code></a> as a hash .</p>
403
+
404
+ <p>@return [Hash]</p>
405
+
406
+
407
+
408
+
409
+ <div class="method-source-code" id="to_h-source">
410
+ <pre><span class="ruby-comment"># File lib/standup_md/entry.rb, line 102</span>
411
+ <span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">to_h</span>
412
+ {
413
+ <span class="ruby-identifier">date</span> <span class="ruby-operator">=&gt;</span> {
414
+ <span class="ruby-string">&#39;current&#39;</span> <span class="ruby-operator">=&gt;</span> <span class="ruby-identifier">current</span>,
415
+ <span class="ruby-string">&#39;previous&#39;</span> <span class="ruby-operator">=&gt;</span> <span class="ruby-identifier">previous</span>,
416
+ <span class="ruby-string">&#39;impediments&#39;</span> <span class="ruby-operator">=&gt;</span> <span class="ruby-identifier">impediments</span>,
417
+ <span class="ruby-string">&#39;notes&#39;</span> <span class="ruby-operator">=&gt;</span> <span class="ruby-identifier">notes</span>
418
+ }
419
+ }
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-to_json" class="method-detail ">
432
+
433
+ <div class="method-heading">
434
+ <span class="method-name">to_json</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><a href="Entry.html"><code>Entry</code></a> as a json object.</p>
445
+
446
+ <p>@return [String]</p>
447
+
448
+
449
+
450
+
451
+ <div class="method-source-code" id="to_json-source">
452
+ <pre><span class="ruby-comment"># File lib/standup_md/entry.rb, line 117</span>
453
+ <span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">to_json</span>
454
+ <span class="ruby-identifier">to_h</span>.<span class="ruby-identifier">to_json</span>
455
+ <span class="ruby-keyword">end</span></pre>
456
+ </div>
457
+
458
+ </div>
459
+
460
+
461
+
462
+
463
+ </div>
464
+
465
+
466
+ </section>
467
+
468
+ </section>
469
+
470
+ </main>
471
+
472
+
473
+ <footer id="validator-badges" role="contentinfo">
474
+ <p><a href="https://validator.w3.org/check/referer">Validate</a>
475
+ <p>Generated by <a href="https://ruby.github.io/rdoc/">RDoc</a> 6.2.1.
476
+ <p>Based on <a href="http://deveiate.org/projects/Darkfish-RDoc/">Darkfish</a> by <a href="http://deveiate.org">Michael Granger</a>.
477
+ </footer>
478
+