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.
- 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,386 @@
|
|
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::Parser
|
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::Parser";
|
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 (P)</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 (class)">Calendar</a></span></span>
|
41
|
+
»
|
42
|
+
<span class="title">Parser</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::Parser
|
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::Parser</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/parser.rb</dd>
|
98
|
+
</dl>
|
99
|
+
|
100
|
+
</div>
|
101
|
+
|
102
|
+
<h2>Overview</h2><div class="docstring">
|
103
|
+
<div class="discussion">
|
104
|
+
|
105
|
+
<p>The parser is responsible for the implementation of a calendar's
|
106
|
+
identifier parsing abilities.</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="RANGE_DELIMITER-constant" class="">RANGE_DELIMITER =
|
124
|
+
|
125
|
+
</dt>
|
126
|
+
<dd><pre class="code"><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>..</span><span class='tstring_end'>'</span></span></pre></dd>
|
127
|
+
|
128
|
+
<dt id="InvalidPeriodIdentifierError-constant" class="">InvalidPeriodIdentifierError =
|
129
|
+
|
130
|
+
</dt>
|
131
|
+
<dd><pre class="code"><span class='const'>Class</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='const'>StandardError</span><span class='rparen'>)</span></pre></dd>
|
132
|
+
|
133
|
+
</dl>
|
134
|
+
|
135
|
+
|
136
|
+
|
137
|
+
|
138
|
+
|
139
|
+
<h2>Instance Attribute Summary <small><a href="#" class="summary_toggle">collapse</a></small></h2>
|
140
|
+
<ul class="summary">
|
141
|
+
|
142
|
+
<li class="public ">
|
143
|
+
<span class="summary_signature">
|
144
|
+
|
145
|
+
<a href="#calendar-instance_method" title="#calendar (instance method)">#<strong>calendar</strong> ⇒ Object </a>
|
146
|
+
|
147
|
+
|
148
|
+
|
149
|
+
</span>
|
150
|
+
|
151
|
+
|
152
|
+
|
153
|
+
|
154
|
+
<span class="note title readonly">readonly</span>
|
155
|
+
|
156
|
+
|
157
|
+
|
158
|
+
|
159
|
+
|
160
|
+
|
161
|
+
|
162
|
+
|
163
|
+
|
164
|
+
<span class="summary_desc"><div class='inline'>
|
165
|
+
<p>Returns the value of attribute calendar.</p>
|
166
|
+
</div></span>
|
167
|
+
|
168
|
+
</li>
|
169
|
+
|
170
|
+
|
171
|
+
</ul>
|
172
|
+
|
173
|
+
|
174
|
+
|
175
|
+
|
176
|
+
|
177
|
+
<h2>
|
178
|
+
Instance Method Summary
|
179
|
+
<small><a href="#" class="summary_toggle">collapse</a></small>
|
180
|
+
</h2>
|
181
|
+
|
182
|
+
<ul class="summary">
|
183
|
+
|
184
|
+
<li class="public ">
|
185
|
+
<span class="summary_signature">
|
186
|
+
|
187
|
+
<a href="#initialize-instance_method" title="#initialize (instance method)">#<strong>initialize</strong>(calendar) ⇒ Parser </a>
|
188
|
+
|
189
|
+
|
190
|
+
|
191
|
+
</span>
|
192
|
+
|
193
|
+
|
194
|
+
<span class="note title constructor">constructor</span>
|
195
|
+
|
196
|
+
|
197
|
+
|
198
|
+
|
199
|
+
|
200
|
+
|
201
|
+
|
202
|
+
|
203
|
+
<span class="summary_desc"><div class='inline'>
|
204
|
+
<p>A new instance of Parser.</p>
|
205
|
+
</div></span>
|
206
|
+
|
207
|
+
</li>
|
208
|
+
|
209
|
+
|
210
|
+
<li class="public ">
|
211
|
+
<span class="summary_signature">
|
212
|
+
|
213
|
+
<a href="#parse-instance_method" title="#parse (instance method)">#<strong>parse</strong>(identifier = nil) ⇒ Object </a>
|
214
|
+
|
215
|
+
|
216
|
+
|
217
|
+
</span>
|
218
|
+
|
219
|
+
|
220
|
+
|
221
|
+
|
222
|
+
|
223
|
+
|
224
|
+
|
225
|
+
|
226
|
+
|
227
|
+
<span class="summary_desc"><div class='inline'></div></span>
|
228
|
+
|
229
|
+
</li>
|
230
|
+
|
231
|
+
|
232
|
+
</ul>
|
233
|
+
|
234
|
+
|
235
|
+
<div id="constructor_details" class="method_details_list">
|
236
|
+
<h2>Constructor Details</h2>
|
237
|
+
|
238
|
+
<div class="method_details first">
|
239
|
+
<h3 class="signature first" id="initialize-instance_method">
|
240
|
+
|
241
|
+
#<strong>initialize</strong>(calendar) ⇒ <tt><span class='object_link'><a href="" title="TimeBoss::Calendar::Parser (class)">Parser</a></span></tt>
|
242
|
+
|
243
|
+
|
244
|
+
|
245
|
+
|
246
|
+
|
247
|
+
</h3><div class="docstring">
|
248
|
+
<div class="discussion">
|
249
|
+
|
250
|
+
<p>Returns a new instance of Parser.</p>
|
251
|
+
|
252
|
+
|
253
|
+
</div>
|
254
|
+
</div>
|
255
|
+
<div class="tags">
|
256
|
+
|
257
|
+
|
258
|
+
</div><table class="source_code">
|
259
|
+
<tr>
|
260
|
+
<td>
|
261
|
+
<pre class="lines">
|
262
|
+
|
263
|
+
|
264
|
+
10
|
265
|
+
11
|
266
|
+
12</pre>
|
267
|
+
</td>
|
268
|
+
<td>
|
269
|
+
<pre class="code"><span class="info file"># File 'lib/timeboss/calendar/parser.rb', line 10</span>
|
270
|
+
|
271
|
+
<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='rparen'>)</span>
|
272
|
+
<span class='ivar'>@calendar</span> <span class='op'>=</span> <span class='id identifier rubyid_calendar'>calendar</span>
|
273
|
+
<span class='kw'>end</span></pre>
|
274
|
+
</td>
|
275
|
+
</tr>
|
276
|
+
</table>
|
277
|
+
</div>
|
278
|
+
|
279
|
+
</div>
|
280
|
+
|
281
|
+
<div id="instance_attr_details" class="attr_details">
|
282
|
+
<h2>Instance Attribute Details</h2>
|
283
|
+
|
284
|
+
|
285
|
+
<span id=""></span>
|
286
|
+
<div class="method_details first">
|
287
|
+
<h3 class="signature first" id="calendar-instance_method">
|
288
|
+
|
289
|
+
#<strong>calendar</strong> ⇒ <tt>Object</tt> <span class="extras">(readonly)</span>
|
290
|
+
|
291
|
+
|
292
|
+
|
293
|
+
|
294
|
+
|
295
|
+
</h3><div class="docstring">
|
296
|
+
<div class="discussion">
|
297
|
+
|
298
|
+
<p>Returns the value of attribute calendar.</p>
|
299
|
+
|
300
|
+
|
301
|
+
</div>
|
302
|
+
</div>
|
303
|
+
<div class="tags">
|
304
|
+
|
305
|
+
|
306
|
+
</div><table class="source_code">
|
307
|
+
<tr>
|
308
|
+
<td>
|
309
|
+
<pre class="lines">
|
310
|
+
|
311
|
+
|
312
|
+
8
|
313
|
+
9
|
314
|
+
10</pre>
|
315
|
+
</td>
|
316
|
+
<td>
|
317
|
+
<pre class="code"><span class="info file"># File 'lib/timeboss/calendar/parser.rb', line 8</span>
|
318
|
+
|
319
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_calendar'>calendar</span>
|
320
|
+
<span class='ivar'>@calendar</span>
|
321
|
+
<span class='kw'>end</span></pre>
|
322
|
+
</td>
|
323
|
+
</tr>
|
324
|
+
</table>
|
325
|
+
</div>
|
326
|
+
|
327
|
+
</div>
|
328
|
+
|
329
|
+
|
330
|
+
<div id="instance_method_details" class="method_details_list">
|
331
|
+
<h2>Instance Method Details</h2>
|
332
|
+
|
333
|
+
|
334
|
+
<div class="method_details first">
|
335
|
+
<h3 class="signature first" id="parse-instance_method">
|
336
|
+
|
337
|
+
#<strong>parse</strong>(identifier = nil) ⇒ <tt>Object</tt>
|
338
|
+
|
339
|
+
|
340
|
+
|
341
|
+
|
342
|
+
|
343
|
+
</h3><table class="source_code">
|
344
|
+
<tr>
|
345
|
+
<td>
|
346
|
+
<pre class="lines">
|
347
|
+
|
348
|
+
|
349
|
+
14
|
350
|
+
15
|
351
|
+
16
|
352
|
+
17
|
353
|
+
18
|
354
|
+
19
|
355
|
+
20
|
356
|
+
21</pre>
|
357
|
+
</td>
|
358
|
+
<td>
|
359
|
+
<pre class="code"><span class="info file"># File 'lib/timeboss/calendar/parser.rb', line 14</span>
|
360
|
+
|
361
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_parse'>parse</span><span class='lparen'>(</span><span class='id identifier rubyid_identifier'>identifier</span> <span class='op'>=</span> <span class='kw'>nil</span><span class='rparen'>)</span>
|
362
|
+
<span class='kw'>return</span> <span class='id identifier rubyid_parse_identifier'>parse_identifier</span><span class='lparen'>(</span><span class='id identifier rubyid_identifier'>identifier</span><span class='period'>.</span><span class='id identifier rubyid_presence'>presence</span><span class='rparen'>)</span> <span class='kw'>unless</span> <span class='id identifier rubyid_identifier'>identifier</span><span class='op'>&.</span><span class='id identifier rubyid_include?'>include?</span><span class='lparen'>(</span><span class='const'><span class='object_link'><a href="#RANGE_DELIMITER-constant" title="TimeBoss::Calendar::Parser::RANGE_DELIMITER (constant)">RANGE_DELIMITER</a></span></span><span class='rparen'>)</span>
|
363
|
+
<span class='id identifier rubyid_bases'>bases</span> <span class='op'>=</span> <span class='id identifier rubyid_identifier'>identifier</span><span class='period'>.</span><span class='id identifier rubyid_split'>split</span><span class='lparen'>(</span><span class='const'><span class='object_link'><a href="#RANGE_DELIMITER-constant" title="TimeBoss::Calendar::Parser::RANGE_DELIMITER (constant)">RANGE_DELIMITER</a></span></span><span class='rparen'>)</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='id identifier rubyid_parse_identifier'>parse_identifier</span><span class='lparen'>(</span><span class='id identifier rubyid_i'>i</span><span class='period'>.</span><span class='id identifier rubyid_strip'>strip</span><span class='rparen'>)</span> <span class='rbrace'>}</span> <span class='kw'>unless</span> <span class='id identifier rubyid_identifier'>identifier</span><span class='period'>.</span><span class='id identifier rubyid_nil?'>nil?</span>
|
364
|
+
<span class='id identifier rubyid_bases'>bases</span> <span class='op'>||=</span> <span class='lbracket'>[</span><span class='id identifier rubyid_parse_identifier'>parse_identifier</span><span class='lparen'>(</span><span class='kw'>nil</span><span class='rparen'>)</span><span class='rbracket'>]</span>
|
365
|
+
<span class='const'><span class='object_link'><a href="Period.html" title="TimeBoss::Calendar::Period (class)">Period</a></span></span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='id identifier rubyid_calendar'>calendar</span><span class='comma'>,</span> <span class='op'>*</span><span class='id identifier rubyid_bases'>bases</span><span class='rparen'>)</span>
|
366
|
+
<span class='kw'>rescue</span> <span class='const'>ArgumentError</span>
|
367
|
+
<span class='id identifier rubyid_raise'>raise</span> <span class='const'><span class='object_link'><a href="#InvalidPeriodIdentifierError-constant" title="TimeBoss::Calendar::Parser::InvalidPeriodIdentifierError (constant)">InvalidPeriodIdentifierError</a></span></span>
|
368
|
+
<span class='kw'>end</span></pre>
|
369
|
+
</td>
|
370
|
+
</tr>
|
371
|
+
</table>
|
372
|
+
</div>
|
373
|
+
|
374
|
+
</div>
|
375
|
+
|
376
|
+
</div>
|
377
|
+
|
378
|
+
<div id="footer">
|
379
|
+
Generated on Sun Jul 19 10:12:11 2020 by
|
380
|
+
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
381
|
+
0.9.25 (ruby-2.4.1).
|
382
|
+
</div>
|
383
|
+
|
384
|
+
</div>
|
385
|
+
</body>
|
386
|
+
</html>
|
@@ -0,0 +1,841 @@
|
|
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::Period
|
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::Period";
|
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 (P)</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 (class)">Calendar</a></span></span>
|
41
|
+
»
|
42
|
+
<span class="title">Period</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::Period
|
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::Period</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/period.rb</dd>
|
98
|
+
</dl>
|
99
|
+
|
100
|
+
</div>
|
101
|
+
|
102
|
+
<h2>Overview</h2><div class="docstring">
|
103
|
+
<div class="discussion">
|
104
|
+
|
105
|
+
<p>A calendar period represents a range of units.</p>
|
106
|
+
|
107
|
+
|
108
|
+
</div>
|
109
|
+
</div>
|
110
|
+
<div class="tags">
|
111
|
+
|
112
|
+
|
113
|
+
</div>
|
114
|
+
|
115
|
+
|
116
|
+
|
117
|
+
<h2>Instance Attribute Summary <small><a href="#" class="summary_toggle">collapse</a></small></h2>
|
118
|
+
<ul class="summary">
|
119
|
+
|
120
|
+
<li class="public ">
|
121
|
+
<span class="summary_signature">
|
122
|
+
|
123
|
+
<a href="#begin-instance_method" title="#begin (instance method)">#<strong>begin</strong> ⇒ Object </a>
|
124
|
+
|
125
|
+
|
126
|
+
|
127
|
+
</span>
|
128
|
+
|
129
|
+
|
130
|
+
|
131
|
+
|
132
|
+
<span class="note title readonly">readonly</span>
|
133
|
+
|
134
|
+
|
135
|
+
|
136
|
+
|
137
|
+
|
138
|
+
|
139
|
+
|
140
|
+
|
141
|
+
|
142
|
+
<span class="summary_desc"><div class='inline'>
|
143
|
+
<p>Returns the value of attribute begin.</p>
|
144
|
+
</div></span>
|
145
|
+
|
146
|
+
</li>
|
147
|
+
|
148
|
+
|
149
|
+
<li class="public ">
|
150
|
+
<span class="summary_signature">
|
151
|
+
|
152
|
+
<a href="#end-instance_method" title="#end (instance method)">#<strong>end</strong> ⇒ Object </a>
|
153
|
+
|
154
|
+
|
155
|
+
|
156
|
+
</span>
|
157
|
+
|
158
|
+
|
159
|
+
|
160
|
+
|
161
|
+
<span class="note title readonly">readonly</span>
|
162
|
+
|
163
|
+
|
164
|
+
|
165
|
+
|
166
|
+
|
167
|
+
|
168
|
+
|
169
|
+
|
170
|
+
|
171
|
+
<span class="summary_desc"><div class='inline'>
|
172
|
+
<p>Returns the value of attribute end.</p>
|
173
|
+
</div></span>
|
174
|
+
|
175
|
+
</li>
|
176
|
+
|
177
|
+
|
178
|
+
</ul>
|
179
|
+
|
180
|
+
|
181
|
+
|
182
|
+
|
183
|
+
|
184
|
+
<h2>
|
185
|
+
Instance Method Summary
|
186
|
+
<small><a href="#" class="summary_toggle">collapse</a></small>
|
187
|
+
</h2>
|
188
|
+
|
189
|
+
<ul class="summary">
|
190
|
+
|
191
|
+
<li class="public ">
|
192
|
+
<span class="summary_signature">
|
193
|
+
|
194
|
+
<a href="#current%3F-instance_method" title="#current? (instance method)">#<strong>current?</strong> ⇒ Boolean </a>
|
195
|
+
|
196
|
+
|
197
|
+
|
198
|
+
</span>
|
199
|
+
|
200
|
+
|
201
|
+
|
202
|
+
|
203
|
+
|
204
|
+
|
205
|
+
|
206
|
+
|
207
|
+
|
208
|
+
<span class="summary_desc"><div class='inline'>
|
209
|
+
<p>Does this period cover the current date?.</p>
|
210
|
+
</div></span>
|
211
|
+
|
212
|
+
</li>
|
213
|
+
|
214
|
+
|
215
|
+
<li class="public ">
|
216
|
+
<span class="summary_signature">
|
217
|
+
|
218
|
+
<a href="#end_date-instance_method" title="#end_date (instance method)">#<strong>end_date</strong> ⇒ Date </a>
|
219
|
+
|
220
|
+
|
221
|
+
|
222
|
+
</span>
|
223
|
+
|
224
|
+
|
225
|
+
|
226
|
+
|
227
|
+
|
228
|
+
|
229
|
+
|
230
|
+
|
231
|
+
|
232
|
+
<span class="summary_desc"><div class='inline'>
|
233
|
+
<p>Get the end date of this period.</p>
|
234
|
+
</div></span>
|
235
|
+
|
236
|
+
</li>
|
237
|
+
|
238
|
+
|
239
|
+
<li class="public ">
|
240
|
+
<span class="summary_signature">
|
241
|
+
|
242
|
+
<a href="#name-instance_method" title="#name (instance method)">#<strong>name</strong> ⇒ String </a>
|
243
|
+
|
244
|
+
|
245
|
+
|
246
|
+
</span>
|
247
|
+
|
248
|
+
|
249
|
+
|
250
|
+
|
251
|
+
|
252
|
+
|
253
|
+
|
254
|
+
|
255
|
+
|
256
|
+
<span class="summary_desc"><div class='inline'>
|
257
|
+
<p>Get a simple representation of this period.</p>
|
258
|
+
</div></span>
|
259
|
+
|
260
|
+
</li>
|
261
|
+
|
262
|
+
|
263
|
+
<li class="public ">
|
264
|
+
<span class="summary_signature">
|
265
|
+
|
266
|
+
<a href="#start_date-instance_method" title="#start_date (instance method)">#<strong>start_date</strong> ⇒ Date </a>
|
267
|
+
|
268
|
+
|
269
|
+
|
270
|
+
</span>
|
271
|
+
|
272
|
+
|
273
|
+
|
274
|
+
|
275
|
+
|
276
|
+
|
277
|
+
|
278
|
+
|
279
|
+
|
280
|
+
<span class="summary_desc"><div class='inline'>
|
281
|
+
<p>Get the start date of this period.</p>
|
282
|
+
</div></span>
|
283
|
+
|
284
|
+
</li>
|
285
|
+
|
286
|
+
|
287
|
+
<li class="public ">
|
288
|
+
<span class="summary_signature">
|
289
|
+
|
290
|
+
<a href="#title-instance_method" title="#title (instance method)">#<strong>title</strong> ⇒ String </a>
|
291
|
+
|
292
|
+
|
293
|
+
|
294
|
+
</span>
|
295
|
+
|
296
|
+
|
297
|
+
|
298
|
+
|
299
|
+
|
300
|
+
|
301
|
+
|
302
|
+
|
303
|
+
|
304
|
+
<span class="summary_desc"><div class='inline'>
|
305
|
+
<p>Get a “pretty” representation of this period.</p>
|
306
|
+
</div></span>
|
307
|
+
|
308
|
+
</li>
|
309
|
+
|
310
|
+
|
311
|
+
<li class="public ">
|
312
|
+
<span class="summary_signature">
|
313
|
+
|
314
|
+
<a href="#to_range-instance_method" title="#to_range (instance method)">#<strong>to_range</strong> ⇒ Range<Date, Date> </a>
|
315
|
+
|
316
|
+
|
317
|
+
|
318
|
+
</span>
|
319
|
+
|
320
|
+
|
321
|
+
|
322
|
+
|
323
|
+
|
324
|
+
|
325
|
+
|
326
|
+
|
327
|
+
|
328
|
+
<span class="summary_desc"><div class='inline'>
|
329
|
+
<p>Express this period as a date range.</p>
|
330
|
+
</div></span>
|
331
|
+
|
332
|
+
</li>
|
333
|
+
|
334
|
+
|
335
|
+
<li class="public ">
|
336
|
+
<span class="summary_signature">
|
337
|
+
|
338
|
+
<a href="#to_s-instance_method" title="#to_s (instance method)">#<strong>to_s</strong> ⇒ String </a>
|
339
|
+
|
340
|
+
|
341
|
+
|
342
|
+
</span>
|
343
|
+
|
344
|
+
|
345
|
+
|
346
|
+
|
347
|
+
|
348
|
+
|
349
|
+
|
350
|
+
|
351
|
+
|
352
|
+
<span class="summary_desc"><div class='inline'>
|
353
|
+
<p>Get a stringified representation of this period.</p>
|
354
|
+
</div></span>
|
355
|
+
|
356
|
+
</li>
|
357
|
+
|
358
|
+
|
359
|
+
</ul>
|
360
|
+
|
361
|
+
|
362
|
+
|
363
|
+
<div id="instance_attr_details" class="attr_details">
|
364
|
+
<h2>Instance Attribute Details</h2>
|
365
|
+
|
366
|
+
|
367
|
+
<span id=""></span>
|
368
|
+
<div class="method_details first">
|
369
|
+
<h3 class="signature first" id="begin-instance_method">
|
370
|
+
|
371
|
+
#<strong>begin</strong> ⇒ <tt>Object</tt> <span class="extras">(readonly)</span>
|
372
|
+
|
373
|
+
|
374
|
+
|
375
|
+
|
376
|
+
|
377
|
+
</h3><div class="docstring">
|
378
|
+
<div class="discussion">
|
379
|
+
|
380
|
+
<p>Returns the value of attribute begin.</p>
|
381
|
+
|
382
|
+
|
383
|
+
</div>
|
384
|
+
</div>
|
385
|
+
<div class="tags">
|
386
|
+
|
387
|
+
|
388
|
+
</div><table class="source_code">
|
389
|
+
<tr>
|
390
|
+
<td>
|
391
|
+
<pre class="lines">
|
392
|
+
|
393
|
+
|
394
|
+
6
|
395
|
+
7
|
396
|
+
8</pre>
|
397
|
+
</td>
|
398
|
+
<td>
|
399
|
+
<pre class="code"><span class="info file"># File 'lib/timeboss/calendar/period.rb', line 6</span>
|
400
|
+
|
401
|
+
<span class='kw'>def</span> <span class='kw'>begin</span>
|
402
|
+
<span class='ivar'>@begin</span>
|
403
|
+
<span class='kw'>end</span></pre>
|
404
|
+
</td>
|
405
|
+
</tr>
|
406
|
+
</table>
|
407
|
+
</div>
|
408
|
+
|
409
|
+
|
410
|
+
<span id=""></span>
|
411
|
+
<div class="method_details ">
|
412
|
+
<h3 class="signature " id="end-instance_method">
|
413
|
+
|
414
|
+
#<strong>end</strong> ⇒ <tt>Object</tt> <span class="extras">(readonly)</span>
|
415
|
+
|
416
|
+
|
417
|
+
|
418
|
+
|
419
|
+
|
420
|
+
</h3><div class="docstring">
|
421
|
+
<div class="discussion">
|
422
|
+
|
423
|
+
<p>Returns the value of attribute end.</p>
|
424
|
+
|
425
|
+
|
426
|
+
</div>
|
427
|
+
</div>
|
428
|
+
<div class="tags">
|
429
|
+
|
430
|
+
|
431
|
+
</div><table class="source_code">
|
432
|
+
<tr>
|
433
|
+
<td>
|
434
|
+
<pre class="lines">
|
435
|
+
|
436
|
+
|
437
|
+
6
|
438
|
+
7
|
439
|
+
8</pre>
|
440
|
+
</td>
|
441
|
+
<td>
|
442
|
+
<pre class="code"><span class="info file"># File 'lib/timeboss/calendar/period.rb', line 6</span>
|
443
|
+
|
444
|
+
<span class='kw'>def</span> <span class='kw'>end</span>
|
445
|
+
<span class='ivar'>@end</span>
|
446
|
+
<span class='kw'>end</span></pre>
|
447
|
+
</td>
|
448
|
+
</tr>
|
449
|
+
</table>
|
450
|
+
</div>
|
451
|
+
|
452
|
+
</div>
|
453
|
+
|
454
|
+
|
455
|
+
<div id="instance_method_details" class="method_details_list">
|
456
|
+
<h2>Instance Method Details</h2>
|
457
|
+
|
458
|
+
|
459
|
+
<div class="method_details first">
|
460
|
+
<h3 class="signature first" id="current?-instance_method">
|
461
|
+
|
462
|
+
#<strong>current?</strong> ⇒ <tt>Boolean</tt>
|
463
|
+
|
464
|
+
|
465
|
+
|
466
|
+
|
467
|
+
|
468
|
+
</h3><div class="docstring">
|
469
|
+
<div class="discussion">
|
470
|
+
|
471
|
+
<p>Does this period cover the current date?</p>
|
472
|
+
|
473
|
+
|
474
|
+
</div>
|
475
|
+
</div>
|
476
|
+
<div class="tags">
|
477
|
+
|
478
|
+
<p class="tag_title">Returns:</p>
|
479
|
+
<ul class="return">
|
480
|
+
|
481
|
+
<li>
|
482
|
+
|
483
|
+
|
484
|
+
<span class='type'>(<tt>Boolean</tt>)</span>
|
485
|
+
|
486
|
+
|
487
|
+
|
488
|
+
</li>
|
489
|
+
|
490
|
+
</ul>
|
491
|
+
|
492
|
+
</div><table class="source_code">
|
493
|
+
<tr>
|
494
|
+
<td>
|
495
|
+
<pre class="lines">
|
496
|
+
|
497
|
+
|
498
|
+
53
|
499
|
+
54
|
500
|
+
55</pre>
|
501
|
+
</td>
|
502
|
+
<td>
|
503
|
+
<pre class="code"><span class="info file"># File 'lib/timeboss/calendar/period.rb', line 53</span>
|
504
|
+
|
505
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_current?'>current?</span>
|
506
|
+
<span class='id identifier rubyid_to_range'>to_range</span><span class='period'>.</span><span class='id identifier rubyid_include?'>include?</span><span class='lparen'>(</span><span class='const'>Date</span><span class='period'>.</span><span class='id identifier rubyid_today'>today</span><span class='rparen'>)</span>
|
507
|
+
<span class='kw'>end</span></pre>
|
508
|
+
</td>
|
509
|
+
</tr>
|
510
|
+
</table>
|
511
|
+
</div>
|
512
|
+
|
513
|
+
<div class="method_details ">
|
514
|
+
<h3 class="signature " id="end_date-instance_method">
|
515
|
+
|
516
|
+
#<strong>end_date</strong> ⇒ <tt>Date</tt>
|
517
|
+
|
518
|
+
|
519
|
+
|
520
|
+
|
521
|
+
|
522
|
+
</h3><div class="docstring">
|
523
|
+
<div class="discussion">
|
524
|
+
|
525
|
+
<p>Get the end date of this period.</p>
|
526
|
+
|
527
|
+
|
528
|
+
</div>
|
529
|
+
</div>
|
530
|
+
<div class="tags">
|
531
|
+
|
532
|
+
<p class="tag_title">Returns:</p>
|
533
|
+
<ul class="return">
|
534
|
+
|
535
|
+
<li>
|
536
|
+
|
537
|
+
|
538
|
+
<span class='type'>(<tt>Date</tt>)</span>
|
539
|
+
|
540
|
+
|
541
|
+
|
542
|
+
</li>
|
543
|
+
|
544
|
+
</ul>
|
545
|
+
|
546
|
+
</div><table class="source_code">
|
547
|
+
<tr>
|
548
|
+
<td>
|
549
|
+
<pre class="lines">
|
550
|
+
|
551
|
+
|
552
|
+
16</pre>
|
553
|
+
</td>
|
554
|
+
<td>
|
555
|
+
<pre class="code"><span class="info file"># File 'lib/timeboss/calendar/period.rb', line 16</span>
|
556
|
+
|
557
|
+
<span class='id identifier rubyid_delegate'>delegate</span> <span class='symbol'>:end_date</span><span class='comma'>,</span> <span class='label'>to:</span> <span class='symbol'>:end</span></pre>
|
558
|
+
</td>
|
559
|
+
</tr>
|
560
|
+
</table>
|
561
|
+
</div>
|
562
|
+
|
563
|
+
<div class="method_details ">
|
564
|
+
<h3 class="signature " id="name-instance_method">
|
565
|
+
|
566
|
+
#<strong>name</strong> ⇒ <tt>String</tt>
|
567
|
+
|
568
|
+
|
569
|
+
|
570
|
+
|
571
|
+
|
572
|
+
</h3><div class="docstring">
|
573
|
+
<div class="discussion">
|
574
|
+
|
575
|
+
<p>Get a simple representation of this period.</p>
|
576
|
+
|
577
|
+
|
578
|
+
</div>
|
579
|
+
</div>
|
580
|
+
<div class="tags">
|
581
|
+
|
582
|
+
<p class="tag_title">Returns:</p>
|
583
|
+
<ul class="return">
|
584
|
+
|
585
|
+
<li>
|
586
|
+
|
587
|
+
|
588
|
+
<span class='type'>(<tt>String</tt>)</span>
|
589
|
+
|
590
|
+
|
591
|
+
|
592
|
+
</li>
|
593
|
+
|
594
|
+
</ul>
|
595
|
+
|
596
|
+
</div><table class="source_code">
|
597
|
+
<tr>
|
598
|
+
<td>
|
599
|
+
<pre class="lines">
|
600
|
+
|
601
|
+
|
602
|
+
</pre>
|
603
|
+
</td>
|
604
|
+
<td>
|
605
|
+
<pre class="code"><span class="info file"># File 'lib/timeboss/calendar/period.rb', line 18</span>
|
606
|
+
|
607
|
+
</pre>
|
608
|
+
</td>
|
609
|
+
</tr>
|
610
|
+
</table>
|
611
|
+
</div>
|
612
|
+
|
613
|
+
<div class="method_details ">
|
614
|
+
<h3 class="signature " id="start_date-instance_method">
|
615
|
+
|
616
|
+
#<strong>start_date</strong> ⇒ <tt>Date</tt>
|
617
|
+
|
618
|
+
|
619
|
+
|
620
|
+
|
621
|
+
|
622
|
+
</h3><div class="docstring">
|
623
|
+
<div class="discussion">
|
624
|
+
|
625
|
+
<p>Get the start date of this period.</p>
|
626
|
+
|
627
|
+
|
628
|
+
</div>
|
629
|
+
</div>
|
630
|
+
<div class="tags">
|
631
|
+
|
632
|
+
<p class="tag_title">Returns:</p>
|
633
|
+
<ul class="return">
|
634
|
+
|
635
|
+
<li>
|
636
|
+
|
637
|
+
|
638
|
+
<span class='type'>(<tt>Date</tt>)</span>
|
639
|
+
|
640
|
+
|
641
|
+
|
642
|
+
</li>
|
643
|
+
|
644
|
+
</ul>
|
645
|
+
|
646
|
+
</div><table class="source_code">
|
647
|
+
<tr>
|
648
|
+
<td>
|
649
|
+
<pre class="lines">
|
650
|
+
|
651
|
+
|
652
|
+
11</pre>
|
653
|
+
</td>
|
654
|
+
<td>
|
655
|
+
<pre class="code"><span class="info file"># File 'lib/timeboss/calendar/period.rb', line 11</span>
|
656
|
+
|
657
|
+
<span class='id identifier rubyid_delegate'>delegate</span> <span class='symbol'>:start_date</span><span class='comma'>,</span> <span class='label'>to:</span> <span class='symbol'>:begin</span></pre>
|
658
|
+
</td>
|
659
|
+
</tr>
|
660
|
+
</table>
|
661
|
+
</div>
|
662
|
+
|
663
|
+
<div class="method_details ">
|
664
|
+
<h3 class="signature " id="title-instance_method">
|
665
|
+
|
666
|
+
#<strong>title</strong> ⇒ <tt>String</tt>
|
667
|
+
|
668
|
+
|
669
|
+
|
670
|
+
|
671
|
+
|
672
|
+
</h3><div class="docstring">
|
673
|
+
<div class="discussion">
|
674
|
+
|
675
|
+
<p>Get a “pretty” representation of this period.</p>
|
676
|
+
|
677
|
+
|
678
|
+
</div>
|
679
|
+
</div>
|
680
|
+
<div class="tags">
|
681
|
+
|
682
|
+
<p class="tag_title">Returns:</p>
|
683
|
+
<ul class="return">
|
684
|
+
|
685
|
+
<li>
|
686
|
+
|
687
|
+
|
688
|
+
<span class='type'>(<tt>String</tt>)</span>
|
689
|
+
|
690
|
+
|
691
|
+
|
692
|
+
</li>
|
693
|
+
|
694
|
+
</ul>
|
695
|
+
|
696
|
+
</div><table class="source_code">
|
697
|
+
<tr>
|
698
|
+
<td>
|
699
|
+
<pre class="lines">
|
700
|
+
|
701
|
+
|
702
|
+
</pre>
|
703
|
+
</td>
|
704
|
+
<td>
|
705
|
+
<pre class="code"><span class="info file"># File 'lib/timeboss/calendar/period.rb', line 22</span>
|
706
|
+
|
707
|
+
</pre>
|
708
|
+
</td>
|
709
|
+
</tr>
|
710
|
+
</table>
|
711
|
+
</div>
|
712
|
+
|
713
|
+
<div class="method_details ">
|
714
|
+
<h3 class="signature " id="to_range-instance_method">
|
715
|
+
|
716
|
+
#<strong>to_range</strong> ⇒ <tt>Range<Date, Date></tt>
|
717
|
+
|
718
|
+
|
719
|
+
|
720
|
+
|
721
|
+
|
722
|
+
</h3><div class="docstring">
|
723
|
+
<div class="discussion">
|
724
|
+
|
725
|
+
<p>Express this period as a date range.</p>
|
726
|
+
|
727
|
+
|
728
|
+
</div>
|
729
|
+
</div>
|
730
|
+
<div class="tags">
|
731
|
+
|
732
|
+
<p class="tag_title">Returns:</p>
|
733
|
+
<ul class="return">
|
734
|
+
|
735
|
+
<li>
|
736
|
+
|
737
|
+
|
738
|
+
<span class='type'>(<tt>Range<Date, Date></tt>)</span>
|
739
|
+
|
740
|
+
|
741
|
+
|
742
|
+
</li>
|
743
|
+
|
744
|
+
</ul>
|
745
|
+
|
746
|
+
</div><table class="source_code">
|
747
|
+
<tr>
|
748
|
+
<td>
|
749
|
+
<pre class="lines">
|
750
|
+
|
751
|
+
|
752
|
+
59
|
753
|
+
60
|
754
|
+
61</pre>
|
755
|
+
</td>
|
756
|
+
<td>
|
757
|
+
<pre class="code"><span class="info file"># File 'lib/timeboss/calendar/period.rb', line 59</span>
|
758
|
+
|
759
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_to_range'>to_range</span>
|
760
|
+
<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>
|
761
|
+
<span class='kw'>end</span></pre>
|
762
|
+
</td>
|
763
|
+
</tr>
|
764
|
+
</table>
|
765
|
+
</div>
|
766
|
+
|
767
|
+
<div class="method_details ">
|
768
|
+
<h3 class="signature " id="to_s-instance_method">
|
769
|
+
|
770
|
+
#<strong>to_s</strong> ⇒ <tt>String</tt>
|
771
|
+
|
772
|
+
|
773
|
+
|
774
|
+
|
775
|
+
|
776
|
+
</h3><div class="docstring">
|
777
|
+
<div class="discussion">
|
778
|
+
|
779
|
+
<p>Get a stringified representation of this period.</p>
|
780
|
+
|
781
|
+
|
782
|
+
</div>
|
783
|
+
</div>
|
784
|
+
<div class="tags">
|
785
|
+
|
786
|
+
<p class="tag_title">Returns:</p>
|
787
|
+
<ul class="return">
|
788
|
+
|
789
|
+
<li>
|
790
|
+
|
791
|
+
|
792
|
+
<span class='type'>(<tt>String</tt>)</span>
|
793
|
+
|
794
|
+
|
795
|
+
|
796
|
+
</li>
|
797
|
+
|
798
|
+
</ul>
|
799
|
+
|
800
|
+
</div><table class="source_code">
|
801
|
+
<tr>
|
802
|
+
<td>
|
803
|
+
<pre class="lines">
|
804
|
+
|
805
|
+
|
806
|
+
30
|
807
|
+
31
|
808
|
+
32
|
809
|
+
33
|
810
|
+
34
|
811
|
+
35
|
812
|
+
36</pre>
|
813
|
+
</td>
|
814
|
+
<td>
|
815
|
+
<pre class="code"><span class="info file"># File 'lib/timeboss/calendar/period.rb', line 30</span>
|
816
|
+
|
817
|
+
<span class='qsymbols_beg'>%i[</span><span class='tstring_content'>name</span><span class='words_sep'> </span><span class='tstring_content'>title</span><span class='words_sep'> </span><span class='tstring_content'>to_s</span><span class='words_sep'>]</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_message'>message</span><span class='op'>|</span>
|
818
|
+
<span class='id identifier rubyid_define_method'>define_method</span><span class='lparen'>(</span><span class='id identifier rubyid_message'>message</span><span class='rparen'>)</span> <span class='kw'>do</span>
|
819
|
+
<span class='id identifier rubyid_text'>text</span> <span class='op'>=</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_begin'>begin</span><span class='period'>.</span><span class='id identifier rubyid_send'>send</span><span class='lparen'>(</span><span class='id identifier rubyid_message'>message</span><span class='rparen'>)</span>
|
820
|
+
<span class='id identifier rubyid_text'>text</span> <span class='op'>=</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_text'>text</span><span class='embexpr_end'>}</span><span class='tstring_content'> </span><span class='embexpr_beg'>#{</span><span class='const'><span class='object_link'><a href="Parser.html" title="TimeBoss::Calendar::Parser (class)">Parser</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="Parser.html#RANGE_DELIMITER-constant" title="TimeBoss::Calendar::Parser::RANGE_DELIMITER (constant)">RANGE_DELIMITER</a></span></span><span class='embexpr_end'>}</span><span class='tstring_content'> </span><span class='embexpr_beg'>#{</span><span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_end'>end</span><span class='period'>.</span><span class='id identifier rubyid_send'>send</span><span class='lparen'>(</span><span class='id identifier rubyid_message'>message</span><span class='rparen'>)</span><span class='embexpr_end'>}</span><span class='tstring_end'>"</span></span> <span class='kw'>unless</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_end'>end</span> <span class='op'>==</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_begin'>begin</span>
|
821
|
+
<span class='id identifier rubyid_text'>text</span>
|
822
|
+
<span class='kw'>end</span>
|
823
|
+
<span class='kw'>end</span></pre>
|
824
|
+
</td>
|
825
|
+
</tr>
|
826
|
+
</table>
|
827
|
+
</div>
|
828
|
+
|
829
|
+
</div>
|
830
|
+
|
831
|
+
</div>
|
832
|
+
|
833
|
+
<div id="footer">
|
834
|
+
Generated on Sun Jul 19 10:12:11 2020 by
|
835
|
+
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
836
|
+
0.9.25 (ruby-2.4.1).
|
837
|
+
</div>
|
838
|
+
|
839
|
+
</div>
|
840
|
+
</body>
|
841
|
+
</html>
|