timeboss 0.0.6 → 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (80) hide show
  1. checksums.yaml +4 -4
  2. data/.github/ISSUE_TEMPLATE/bug_report.md +23 -0
  3. data/.github/ISSUE_TEMPLATE/feature_request.md +20 -0
  4. data/.gitignore +2 -0
  5. data/.travis.yml +4 -1
  6. data/.yardopts +1 -0
  7. data/CODE_OF_CONDUCT.md +76 -0
  8. data/README.md +30 -18
  9. data/bin/tbsh +15 -0
  10. data/doc/TimeBoss.html +146 -0
  11. data/doc/TimeBoss/Calendar.html +137 -0
  12. data/doc/TimeBoss/Calendar/Day.html +594 -0
  13. data/doc/TimeBoss/Calendar/Half.html +396 -0
  14. data/doc/TimeBoss/Calendar/Month.html +396 -0
  15. data/doc/TimeBoss/Calendar/Parser.html +386 -0
  16. data/doc/TimeBoss/Calendar/Period.html +841 -0
  17. data/doc/TimeBoss/Calendar/Quarter.html +396 -0
  18. data/doc/TimeBoss/Calendar/Support.html +131 -0
  19. data/doc/TimeBoss/Calendar/Support/Formatter.html +459 -0
  20. data/doc/TimeBoss/Calendar/Support/MonthBased.html +591 -0
  21. data/doc/TimeBoss/Calendar/Support/MonthBasis.html +437 -0
  22. data/doc/TimeBoss/Calendar/Support/MonthlyUnit.html +591 -0
  23. data/doc/TimeBoss/Calendar/Support/Navigable.html +723 -0
  24. data/doc/TimeBoss/Calendar/Support/Shiftable.html +138 -0
  25. data/doc/TimeBoss/Calendar/Support/Unit.html +1299 -0
  26. data/doc/TimeBoss/Calendar/Waypoints.html +155 -0
  27. data/doc/TimeBoss/Calendar/Waypoints/Absolute.html +1378 -0
  28. data/doc/TimeBoss/Calendar/Waypoints/Relative.html +4308 -0
  29. data/doc/TimeBoss/Calendar/Week.html +671 -0
  30. data/doc/TimeBoss/Calendar/Year.html +319 -0
  31. data/doc/TimeBoss/Calendars.html +336 -0
  32. data/doc/TimeBoss/Calendars/Broadcast.html +221 -0
  33. data/doc/TimeBoss/Calendars/Broadcast/Basis.html +278 -0
  34. data/doc/TimeBoss/Calendars/Entry.html +399 -0
  35. data/doc/TimeBoss/Support.html +115 -0
  36. data/doc/TimeBoss/Support/Shellable.html +249 -0
  37. data/doc/_index.html +416 -0
  38. data/doc/class_list.html +51 -0
  39. data/doc/css/common.css +1 -0
  40. data/doc/css/full_list.css +58 -0
  41. data/doc/css/style.css +496 -0
  42. data/doc/file.README.html +299 -0
  43. data/doc/file_list.html +56 -0
  44. data/doc/frames.html +17 -0
  45. data/doc/index.html +299 -0
  46. data/doc/js/app.js +314 -0
  47. data/doc/js/full_list.js +216 -0
  48. data/doc/js/jquery.js +4 -0
  49. data/doc/method_list.html +1139 -0
  50. data/doc/top-level-namespace.html +110 -0
  51. data/lib/tasks/calendars.rake +5 -0
  52. data/lib/timeboss.rb +4 -0
  53. data/lib/timeboss/calendar.rb +22 -0
  54. data/lib/timeboss/calendar/day.rb +19 -6
  55. data/lib/timeboss/calendar/half.rb +7 -2
  56. data/lib/timeboss/calendar/month.rb +7 -2
  57. data/lib/timeboss/calendar/parser.rb +1 -0
  58. data/lib/timeboss/calendar/period.rb +26 -11
  59. data/lib/timeboss/calendar/quarter.rb +7 -2
  60. data/lib/timeboss/calendar/support.rb +8 -0
  61. data/lib/timeboss/calendar/support/formatter.rb +1 -0
  62. data/lib/timeboss/calendar/support/month_basis.rb +3 -0
  63. data/lib/timeboss/calendar/support/{month_based.rb → monthly_unit.rb} +24 -18
  64. data/lib/timeboss/calendar/support/navigable.rb +73 -0
  65. data/lib/timeboss/calendar/support/shiftable.rb +3 -2
  66. data/lib/timeboss/calendar/support/unit.rb +26 -0
  67. data/lib/timeboss/calendar/waypoints.rb +6 -80
  68. data/lib/timeboss/calendar/waypoints/absolute.rb +114 -0
  69. data/lib/timeboss/calendar/waypoints/relative.rb +268 -0
  70. data/lib/timeboss/calendar/week.rb +26 -18
  71. data/lib/timeboss/calendar/year.rb +6 -5
  72. data/lib/timeboss/calendars.rb +20 -3
  73. data/lib/timeboss/version.rb +1 -1
  74. data/spec/calendar/day_spec.rb +1 -1
  75. data/spec/calendar/support/{month_based_spec.rb → monthly_unit_spec.rb} +18 -8
  76. data/spec/calendar/week_spec.rb +5 -13
  77. data/spec/calendars/broadcast_spec.rb +27 -7
  78. data/spec/calendars_spec.rb +7 -1
  79. data/timeboss.gemspec +1 -0
  80. metadata +77 -8
@@ -0,0 +1,459 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <meta charset="utf-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
+ <title>
7
+ Class: TimeBoss::Calendar::Support::Formatter
8
+
9
+ &mdash; Documentation by YARD 0.9.25
10
+
11
+ </title>
12
+
13
+ <link rel="stylesheet" href="../../../css/style.css" type="text/css" />
14
+
15
+ <link rel="stylesheet" href="../../../css/common.css" type="text/css" />
16
+
17
+ <script type="text/javascript">
18
+ pathId = "TimeBoss::Calendar::Support::Formatter";
19
+ relpath = '../../../';
20
+ </script>
21
+
22
+
23
+ <script type="text/javascript" charset="utf-8" src="../../../js/jquery.js"></script>
24
+
25
+ <script type="text/javascript" charset="utf-8" src="../../../js/app.js"></script>
26
+
27
+
28
+ </head>
29
+ <body>
30
+ <div class="nav_wrap">
31
+ <iframe id="nav" src="../../../class_list.html?1"></iframe>
32
+ <div id="resizer"></div>
33
+ </div>
34
+
35
+ <div id="main" tabindex="-1">
36
+ <div id="header">
37
+ <div id="menu">
38
+
39
+ <a href="../../../_index.html">Index (F)</a> &raquo;
40
+ <span class='title'><span class='object_link'><a href="../../../TimeBoss.html" title="TimeBoss (module)">TimeBoss</a></span></span> &raquo; <span class='title'><span class='object_link'><a href="../../Calendar.html" title="TimeBoss::Calendar (module)">Calendar</a></span></span> &raquo; <span class='title'><span class='object_link'><a href="../Support.html" title="TimeBoss::Calendar::Support (module)">Support</a></span></span>
41
+ &raquo;
42
+ <span class="title">Formatter</span>
43
+
44
+ </div>
45
+
46
+ <div id="search">
47
+
48
+ <a class="full_list_link" id="class_list_link"
49
+ href="../../../class_list.html">
50
+
51
+ <svg width="24" height="24">
52
+ <rect x="0" y="4" width="24" height="4" rx="1" ry="1"></rect>
53
+ <rect x="0" y="12" width="24" height="4" rx="1" ry="1"></rect>
54
+ <rect x="0" y="20" width="24" height="4" rx="1" ry="1"></rect>
55
+ </svg>
56
+ </a>
57
+
58
+ </div>
59
+ <div class="clear"></div>
60
+ </div>
61
+
62
+ <div id="content"><h1>Class: TimeBoss::Calendar::Support::Formatter
63
+
64
+
65
+
66
+ </h1>
67
+ <div class="box_info">
68
+
69
+ <dl>
70
+ <dt>Inherits:</dt>
71
+ <dd>
72
+ <span class="inheritName">Object</span>
73
+
74
+ <ul class="fullTree">
75
+ <li>Object</li>
76
+
77
+ <li class="next">TimeBoss::Calendar::Support::Formatter</li>
78
+
79
+ </ul>
80
+ <a href="#" class="inheritanceTree">show all</a>
81
+
82
+ </dd>
83
+ </dl>
84
+
85
+
86
+
87
+
88
+
89
+
90
+
91
+
92
+
93
+
94
+
95
+ <dl>
96
+ <dt>Defined in:</dt>
97
+ <dd>lib/timeboss/calendar/support/formatter.rb</dd>
98
+ </dl>
99
+
100
+ </div>
101
+
102
+ <h2>Overview</h2><div class="docstring">
103
+ <div class="discussion">
104
+
105
+ <p>The formatter is responsible for the implementation of name formatting for
106
+ a unit.</p>
107
+
108
+
109
+ </div>
110
+ </div>
111
+ <div class="tags">
112
+
113
+
114
+ </div>
115
+
116
+ <h2>
117
+ Constant Summary
118
+ <small><a href="#" class="constants_summary_toggle">collapse</a></small>
119
+ </h2>
120
+
121
+ <dl class="constants">
122
+
123
+ <dt id="PERIODS-constant" class="">PERIODS =
124
+
125
+ </dt>
126
+ <dd><pre class="code"><span class='const'><span class='object_link'><a href="Shiftable.html" title="TimeBoss::Calendar::Support::Shiftable (module)">Shiftable</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="Shiftable.html#PERIODS-constant" title="TimeBoss::Calendar::Support::Shiftable::PERIODS (constant)">PERIODS</a></span></span><span class='period'>.</span><span class='id identifier rubyid_reverse'>reverse</span><span class='period'>.</span><span class='id identifier rubyid_map'>map</span><span class='lparen'>(</span><span class='op'>&amp;</span><span class='symbol'>:to_sym</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_drop'>drop</span><span class='lparen'>(</span><span class='int'>1</span><span class='rparen'>)</span></pre></dd>
127
+
128
+ </dl>
129
+
130
+
131
+
132
+
133
+
134
+ <h2>Instance Attribute Summary <small><a href="#" class="summary_toggle">collapse</a></small></h2>
135
+ <ul class="summary">
136
+
137
+ <li class="public ">
138
+ <span class="summary_signature">
139
+
140
+ <a href="#periods-instance_method" title="#periods (instance method)">#<strong>periods</strong> &#x21d2; Object </a>
141
+
142
+
143
+
144
+ </span>
145
+
146
+
147
+
148
+
149
+ <span class="note title readonly">readonly</span>
150
+
151
+
152
+
153
+
154
+
155
+
156
+
157
+
158
+
159
+ <span class="summary_desc"><div class='inline'>
160
+ <p>Returns the value of attribute periods.</p>
161
+ </div></span>
162
+
163
+ </li>
164
+
165
+
166
+ <li class="public ">
167
+ <span class="summary_signature">
168
+
169
+ <a href="#unit-instance_method" title="#unit (instance method)">#<strong>unit</strong> &#x21d2; Object </a>
170
+
171
+
172
+
173
+ </span>
174
+
175
+
176
+
177
+
178
+ <span class="note title readonly">readonly</span>
179
+
180
+
181
+
182
+
183
+
184
+
185
+
186
+
187
+
188
+ <span class="summary_desc"><div class='inline'>
189
+ <p>Returns the value of attribute unit.</p>
190
+ </div></span>
191
+
192
+ </li>
193
+
194
+
195
+ </ul>
196
+
197
+
198
+
199
+
200
+
201
+ <h2>
202
+ Instance Method Summary
203
+ <small><a href="#" class="summary_toggle">collapse</a></small>
204
+ </h2>
205
+
206
+ <ul class="summary">
207
+
208
+ <li class="public ">
209
+ <span class="summary_signature">
210
+
211
+ <a href="#initialize-instance_method" title="#initialize (instance method)">#<strong>initialize</strong>(unit, periods) &#x21d2; Formatter </a>
212
+
213
+
214
+
215
+ </span>
216
+
217
+
218
+ <span class="note title constructor">constructor</span>
219
+
220
+
221
+
222
+
223
+
224
+
225
+
226
+
227
+ <span class="summary_desc"><div class='inline'>
228
+ <p>A new instance of Formatter.</p>
229
+ </div></span>
230
+
231
+ </li>
232
+
233
+
234
+ <li class="public ">
235
+ <span class="summary_signature">
236
+
237
+ <a href="#to_s-instance_method" title="#to_s (instance method)">#<strong>to_s</strong> &#x21d2; Object </a>
238
+
239
+
240
+
241
+ </span>
242
+
243
+
244
+
245
+
246
+
247
+
248
+
249
+
250
+
251
+ <span class="summary_desc"><div class='inline'></div></span>
252
+
253
+ </li>
254
+
255
+
256
+ </ul>
257
+
258
+
259
+ <div id="constructor_details" class="method_details_list">
260
+ <h2>Constructor Details</h2>
261
+
262
+ <div class="method_details first">
263
+ <h3 class="signature first" id="initialize-instance_method">
264
+
265
+ #<strong>initialize</strong>(unit, periods) &#x21d2; <tt><span class='object_link'><a href="" title="TimeBoss::Calendar::Support::Formatter (class)">Formatter</a></span></tt>
266
+
267
+
268
+
269
+
270
+
271
+ </h3><div class="docstring">
272
+ <div class="discussion">
273
+
274
+ <p>Returns a new instance of Formatter.</p>
275
+
276
+
277
+ </div>
278
+ </div>
279
+ <div class="tags">
280
+
281
+
282
+ </div><table class="source_code">
283
+ <tr>
284
+ <td>
285
+ <pre class="lines">
286
+
287
+
288
+ 14
289
+ 15
290
+ 16
291
+ 17</pre>
292
+ </td>
293
+ <td>
294
+ <pre class="code"><span class="info file"># File 'lib/timeboss/calendar/support/formatter.rb', line 14</span>
295
+
296
+ <span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span><span class='lparen'>(</span><span class='id identifier rubyid_unit'>unit</span><span class='comma'>,</span> <span class='id identifier rubyid_periods'>periods</span><span class='rparen'>)</span>
297
+ <span class='ivar'>@unit</span> <span class='op'>=</span> <span class='id identifier rubyid_unit'>unit</span>
298
+ <span class='ivar'>@periods</span> <span class='op'>=</span> <span class='const'><span class='object_link'><a href="#PERIODS-constant" title="TimeBoss::Calendar::Support::Formatter::PERIODS (constant)">PERIODS</a></span></span> <span class='op'>&amp;</span> <span class='id identifier rubyid_periods'>periods</span><span class='period'>.</span><span class='id identifier rubyid_map'>map</span><span class='lparen'>(</span><span class='op'>&amp;</span><span class='symbol'>:to_sym</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_push'>push</span><span class='lparen'>(</span><span class='id identifier rubyid_unit'>unit</span><span class='period'>.</span><span class='id identifier rubyid_class'>class</span><span class='period'>.</span><span class='id identifier rubyid_type'>type</span><span class='period'>.</span><span class='id identifier rubyid_to_sym'>to_sym</span><span class='rparen'>)</span>
299
+ <span class='kw'>end</span></pre>
300
+ </td>
301
+ </tr>
302
+ </table>
303
+ </div>
304
+
305
+ </div>
306
+
307
+ <div id="instance_attr_details" class="attr_details">
308
+ <h2>Instance Attribute Details</h2>
309
+
310
+
311
+ <span id=""></span>
312
+ <div class="method_details first">
313
+ <h3 class="signature first" id="periods-instance_method">
314
+
315
+ #<strong>periods</strong> &#x21d2; <tt>Object</tt> <span class="extras">(readonly)</span>
316
+
317
+
318
+
319
+
320
+
321
+ </h3><div class="docstring">
322
+ <div class="discussion">
323
+
324
+ <p>Returns the value of attribute periods.</p>
325
+
326
+
327
+ </div>
328
+ </div>
329
+ <div class="tags">
330
+
331
+
332
+ </div><table class="source_code">
333
+ <tr>
334
+ <td>
335
+ <pre class="lines">
336
+
337
+
338
+ 12
339
+ 13
340
+ 14</pre>
341
+ </td>
342
+ <td>
343
+ <pre class="code"><span class="info file"># File 'lib/timeboss/calendar/support/formatter.rb', line 12</span>
344
+
345
+ <span class='kw'>def</span> <span class='id identifier rubyid_periods'>periods</span>
346
+ <span class='ivar'>@periods</span>
347
+ <span class='kw'>end</span></pre>
348
+ </td>
349
+ </tr>
350
+ </table>
351
+ </div>
352
+
353
+
354
+ <span id=""></span>
355
+ <div class="method_details ">
356
+ <h3 class="signature " id="unit-instance_method">
357
+
358
+ #<strong>unit</strong> &#x21d2; <tt>Object</tt> <span class="extras">(readonly)</span>
359
+
360
+
361
+
362
+
363
+
364
+ </h3><div class="docstring">
365
+ <div class="discussion">
366
+
367
+ <p>Returns the value of attribute unit.</p>
368
+
369
+
370
+ </div>
371
+ </div>
372
+ <div class="tags">
373
+
374
+
375
+ </div><table class="source_code">
376
+ <tr>
377
+ <td>
378
+ <pre class="lines">
379
+
380
+
381
+ 12
382
+ 13
383
+ 14</pre>
384
+ </td>
385
+ <td>
386
+ <pre class="code"><span class="info file"># File 'lib/timeboss/calendar/support/formatter.rb', line 12</span>
387
+
388
+ <span class='kw'>def</span> <span class='id identifier rubyid_unit'>unit</span>
389
+ <span class='ivar'>@unit</span>
390
+ <span class='kw'>end</span></pre>
391
+ </td>
392
+ </tr>
393
+ </table>
394
+ </div>
395
+
396
+ </div>
397
+
398
+
399
+ <div id="instance_method_details" class="method_details_list">
400
+ <h2>Instance Method Details</h2>
401
+
402
+
403
+ <div class="method_details first">
404
+ <h3 class="signature first" id="to_s-instance_method">
405
+
406
+ #<strong>to_s</strong> &#x21d2; <tt>Object</tt>
407
+
408
+
409
+
410
+
411
+
412
+ </h3><table class="source_code">
413
+ <tr>
414
+ <td>
415
+ <pre class="lines">
416
+
417
+
418
+ 19
419
+ 20
420
+ 21
421
+ 22
422
+ 23
423
+ 24
424
+ 25
425
+ 26
426
+ 27
427
+ 28</pre>
428
+ </td>
429
+ <td>
430
+ <pre class="code"><span class="info file"># File 'lib/timeboss/calendar/support/formatter.rb', line 19</span>
431
+
432
+ <span class='kw'>def</span> <span class='id identifier rubyid_to_s'>to_s</span>
433
+ <span class='id identifier rubyid_base'>base</span><span class='comma'>,</span> <span class='id identifier rubyid_text'>text</span> <span class='op'>=</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>year</span><span class='tstring_end'>&#39;</span></span><span class='comma'>,</span> <span class='id identifier rubyid_unit'>unit</span><span class='period'>.</span><span class='id identifier rubyid_year'>year</span><span class='period'>.</span><span class='id identifier rubyid_name'>name</span>
434
+ <span class='id identifier rubyid_periods'>periods</span><span class='period'>.</span><span class='id identifier rubyid_each'>each</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_period'>period</span><span class='op'>|</span>
435
+ <span class='id identifier rubyid_sub'>sub</span> <span class='op'>=</span> <span class='id identifier rubyid_unit'>unit</span><span class='period'>.</span><span class='id identifier rubyid_send'>send</span><span class='lparen'>(</span><span class='id identifier rubyid_period'>period</span><span class='rparen'>)</span> <span class='kw'>or</span> <span class='kw'>break</span>
436
+ <span class='id identifier rubyid_index'>index</span> <span class='op'>=</span> <span class='id identifier rubyid_sub'>sub</span><span class='period'>.</span><span class='id identifier rubyid_send'>send</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>in_</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_base'>base</span><span class='embexpr_end'>}</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span>
437
+ <span class='id identifier rubyid_text'>text</span> <span class='op'>+=</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_period'>period</span><span class='lbracket'>[</span><span class='int'>0</span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_upcase'>upcase</span><span class='embexpr_end'>}</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_index'>index</span><span class='embexpr_end'>}</span><span class='tstring_end'>&quot;</span></span>
438
+ <span class='id identifier rubyid_base'>base</span> <span class='op'>=</span> <span class='id identifier rubyid_period'>period</span>
439
+ <span class='kw'>end</span>
440
+ <span class='id identifier rubyid_text'>text</span>
441
+ <span class='kw'>end</span></pre>
442
+ </td>
443
+ </tr>
444
+ </table>
445
+ </div>
446
+
447
+ </div>
448
+
449
+ </div>
450
+
451
+ <div id="footer">
452
+ Generated on Sun Jul 19 10:12:11 2020 by
453
+ <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
454
+ 0.9.25 (ruby-2.4.1).
455
+ </div>
456
+
457
+ </div>
458
+ </body>
459
+ </html>