timeboss 0.0.10 → 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +1 -0
- data/.yardopts +1 -0
- data/README.md +1 -1
- data/doc/TimeBoss.html +146 -0
- data/doc/TimeBoss/Calendar.html +137 -0
- data/doc/TimeBoss/Calendar/Day.html +594 -0
- data/doc/TimeBoss/Calendar/Half.html +396 -0
- data/doc/TimeBoss/Calendar/Month.html +396 -0
- data/doc/TimeBoss/Calendar/Parser.html +386 -0
- data/doc/TimeBoss/Calendar/Period.html +841 -0
- data/doc/TimeBoss/Calendar/Quarter.html +396 -0
- data/doc/TimeBoss/Calendar/Support.html +131 -0
- data/doc/TimeBoss/Calendar/Support/Formatter.html +459 -0
- data/doc/TimeBoss/Calendar/Support/MonthBased.html +591 -0
- data/doc/TimeBoss/Calendar/Support/MonthBasis.html +437 -0
- data/doc/TimeBoss/Calendar/Support/MonthlyUnit.html +591 -0
- data/doc/TimeBoss/Calendar/Support/Navigable.html +723 -0
- data/doc/TimeBoss/Calendar/Support/Shiftable.html +138 -0
- data/doc/TimeBoss/Calendar/Support/Unit.html +1299 -0
- data/doc/TimeBoss/Calendar/Waypoints.html +155 -0
- data/doc/TimeBoss/Calendar/Waypoints/Absolute.html +1378 -0
- data/doc/TimeBoss/Calendar/Waypoints/Relative.html +4308 -0
- data/doc/TimeBoss/Calendar/Week.html +671 -0
- data/doc/TimeBoss/Calendar/Year.html +319 -0
- data/doc/TimeBoss/Calendars.html +336 -0
- data/doc/TimeBoss/Calendars/Broadcast.html +221 -0
- data/doc/TimeBoss/Calendars/Broadcast/Basis.html +278 -0
- data/doc/TimeBoss/Calendars/Entry.html +399 -0
- data/doc/TimeBoss/Support.html +115 -0
- data/doc/TimeBoss/Support/Shellable.html +249 -0
- data/doc/_index.html +416 -0
- data/doc/class_list.html +51 -0
- data/doc/css/common.css +1 -0
- data/doc/css/full_list.css +58 -0
- data/doc/css/style.css +496 -0
- data/doc/file.README.html +299 -0
- data/doc/file_list.html +56 -0
- data/doc/frames.html +17 -0
- data/doc/index.html +299 -0
- data/doc/js/app.js +314 -0
- data/doc/js/full_list.js +216 -0
- data/doc/js/jquery.js +4 -0
- data/doc/method_list.html +1139 -0
- data/doc/top-level-namespace.html +110 -0
- data/lib/timeboss.rb +4 -0
- data/lib/timeboss/calendar.rb +14 -0
- data/lib/timeboss/calendar/day.rb +10 -3
- data/lib/timeboss/calendar/half.rb +7 -2
- data/lib/timeboss/calendar/month.rb +7 -2
- data/lib/timeboss/calendar/parser.rb +1 -0
- data/lib/timeboss/calendar/period.rb +26 -11
- data/lib/timeboss/calendar/quarter.rb +7 -2
- data/lib/timeboss/calendar/support.rb +8 -0
- data/lib/timeboss/calendar/support/formatter.rb +1 -0
- data/lib/timeboss/calendar/support/month_basis.rb +3 -0
- data/lib/timeboss/calendar/support/{month_based.rb → monthly_unit.rb} +7 -1
- data/lib/timeboss/calendar/support/navigable.rb +25 -1
- data/lib/timeboss/calendar/support/shiftable.rb +3 -2
- data/lib/timeboss/calendar/support/unit.rb +24 -0
- data/lib/timeboss/calendar/waypoints.rb +6 -55
- data/lib/timeboss/calendar/waypoints/absolute.rb +114 -0
- data/lib/timeboss/calendar/waypoints/relative.rb +268 -0
- data/lib/timeboss/calendar/week.rb +11 -0
- data/lib/timeboss/calendar/year.rb +6 -5
- data/lib/timeboss/calendars.rb +16 -0
- data/lib/timeboss/version.rb +1 -1
- data/spec/calendar/support/{month_based_spec.rb → monthly_unit_spec.rb} +7 -7
- data/spec/calendars/broadcast_spec.rb +7 -7
- data/timeboss.gemspec +1 -0
- metadata +70 -7
@@ -0,0 +1,437 @@
|
|
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::MonthBasis
|
8
|
+
|
9
|
+
— 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::MonthBasis";
|
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> »
|
40
|
+
<span class='title'><span class='object_link'><a href="../../../TimeBoss.html" title="TimeBoss (module)">TimeBoss</a></span></span> » <span class='title'><span class='object_link'><a href="../../Calendar.html" title="TimeBoss::Calendar (module)">Calendar</a></span></span> » <span class='title'><span class='object_link'><a href="../Support.html" title="TimeBoss::Calendar::Support (module)">Support</a></span></span>
|
41
|
+
»
|
42
|
+
<span class="title">MonthBasis</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::MonthBasis
|
63
|
+
<span class="abstract note title">Abstract</span>
|
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::MonthBasis</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/month_basis.rb</dd>
|
98
|
+
</dl>
|
99
|
+
|
100
|
+
</div>
|
101
|
+
|
102
|
+
<h2>Overview</h2><div class="docstring">
|
103
|
+
<div class="discussion">
|
104
|
+
<div class="note abstract">
|
105
|
+
<strong>This class is abstract.</strong>
|
106
|
+
<div class='inline'></div>
|
107
|
+
</div>
|
108
|
+
|
109
|
+
<p>Implementation of a month basis allows a custom calendar to be built. A
|
110
|
+
month basis must return a start/end date for a given year and month index.</p>
|
111
|
+
|
112
|
+
|
113
|
+
</div>
|
114
|
+
</div>
|
115
|
+
<div class="tags">
|
116
|
+
|
117
|
+
|
118
|
+
</div><div id="subclasses">
|
119
|
+
<h2>Direct Known Subclasses</h2>
|
120
|
+
<p class="children"><span class='object_link'><a href="../../Calendars/Broadcast/Basis.html" title="TimeBoss::Calendars::Broadcast::Basis (class)">TimeBoss::Calendars::Broadcast::Basis</a></span></p>
|
121
|
+
</div>
|
122
|
+
|
123
|
+
|
124
|
+
|
125
|
+
|
126
|
+
<h2>Instance Attribute Summary <small><a href="#" class="summary_toggle">collapse</a></small></h2>
|
127
|
+
<ul class="summary">
|
128
|
+
|
129
|
+
<li class="public ">
|
130
|
+
<span class="summary_signature">
|
131
|
+
|
132
|
+
<a href="#month-instance_method" title="#month (instance method)">#<strong>month</strong> ⇒ Object </a>
|
133
|
+
|
134
|
+
|
135
|
+
|
136
|
+
</span>
|
137
|
+
|
138
|
+
|
139
|
+
|
140
|
+
|
141
|
+
<span class="note title readonly">readonly</span>
|
142
|
+
|
143
|
+
|
144
|
+
|
145
|
+
|
146
|
+
|
147
|
+
|
148
|
+
|
149
|
+
|
150
|
+
|
151
|
+
<span class="summary_desc"><div class='inline'>
|
152
|
+
<p>Returns the value of attribute month.</p>
|
153
|
+
</div></span>
|
154
|
+
|
155
|
+
</li>
|
156
|
+
|
157
|
+
|
158
|
+
<li class="public ">
|
159
|
+
<span class="summary_signature">
|
160
|
+
|
161
|
+
<a href="#year-instance_method" title="#year (instance method)">#<strong>year</strong> ⇒ Object </a>
|
162
|
+
|
163
|
+
|
164
|
+
|
165
|
+
</span>
|
166
|
+
|
167
|
+
|
168
|
+
|
169
|
+
|
170
|
+
<span class="note title readonly">readonly</span>
|
171
|
+
|
172
|
+
|
173
|
+
|
174
|
+
|
175
|
+
|
176
|
+
|
177
|
+
|
178
|
+
|
179
|
+
|
180
|
+
<span class="summary_desc"><div class='inline'>
|
181
|
+
<p>Returns the value of attribute year.</p>
|
182
|
+
</div></span>
|
183
|
+
|
184
|
+
</li>
|
185
|
+
|
186
|
+
|
187
|
+
</ul>
|
188
|
+
|
189
|
+
|
190
|
+
|
191
|
+
|
192
|
+
|
193
|
+
<h2>
|
194
|
+
Instance Method Summary
|
195
|
+
<small><a href="#" class="summary_toggle">collapse</a></small>
|
196
|
+
</h2>
|
197
|
+
|
198
|
+
<ul class="summary">
|
199
|
+
|
200
|
+
<li class="public ">
|
201
|
+
<span class="summary_signature">
|
202
|
+
|
203
|
+
<a href="#initialize-instance_method" title="#initialize (instance method)">#<strong>initialize</strong>(year, month) ⇒ MonthBasis </a>
|
204
|
+
|
205
|
+
|
206
|
+
|
207
|
+
</span>
|
208
|
+
|
209
|
+
|
210
|
+
<span class="note title constructor">constructor</span>
|
211
|
+
|
212
|
+
|
213
|
+
|
214
|
+
|
215
|
+
|
216
|
+
|
217
|
+
|
218
|
+
|
219
|
+
<span class="summary_desc"><div class='inline'>
|
220
|
+
<p>A new instance of MonthBasis.</p>
|
221
|
+
</div></span>
|
222
|
+
|
223
|
+
</li>
|
224
|
+
|
225
|
+
|
226
|
+
<li class="public ">
|
227
|
+
<span class="summary_signature">
|
228
|
+
|
229
|
+
<a href="#to_range-instance_method" title="#to_range (instance method)">#<strong>to_range</strong> ⇒ Object </a>
|
230
|
+
|
231
|
+
|
232
|
+
|
233
|
+
</span>
|
234
|
+
|
235
|
+
|
236
|
+
|
237
|
+
|
238
|
+
|
239
|
+
|
240
|
+
|
241
|
+
|
242
|
+
|
243
|
+
<span class="summary_desc"><div class='inline'></div></span>
|
244
|
+
|
245
|
+
</li>
|
246
|
+
|
247
|
+
|
248
|
+
</ul>
|
249
|
+
|
250
|
+
|
251
|
+
<div id="constructor_details" class="method_details_list">
|
252
|
+
<h2>Constructor Details</h2>
|
253
|
+
|
254
|
+
<div class="method_details first">
|
255
|
+
<h3 class="signature first" id="initialize-instance_method">
|
256
|
+
|
257
|
+
#<strong>initialize</strong>(year, month) ⇒ <tt><span class='object_link'><a href="" title="TimeBoss::Calendar::Support::MonthBasis (class)">MonthBasis</a></span></tt>
|
258
|
+
|
259
|
+
|
260
|
+
|
261
|
+
|
262
|
+
|
263
|
+
</h3><div class="docstring">
|
264
|
+
<div class="discussion">
|
265
|
+
|
266
|
+
<p>Returns a new instance of MonthBasis.</p>
|
267
|
+
|
268
|
+
|
269
|
+
</div>
|
270
|
+
</div>
|
271
|
+
<div class="tags">
|
272
|
+
|
273
|
+
|
274
|
+
</div><table class="source_code">
|
275
|
+
<tr>
|
276
|
+
<td>
|
277
|
+
<pre class="lines">
|
278
|
+
|
279
|
+
|
280
|
+
10
|
281
|
+
11
|
282
|
+
12
|
283
|
+
13</pre>
|
284
|
+
</td>
|
285
|
+
<td>
|
286
|
+
<pre class="code"><span class="info file"># File 'lib/timeboss/calendar/support/month_basis.rb', line 10</span>
|
287
|
+
|
288
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span><span class='lparen'>(</span><span class='id identifier rubyid_year'>year</span><span class='comma'>,</span> <span class='id identifier rubyid_month'>month</span><span class='rparen'>)</span>
|
289
|
+
<span class='ivar'>@year</span> <span class='op'>=</span> <span class='id identifier rubyid_year'>year</span>
|
290
|
+
<span class='ivar'>@month</span> <span class='op'>=</span> <span class='id identifier rubyid_month'>month</span>
|
291
|
+
<span class='kw'>end</span></pre>
|
292
|
+
</td>
|
293
|
+
</tr>
|
294
|
+
</table>
|
295
|
+
</div>
|
296
|
+
|
297
|
+
</div>
|
298
|
+
|
299
|
+
<div id="instance_attr_details" class="attr_details">
|
300
|
+
<h2>Instance Attribute Details</h2>
|
301
|
+
|
302
|
+
|
303
|
+
<span id=""></span>
|
304
|
+
<div class="method_details first">
|
305
|
+
<h3 class="signature first" id="month-instance_method">
|
306
|
+
|
307
|
+
#<strong>month</strong> ⇒ <tt>Object</tt> <span class="extras">(readonly)</span>
|
308
|
+
|
309
|
+
|
310
|
+
|
311
|
+
|
312
|
+
|
313
|
+
</h3><div class="docstring">
|
314
|
+
<div class="discussion">
|
315
|
+
|
316
|
+
<p>Returns the value of attribute month.</p>
|
317
|
+
|
318
|
+
|
319
|
+
</div>
|
320
|
+
</div>
|
321
|
+
<div class="tags">
|
322
|
+
|
323
|
+
|
324
|
+
</div><table class="source_code">
|
325
|
+
<tr>
|
326
|
+
<td>
|
327
|
+
<pre class="lines">
|
328
|
+
|
329
|
+
|
330
|
+
8
|
331
|
+
9
|
332
|
+
10</pre>
|
333
|
+
</td>
|
334
|
+
<td>
|
335
|
+
<pre class="code"><span class="info file"># File 'lib/timeboss/calendar/support/month_basis.rb', line 8</span>
|
336
|
+
|
337
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_month'>month</span>
|
338
|
+
<span class='ivar'>@month</span>
|
339
|
+
<span class='kw'>end</span></pre>
|
340
|
+
</td>
|
341
|
+
</tr>
|
342
|
+
</table>
|
343
|
+
</div>
|
344
|
+
|
345
|
+
|
346
|
+
<span id=""></span>
|
347
|
+
<div class="method_details ">
|
348
|
+
<h3 class="signature " id="year-instance_method">
|
349
|
+
|
350
|
+
#<strong>year</strong> ⇒ <tt>Object</tt> <span class="extras">(readonly)</span>
|
351
|
+
|
352
|
+
|
353
|
+
|
354
|
+
|
355
|
+
|
356
|
+
</h3><div class="docstring">
|
357
|
+
<div class="discussion">
|
358
|
+
|
359
|
+
<p>Returns the value of attribute year.</p>
|
360
|
+
|
361
|
+
|
362
|
+
</div>
|
363
|
+
</div>
|
364
|
+
<div class="tags">
|
365
|
+
|
366
|
+
|
367
|
+
</div><table class="source_code">
|
368
|
+
<tr>
|
369
|
+
<td>
|
370
|
+
<pre class="lines">
|
371
|
+
|
372
|
+
|
373
|
+
8
|
374
|
+
9
|
375
|
+
10</pre>
|
376
|
+
</td>
|
377
|
+
<td>
|
378
|
+
<pre class="code"><span class="info file"># File 'lib/timeboss/calendar/support/month_basis.rb', line 8</span>
|
379
|
+
|
380
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_year'>year</span>
|
381
|
+
<span class='ivar'>@year</span>
|
382
|
+
<span class='kw'>end</span></pre>
|
383
|
+
</td>
|
384
|
+
</tr>
|
385
|
+
</table>
|
386
|
+
</div>
|
387
|
+
|
388
|
+
</div>
|
389
|
+
|
390
|
+
|
391
|
+
<div id="instance_method_details" class="method_details_list">
|
392
|
+
<h2>Instance Method Details</h2>
|
393
|
+
|
394
|
+
|
395
|
+
<div class="method_details first">
|
396
|
+
<h3 class="signature first" id="to_range-instance_method">
|
397
|
+
|
398
|
+
#<strong>to_range</strong> ⇒ <tt>Object</tt>
|
399
|
+
|
400
|
+
|
401
|
+
|
402
|
+
|
403
|
+
|
404
|
+
</h3><table class="source_code">
|
405
|
+
<tr>
|
406
|
+
<td>
|
407
|
+
<pre class="lines">
|
408
|
+
|
409
|
+
|
410
|
+
15
|
411
|
+
16
|
412
|
+
17</pre>
|
413
|
+
</td>
|
414
|
+
<td>
|
415
|
+
<pre class="code"><span class="info file"># File 'lib/timeboss/calendar/support/month_basis.rb', line 15</span>
|
416
|
+
|
417
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_to_range'>to_range</span>
|
418
|
+
<span class='ivar'>@_to_range</span> <span class='op'>||=</span> <span class='id identifier rubyid_start_date'>start_date</span> <span class='op'>..</span> <span class='id identifier rubyid_end_date'>end_date</span>
|
419
|
+
<span class='kw'>end</span></pre>
|
420
|
+
</td>
|
421
|
+
</tr>
|
422
|
+
</table>
|
423
|
+
</div>
|
424
|
+
|
425
|
+
</div>
|
426
|
+
|
427
|
+
</div>
|
428
|
+
|
429
|
+
<div id="footer">
|
430
|
+
Generated on Sun Jul 19 10:12:11 2020 by
|
431
|
+
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
432
|
+
0.9.25 (ruby-2.4.1).
|
433
|
+
</div>
|
434
|
+
|
435
|
+
</div>
|
436
|
+
</body>
|
437
|
+
</html>
|
@@ -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::MonthlyUnit
|
8
|
+
|
9
|
+
— 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::MonthlyUnit";
|
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> »
|
40
|
+
<span class='title'><span class='object_link'><a href="../../../TimeBoss.html" title="TimeBoss (module)">TimeBoss</a></span></span> » <span class='title'><span class='object_link'><a href="../../Calendar.html" title="TimeBoss::Calendar (module)">Calendar</a></span></span> » <span class='title'><span class='object_link'><a href="../Support.html" title="TimeBoss::Calendar::Support (module)">Support</a></span></span>
|
41
|
+
»
|
42
|
+
<span class="title">MonthlyUnit</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::MonthlyUnit
|
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::MonthlyUnit</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/monthly_unit.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> ⇒ 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> ⇒ 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) ⇒ MonthlyUnit </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 MonthlyUnit.</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> ⇒ 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> ⇒ Array<Week> </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) ⇒ <tt><span class='object_link'><a href="" title="TimeBoss::Calendar::Support::MonthlyUnit (class)">MonthlyUnit</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 MonthlyUnit.</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
|
+
12
|
344
|
+
13
|
345
|
+
14
|
346
|
+
15
|
347
|
+
16</pre>
|
348
|
+
</td>
|
349
|
+
<td>
|
350
|
+
<pre class="code"><span class="info file"># File 'lib/timeboss/calendar/support/monthly_unit.rb', line 12</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> ⇒ <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/monthly_unit.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> ⇒ <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/monthly_unit.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> ⇒ <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
|
+
—
|
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
|
+
20
|
505
|
+
21
|
506
|
+
22</pre>
|
507
|
+
</td>
|
508
|
+
<td>
|
509
|
+
<pre class="code"><span class="info file"># File 'lib/timeboss/calendar/support/monthly_unit.rb', line 20</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'>"</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'>"</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> ⇒ <tt>Array<<span class='object_link'><a href="../Week.html" title="TimeBoss::Calendar::Week (class)">Week</a></span>></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<<span class='object_link'><a href="../Week.html" title="TimeBoss::Calendar::Week (class)">Week</a></span>></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
|
+
26
|
559
|
+
27
|
560
|
+
28
|
561
|
+
29
|
562
|
+
30
|
563
|
+
31</pre>
|
564
|
+
</td>
|
565
|
+
<td>
|
566
|
+
<pre class="code"><span class="info file"># File 'lib/timeboss/calendar/support/monthly_unit.rb', line 26</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 10:12:11 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>
|