timeboss 0.0.10 → 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (71) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +1 -0
  3. data/.yardopts +1 -0
  4. data/README.md +1 -1
  5. data/doc/TimeBoss.html +146 -0
  6. data/doc/TimeBoss/Calendar.html +137 -0
  7. data/doc/TimeBoss/Calendar/Day.html +594 -0
  8. data/doc/TimeBoss/Calendar/Half.html +396 -0
  9. data/doc/TimeBoss/Calendar/Month.html +396 -0
  10. data/doc/TimeBoss/Calendar/Parser.html +386 -0
  11. data/doc/TimeBoss/Calendar/Period.html +841 -0
  12. data/doc/TimeBoss/Calendar/Quarter.html +396 -0
  13. data/doc/TimeBoss/Calendar/Support.html +131 -0
  14. data/doc/TimeBoss/Calendar/Support/Formatter.html +459 -0
  15. data/doc/TimeBoss/Calendar/Support/MonthBased.html +591 -0
  16. data/doc/TimeBoss/Calendar/Support/MonthBasis.html +437 -0
  17. data/doc/TimeBoss/Calendar/Support/MonthlyUnit.html +591 -0
  18. data/doc/TimeBoss/Calendar/Support/Navigable.html +723 -0
  19. data/doc/TimeBoss/Calendar/Support/Shiftable.html +138 -0
  20. data/doc/TimeBoss/Calendar/Support/Unit.html +1299 -0
  21. data/doc/TimeBoss/Calendar/Waypoints.html +155 -0
  22. data/doc/TimeBoss/Calendar/Waypoints/Absolute.html +1378 -0
  23. data/doc/TimeBoss/Calendar/Waypoints/Relative.html +4308 -0
  24. data/doc/TimeBoss/Calendar/Week.html +671 -0
  25. data/doc/TimeBoss/Calendar/Year.html +319 -0
  26. data/doc/TimeBoss/Calendars.html +336 -0
  27. data/doc/TimeBoss/Calendars/Broadcast.html +221 -0
  28. data/doc/TimeBoss/Calendars/Broadcast/Basis.html +278 -0
  29. data/doc/TimeBoss/Calendars/Entry.html +399 -0
  30. data/doc/TimeBoss/Support.html +115 -0
  31. data/doc/TimeBoss/Support/Shellable.html +249 -0
  32. data/doc/_index.html +416 -0
  33. data/doc/class_list.html +51 -0
  34. data/doc/css/common.css +1 -0
  35. data/doc/css/full_list.css +58 -0
  36. data/doc/css/style.css +496 -0
  37. data/doc/file.README.html +299 -0
  38. data/doc/file_list.html +56 -0
  39. data/doc/frames.html +17 -0
  40. data/doc/index.html +299 -0
  41. data/doc/js/app.js +314 -0
  42. data/doc/js/full_list.js +216 -0
  43. data/doc/js/jquery.js +4 -0
  44. data/doc/method_list.html +1139 -0
  45. data/doc/top-level-namespace.html +110 -0
  46. data/lib/timeboss.rb +4 -0
  47. data/lib/timeboss/calendar.rb +14 -0
  48. data/lib/timeboss/calendar/day.rb +10 -3
  49. data/lib/timeboss/calendar/half.rb +7 -2
  50. data/lib/timeboss/calendar/month.rb +7 -2
  51. data/lib/timeboss/calendar/parser.rb +1 -0
  52. data/lib/timeboss/calendar/period.rb +26 -11
  53. data/lib/timeboss/calendar/quarter.rb +7 -2
  54. data/lib/timeboss/calendar/support.rb +8 -0
  55. data/lib/timeboss/calendar/support/formatter.rb +1 -0
  56. data/lib/timeboss/calendar/support/month_basis.rb +3 -0
  57. data/lib/timeboss/calendar/support/{month_based.rb → monthly_unit.rb} +7 -1
  58. data/lib/timeboss/calendar/support/navigable.rb +25 -1
  59. data/lib/timeboss/calendar/support/shiftable.rb +3 -2
  60. data/lib/timeboss/calendar/support/unit.rb +24 -0
  61. data/lib/timeboss/calendar/waypoints.rb +6 -55
  62. data/lib/timeboss/calendar/waypoints/absolute.rb +114 -0
  63. data/lib/timeboss/calendar/waypoints/relative.rb +268 -0
  64. data/lib/timeboss/calendar/week.rb +11 -0
  65. data/lib/timeboss/calendar/year.rb +6 -5
  66. data/lib/timeboss/calendars.rb +16 -0
  67. data/lib/timeboss/version.rb +1 -1
  68. data/spec/calendar/support/{month_based_spec.rb → monthly_unit_spec.rb} +7 -7
  69. data/spec/calendars/broadcast_spec.rb +7 -7
  70. data/timeboss.gemspec +1 -0
  71. metadata +70 -7
@@ -0,0 +1,591 @@
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::MonthBased
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::MonthBased";
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 (M)</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 (class)">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">MonthBased</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::MonthBased
63
+
64
+
65
+
66
+ </h1>
67
+ <div class="box_info">
68
+
69
+ <dl>
70
+ <dt>Inherits:</dt>
71
+ <dd>
72
+ <span class="inheritName"><span class='object_link'><a href="Unit.html" title="TimeBoss::Calendar::Support::Unit (class)">Unit</a></span></span>
73
+
74
+ <ul class="fullTree">
75
+ <li>Object</li>
76
+
77
+ <li class="next"><span class='object_link'><a href="Unit.html" title="TimeBoss::Calendar::Support::Unit (class)">Unit</a></span></li>
78
+
79
+ <li class="next">TimeBoss::Calendar::Support::MonthBased</li>
80
+
81
+ </ul>
82
+ <a href="#" class="inheritanceTree">show all</a>
83
+
84
+ </dd>
85
+ </dl>
86
+
87
+
88
+
89
+
90
+
91
+
92
+
93
+
94
+
95
+
96
+
97
+ <dl>
98
+ <dt>Defined in:</dt>
99
+ <dd>lib/timeboss/calendar/support/month_based.rb</dd>
100
+ </dl>
101
+
102
+ </div>
103
+
104
+ <h2>Overview</h2><div class="docstring">
105
+ <div class="discussion">
106
+
107
+ <p>Units that are built off of month-granularities (months, quarters, etc).
108
+ Days and weeks are not built from these.</p>
109
+
110
+
111
+ </div>
112
+ </div>
113
+ <div class="tags">
114
+
115
+
116
+ </div><div id="subclasses">
117
+ <h2>Direct Known Subclasses</h2>
118
+ <p class="children"><span class='object_link'><a href="../Half.html" title="TimeBoss::Calendar::Half (class)">Half</a></span>, <span class='object_link'><a href="../Month.html" title="TimeBoss::Calendar::Month (class)">Month</a></span>, <span class='object_link'><a href="../Quarter.html" title="TimeBoss::Calendar::Quarter (class)">Quarter</a></span>, <span class='object_link'><a href="../Year.html" title="TimeBoss::Calendar::Year (class)">Year</a></span></p>
119
+ </div>
120
+
121
+
122
+
123
+ <h2>Constant Summary</h2>
124
+
125
+ <h3 class="inherited">Constants included
126
+ from <span class='object_link'><a href="Shiftable.html" title="TimeBoss::Calendar::Support::Shiftable (module)">Shiftable</a></span></h3>
127
+ <p class="inherited"><span class='object_link'><a href="Shiftable.html#PERIODS-constant" title="TimeBoss::Calendar::Support::Shiftable::PERIODS (constant)">Shiftable::PERIODS</a></span></p>
128
+
129
+
130
+ <h2>Instance Attribute Summary <small><a href="#" class="summary_toggle">collapse</a></small></h2>
131
+ <ul class="summary">
132
+
133
+ <li class="public ">
134
+ <span class="summary_signature">
135
+
136
+ <a href="#index-instance_method" title="#index (instance method)">#<strong>index</strong> &#x21d2; Object </a>
137
+
138
+
139
+
140
+ </span>
141
+
142
+
143
+
144
+
145
+ <span class="note title readonly">readonly</span>
146
+
147
+
148
+
149
+
150
+
151
+
152
+
153
+
154
+
155
+ <span class="summary_desc"><div class='inline'>
156
+ <p>Returns the value of attribute index.</p>
157
+ </div></span>
158
+
159
+ </li>
160
+
161
+
162
+ <li class="public ">
163
+ <span class="summary_signature">
164
+
165
+ <a href="#year_index-instance_method" title="#year_index (instance method)">#<strong>year_index</strong> &#x21d2; Object </a>
166
+
167
+
168
+
169
+ </span>
170
+
171
+
172
+
173
+
174
+ <span class="note title readonly">readonly</span>
175
+
176
+
177
+
178
+
179
+
180
+
181
+
182
+
183
+
184
+ <span class="summary_desc"><div class='inline'>
185
+ <p>Returns the value of attribute year_index.</p>
186
+ </div></span>
187
+
188
+ </li>
189
+
190
+
191
+ </ul>
192
+
193
+
194
+
195
+
196
+
197
+ <h3 class="inherited">Attributes inherited from <span class='object_link'><a href="Unit.html" title="TimeBoss::Calendar::Support::Unit (class)">Unit</a></span></h3>
198
+ <p class="inherited"><span class='object_link'><a href="Unit.html#calendar-instance_method" title="TimeBoss::Calendar::Support::Unit#calendar (method)">#calendar</a></span>, <span class='object_link'><a href="Unit.html#end_date-instance_method" title="TimeBoss::Calendar::Support::Unit#end_date (method)">#end_date</a></span>, <span class='object_link'><a href="Unit.html#start_date-instance_method" title="TimeBoss::Calendar::Support::Unit#start_date (method)">#start_date</a></span></p>
199
+
200
+
201
+
202
+ <h2>
203
+ Instance Method Summary
204
+ <small><a href="#" class="summary_toggle">collapse</a></small>
205
+ </h2>
206
+
207
+ <ul class="summary">
208
+
209
+ <li class="public ">
210
+ <span class="summary_signature">
211
+
212
+ <a href="#initialize-instance_method" title="#initialize (instance method)">#<strong>initialize</strong>(calendar, year_index, index, start_date, end_date) &#x21d2; MonthBased </a>
213
+
214
+
215
+
216
+ </span>
217
+
218
+
219
+ <span class="note title constructor">constructor</span>
220
+
221
+
222
+
223
+
224
+
225
+
226
+
227
+
228
+ <span class="summary_desc"><div class='inline'>
229
+ <p>A new instance of MonthBased.</p>
230
+ </div></span>
231
+
232
+ </li>
233
+
234
+
235
+ <li class="public ">
236
+ <span class="summary_signature">
237
+
238
+ <a href="#to_s-instance_method" title="#to_s (instance method)">#<strong>to_s</strong> &#x21d2; String </a>
239
+
240
+
241
+
242
+ </span>
243
+
244
+
245
+
246
+
247
+
248
+
249
+
250
+
251
+
252
+ <span class="summary_desc"><div class='inline'>
253
+ <p>Get a stringified representation of this unit.</p>
254
+ </div></span>
255
+
256
+ </li>
257
+
258
+
259
+ <li class="public ">
260
+ <span class="summary_signature">
261
+
262
+ <a href="#weeks-instance_method" title="#weeks (instance method)">#<strong>weeks</strong> &#x21d2; Array&lt;Week&gt; </a>
263
+
264
+
265
+
266
+ </span>
267
+
268
+
269
+
270
+
271
+
272
+
273
+
274
+
275
+
276
+ <span class="summary_desc"><div class='inline'>
277
+ <p>Get a list of weeks contained within this period.</p>
278
+ </div></span>
279
+
280
+ </li>
281
+
282
+
283
+ </ul>
284
+
285
+
286
+
287
+
288
+
289
+
290
+
291
+
292
+
293
+
294
+
295
+ <h3 class="inherited">Methods inherited from <span class='object_link'><a href="Unit.html" title="TimeBoss::Calendar::Support::Unit (class)">Unit</a></span></h3>
296
+ <p class="inherited"><span class='object_link'><a href="Unit.html#%2B-instance_method" title="TimeBoss::Calendar::Support::Unit#+ (method)">#+</a></span>, <span class='object_link'><a href="Unit.html#--instance_method" title="TimeBoss::Calendar::Support::Unit#- (method)">#-</a></span>, <span class='object_link'><a href="Unit.html#==-instance_method" title="TimeBoss::Calendar::Support::Unit#== (method)">#==</a></span>, <span class='object_link'><a href="Unit.html#current%3F-instance_method" title="TimeBoss::Calendar::Support::Unit#current? (method)">#current?</a></span>, <span class='object_link'><a href="Unit.html#format-instance_method" title="TimeBoss::Calendar::Support::Unit#format (method)">#format</a></span>, <span class='object_link'><a href="Unit.html#offset-instance_method" title="TimeBoss::Calendar::Support::Unit#offset (method)">#offset</a></span>, <span class='object_link'><a href="Unit.html#thru-instance_method" title="TimeBoss::Calendar::Support::Unit#thru (method)">#thru</a></span>, <span class='object_link'><a href="Unit.html#to_range-instance_method" title="TimeBoss::Calendar::Support::Unit#to_range (method)">#to_range</a></span>, <span class='object_link'><a href="Unit.html#type-class_method" title="TimeBoss::Calendar::Support::Unit.type (method)">type</a></span></p>
297
+
298
+
299
+
300
+
301
+
302
+
303
+
304
+
305
+
306
+
307
+
308
+
309
+
310
+
311
+
312
+ <h3 class="inherited">Methods included from <span class='object_link'><a href="Navigable.html" title="TimeBoss::Calendar::Support::Navigable (module)">Navigable</a></span></h3>
313
+ <p class="inherited"><span class='object_link'><a href="Navigable.html#ago-instance_method" title="TimeBoss::Calendar::Support::Navigable#ago (method)">#ago</a></span>, <span class='object_link'><a href="Navigable.html#ahead-instance_method" title="TimeBoss::Calendar::Support::Navigable#ahead (method)">#ahead</a></span>, <span class='object_link'><a href="Navigable.html#next-instance_method" title="TimeBoss::Calendar::Support::Navigable#next (method)">#next</a></span>, <span class='object_link'><a href="Navigable.html#previous-instance_method" title="TimeBoss::Calendar::Support::Navigable#previous (method)">#previous</a></span>, <span class='object_link'><a href="Navigable.html#until-instance_method" title="TimeBoss::Calendar::Support::Navigable#until (method)">#until</a></span></p>
314
+ <div id="constructor_details" class="method_details_list">
315
+ <h2>Constructor Details</h2>
316
+
317
+ <div class="method_details first">
318
+ <h3 class="signature first" id="initialize-instance_method">
319
+
320
+ #<strong>initialize</strong>(calendar, year_index, index, start_date, end_date) &#x21d2; <tt><span class='object_link'><a href="" title="TimeBoss::Calendar::Support::MonthBased (class)">MonthBased</a></span></tt>
321
+
322
+
323
+
324
+
325
+
326
+ </h3><div class="docstring">
327
+ <div class="discussion">
328
+
329
+ <p>Returns a new instance of MonthBased.</p>
330
+
331
+
332
+ </div>
333
+ </div>
334
+ <div class="tags">
335
+
336
+
337
+ </div><table class="source_code">
338
+ <tr>
339
+ <td>
340
+ <pre class="lines">
341
+
342
+
343
+ 13
344
+ 14
345
+ 15
346
+ 16
347
+ 17</pre>
348
+ </td>
349
+ <td>
350
+ <pre class="code"><span class="info file"># File 'lib/timeboss/calendar/support/month_based.rb', line 13</span>
351
+
352
+ <span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span><span class='lparen'>(</span><span class='id identifier rubyid_calendar'>calendar</span><span class='comma'>,</span> <span class='id identifier rubyid_year_index'>year_index</span><span class='comma'>,</span> <span class='id identifier rubyid_index'>index</span><span class='comma'>,</span> <span class='id identifier rubyid_start_date'>start_date</span><span class='comma'>,</span> <span class='id identifier rubyid_end_date'>end_date</span><span class='rparen'>)</span>
353
+ <span class='kw'>super</span><span class='lparen'>(</span><span class='id identifier rubyid_calendar'>calendar</span><span class='comma'>,</span> <span class='id identifier rubyid_start_date'>start_date</span><span class='comma'>,</span> <span class='id identifier rubyid_end_date'>end_date</span><span class='rparen'>)</span>
354
+ <span class='ivar'>@year_index</span> <span class='op'>=</span> <span class='id identifier rubyid_year_index'>year_index</span>
355
+ <span class='ivar'>@index</span> <span class='op'>=</span> <span class='id identifier rubyid_index'>index</span>
356
+ <span class='kw'>end</span></pre>
357
+ </td>
358
+ </tr>
359
+ </table>
360
+ </div>
361
+
362
+ </div>
363
+
364
+ <div id="instance_attr_details" class="attr_details">
365
+ <h2>Instance Attribute Details</h2>
366
+
367
+
368
+ <span id=""></span>
369
+ <div class="method_details first">
370
+ <h3 class="signature first" id="index-instance_method">
371
+
372
+ #<strong>index</strong> &#x21d2; <tt>Object</tt> <span class="extras">(readonly)</span>
373
+
374
+
375
+
376
+
377
+
378
+ </h3><div class="docstring">
379
+ <div class="discussion">
380
+
381
+ <p>Returns the value of attribute index.</p>
382
+
383
+
384
+ </div>
385
+ </div>
386
+ <div class="tags">
387
+
388
+
389
+ </div><table class="source_code">
390
+ <tr>
391
+ <td>
392
+ <pre class="lines">
393
+
394
+
395
+ 10
396
+ 11
397
+ 12</pre>
398
+ </td>
399
+ <td>
400
+ <pre class="code"><span class="info file"># File 'lib/timeboss/calendar/support/month_based.rb', line 10</span>
401
+
402
+ <span class='kw'>def</span> <span class='id identifier rubyid_index'>index</span>
403
+ <span class='ivar'>@index</span>
404
+ <span class='kw'>end</span></pre>
405
+ </td>
406
+ </tr>
407
+ </table>
408
+ </div>
409
+
410
+
411
+ <span id=""></span>
412
+ <div class="method_details ">
413
+ <h3 class="signature " id="year_index-instance_method">
414
+
415
+ #<strong>year_index</strong> &#x21d2; <tt>Object</tt> <span class="extras">(readonly)</span>
416
+
417
+
418
+
419
+
420
+
421
+ </h3><div class="docstring">
422
+ <div class="discussion">
423
+
424
+ <p>Returns the value of attribute year_index.</p>
425
+
426
+
427
+ </div>
428
+ </div>
429
+ <div class="tags">
430
+
431
+
432
+ </div><table class="source_code">
433
+ <tr>
434
+ <td>
435
+ <pre class="lines">
436
+
437
+
438
+ 10
439
+ 11
440
+ 12</pre>
441
+ </td>
442
+ <td>
443
+ <pre class="code"><span class="info file"># File 'lib/timeboss/calendar/support/month_based.rb', line 10</span>
444
+
445
+ <span class='kw'>def</span> <span class='id identifier rubyid_year_index'>year_index</span>
446
+ <span class='ivar'>@year_index</span>
447
+ <span class='kw'>end</span></pre>
448
+ </td>
449
+ </tr>
450
+ </table>
451
+ </div>
452
+
453
+ </div>
454
+
455
+
456
+ <div id="instance_method_details" class="method_details_list">
457
+ <h2>Instance Method Details</h2>
458
+
459
+
460
+ <div class="method_details first">
461
+ <h3 class="signature first" id="to_s-instance_method">
462
+
463
+ #<strong>to_s</strong> &#x21d2; <tt>String</tt>
464
+
465
+
466
+
467
+
468
+
469
+ </h3><div class="docstring">
470
+ <div class="discussion">
471
+
472
+ <p>Get a stringified representation of this unit.</p>
473
+
474
+
475
+ </div>
476
+ </div>
477
+ <div class="tags">
478
+
479
+ <p class="tag_title">Returns:</p>
480
+ <ul class="return">
481
+
482
+ <li>
483
+
484
+
485
+ <span class='type'>(<tt>String</tt>)</span>
486
+
487
+
488
+
489
+ &mdash;
490
+ <div class='inline'>
491
+ <p>(e.g. “2020Q3: 2020-06-29 thru 2020-09-27”)</p>
492
+ </div>
493
+
494
+ </li>
495
+
496
+ </ul>
497
+
498
+ </div><table class="source_code">
499
+ <tr>
500
+ <td>
501
+ <pre class="lines">
502
+
503
+
504
+ 21
505
+ 22
506
+ 23</pre>
507
+ </td>
508
+ <td>
509
+ <pre class="code"><span class="info file"># File 'lib/timeboss/calendar/support/month_based.rb', line 21</span>
510
+
511
+ <span class='kw'>def</span> <span class='id identifier rubyid_to_s'>to_s</span>
512
+ <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_name'>name</span><span class='embexpr_end'>}</span><span class='tstring_content'>: </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_start_date'>start_date</span><span class='embexpr_end'>}</span><span class='tstring_content'> thru </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_end_date'>end_date</span><span class='embexpr_end'>}</span><span class='tstring_end'>&quot;</span></span>
513
+ <span class='kw'>end</span></pre>
514
+ </td>
515
+ </tr>
516
+ </table>
517
+ </div>
518
+
519
+ <div class="method_details ">
520
+ <h3 class="signature " id="weeks-instance_method">
521
+
522
+ #<strong>weeks</strong> &#x21d2; <tt>Array&lt;<span class='object_link'><a href="../Week.html" title="TimeBoss::Calendar::Week (class)">Week</a></span>&gt;</tt>
523
+
524
+
525
+
526
+
527
+
528
+ </h3><div class="docstring">
529
+ <div class="discussion">
530
+
531
+ <p>Get a list of weeks contained within this period.</p>
532
+
533
+
534
+ </div>
535
+ </div>
536
+ <div class="tags">
537
+
538
+ <p class="tag_title">Returns:</p>
539
+ <ul class="return">
540
+
541
+ <li>
542
+
543
+
544
+ <span class='type'>(<tt>Array&lt;<span class='object_link'><a href="../Week.html" title="TimeBoss::Calendar::Week (class)">Week</a></span>&gt;</tt>)</span>
545
+
546
+
547
+
548
+ </li>
549
+
550
+ </ul>
551
+
552
+ </div><table class="source_code">
553
+ <tr>
554
+ <td>
555
+ <pre class="lines">
556
+
557
+
558
+ 27
559
+ 28
560
+ 29
561
+ 30
562
+ 31
563
+ 32</pre>
564
+ </td>
565
+ <td>
566
+ <pre class="code"><span class="info file"># File 'lib/timeboss/calendar/support/month_based.rb', line 27</span>
567
+
568
+ <span class='kw'>def</span> <span class='id identifier rubyid_weeks'>weeks</span>
569
+ <span class='id identifier rubyid_base'>base</span> <span class='op'>=</span> <span class='id identifier rubyid_calendar'>calendar</span><span class='period'>.</span><span class='id identifier rubyid_year'>year</span><span class='lparen'>(</span><span class='id identifier rubyid_year_index'>year_index</span><span class='rparen'>)</span>
570
+ <span class='id identifier rubyid_num_weeks'>num_weeks</span> <span class='op'>=</span> <span class='lparen'>(</span><span class='lparen'>(</span><span class='lparen'>(</span><span class='id identifier rubyid_base'>base</span><span class='period'>.</span><span class='id identifier rubyid_end_date'>end_date</span> <span class='op'>-</span> <span class='id identifier rubyid_base'>base</span><span class='period'>.</span><span class='id identifier rubyid_start_date'>start_date</span><span class='rparen'>)</span> <span class='op'>+</span> <span class='int'>1</span><span class='rparen'>)</span> <span class='op'>/</span> <span class='float'>7.0</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_to_i'>to_i</span>
571
+ <span class='id identifier rubyid_num_weeks'>num_weeks</span><span class='period'>.</span><span class='id identifier rubyid_times'>times</span><span class='period'>.</span><span class='id identifier rubyid_map'>map</span> <span class='lbrace'>{</span> <span class='op'>|</span><span class='id identifier rubyid_i'>i</span><span class='op'>|</span> <span class='const'><span class='object_link'><a href="../Week.html" title="TimeBoss::Calendar::Week (class)">Week</a></span></span><span class='period'>.</span><span class='id identifier rubyid_new'><span class='object_link'><a href="../Week.html#initialize-instance_method" title="TimeBoss::Calendar::Week#initialize (method)">new</a></span></span><span class='lparen'>(</span><span class='id identifier rubyid_calendar'>calendar</span><span class='comma'>,</span> <span class='id identifier rubyid_base'>base</span><span class='period'>.</span><span class='id identifier rubyid_start_date'>start_date</span> <span class='op'>+</span> <span class='lparen'>(</span><span class='id identifier rubyid_i'>i</span> <span class='op'>*</span> <span class='int'>7</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_days'>days</span><span class='comma'>,</span> <span class='id identifier rubyid_base'>base</span><span class='period'>.</span><span class='id identifier rubyid_start_date'>start_date</span> <span class='op'>+</span> <span class='lparen'>(</span><span class='lparen'>(</span><span class='id identifier rubyid_i'>i</span> <span class='op'>*</span> <span class='int'>7</span><span class='rparen'>)</span> <span class='op'>+</span> <span class='int'>6</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_days'>days</span><span class='rparen'>)</span> <span class='rbrace'>}</span>
572
+ <span class='period'>.</span><span class='id identifier rubyid_select'>select</span> <span class='lbrace'>{</span> <span class='op'>|</span><span class='id identifier rubyid_w'>w</span><span class='op'>|</span> <span class='id identifier rubyid_w'>w</span><span class='period'>.</span><span class='id identifier rubyid_start_date'>start_date</span><span class='period'>.</span><span class='id identifier rubyid_between?'>between?</span><span class='lparen'>(</span><span class='id identifier rubyid_start_date'>start_date</span><span class='comma'>,</span> <span class='id identifier rubyid_end_date'>end_date</span><span class='rparen'>)</span> <span class='rbrace'>}</span>
573
+ <span class='kw'>end</span></pre>
574
+ </td>
575
+ </tr>
576
+ </table>
577
+ </div>
578
+
579
+ </div>
580
+
581
+ </div>
582
+
583
+ <div id="footer">
584
+ Generated on Sun Jul 19 09:53:29 2020 by
585
+ <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
586
+ 0.9.25 (ruby-2.4.1).
587
+ </div>
588
+
589
+ </div>
590
+ </body>
591
+ </html>