timeboss 0.0.6 → 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (80) hide show
  1. checksums.yaml +4 -4
  2. data/.github/ISSUE_TEMPLATE/bug_report.md +23 -0
  3. data/.github/ISSUE_TEMPLATE/feature_request.md +20 -0
  4. data/.gitignore +2 -0
  5. data/.travis.yml +4 -1
  6. data/.yardopts +1 -0
  7. data/CODE_OF_CONDUCT.md +76 -0
  8. data/README.md +30 -18
  9. data/bin/tbsh +15 -0
  10. data/doc/TimeBoss.html +146 -0
  11. data/doc/TimeBoss/Calendar.html +137 -0
  12. data/doc/TimeBoss/Calendar/Day.html +594 -0
  13. data/doc/TimeBoss/Calendar/Half.html +396 -0
  14. data/doc/TimeBoss/Calendar/Month.html +396 -0
  15. data/doc/TimeBoss/Calendar/Parser.html +386 -0
  16. data/doc/TimeBoss/Calendar/Period.html +841 -0
  17. data/doc/TimeBoss/Calendar/Quarter.html +396 -0
  18. data/doc/TimeBoss/Calendar/Support.html +131 -0
  19. data/doc/TimeBoss/Calendar/Support/Formatter.html +459 -0
  20. data/doc/TimeBoss/Calendar/Support/MonthBased.html +591 -0
  21. data/doc/TimeBoss/Calendar/Support/MonthBasis.html +437 -0
  22. data/doc/TimeBoss/Calendar/Support/MonthlyUnit.html +591 -0
  23. data/doc/TimeBoss/Calendar/Support/Navigable.html +723 -0
  24. data/doc/TimeBoss/Calendar/Support/Shiftable.html +138 -0
  25. data/doc/TimeBoss/Calendar/Support/Unit.html +1299 -0
  26. data/doc/TimeBoss/Calendar/Waypoints.html +155 -0
  27. data/doc/TimeBoss/Calendar/Waypoints/Absolute.html +1378 -0
  28. data/doc/TimeBoss/Calendar/Waypoints/Relative.html +4308 -0
  29. data/doc/TimeBoss/Calendar/Week.html +671 -0
  30. data/doc/TimeBoss/Calendar/Year.html +319 -0
  31. data/doc/TimeBoss/Calendars.html +336 -0
  32. data/doc/TimeBoss/Calendars/Broadcast.html +221 -0
  33. data/doc/TimeBoss/Calendars/Broadcast/Basis.html +278 -0
  34. data/doc/TimeBoss/Calendars/Entry.html +399 -0
  35. data/doc/TimeBoss/Support.html +115 -0
  36. data/doc/TimeBoss/Support/Shellable.html +249 -0
  37. data/doc/_index.html +416 -0
  38. data/doc/class_list.html +51 -0
  39. data/doc/css/common.css +1 -0
  40. data/doc/css/full_list.css +58 -0
  41. data/doc/css/style.css +496 -0
  42. data/doc/file.README.html +299 -0
  43. data/doc/file_list.html +56 -0
  44. data/doc/frames.html +17 -0
  45. data/doc/index.html +299 -0
  46. data/doc/js/app.js +314 -0
  47. data/doc/js/full_list.js +216 -0
  48. data/doc/js/jquery.js +4 -0
  49. data/doc/method_list.html +1139 -0
  50. data/doc/top-level-namespace.html +110 -0
  51. data/lib/tasks/calendars.rake +5 -0
  52. data/lib/timeboss.rb +4 -0
  53. data/lib/timeboss/calendar.rb +22 -0
  54. data/lib/timeboss/calendar/day.rb +19 -6
  55. data/lib/timeboss/calendar/half.rb +7 -2
  56. data/lib/timeboss/calendar/month.rb +7 -2
  57. data/lib/timeboss/calendar/parser.rb +1 -0
  58. data/lib/timeboss/calendar/period.rb +26 -11
  59. data/lib/timeboss/calendar/quarter.rb +7 -2
  60. data/lib/timeboss/calendar/support.rb +8 -0
  61. data/lib/timeboss/calendar/support/formatter.rb +1 -0
  62. data/lib/timeboss/calendar/support/month_basis.rb +3 -0
  63. data/lib/timeboss/calendar/support/{month_based.rb → monthly_unit.rb} +24 -18
  64. data/lib/timeboss/calendar/support/navigable.rb +73 -0
  65. data/lib/timeboss/calendar/support/shiftable.rb +3 -2
  66. data/lib/timeboss/calendar/support/unit.rb +26 -0
  67. data/lib/timeboss/calendar/waypoints.rb +6 -80
  68. data/lib/timeboss/calendar/waypoints/absolute.rb +114 -0
  69. data/lib/timeboss/calendar/waypoints/relative.rb +268 -0
  70. data/lib/timeboss/calendar/week.rb +26 -18
  71. data/lib/timeboss/calendar/year.rb +6 -5
  72. data/lib/timeboss/calendars.rb +20 -3
  73. data/lib/timeboss/version.rb +1 -1
  74. data/spec/calendar/day_spec.rb +1 -1
  75. data/spec/calendar/support/{month_based_spec.rb → monthly_unit_spec.rb} +18 -8
  76. data/spec/calendar/week_spec.rb +5 -13
  77. data/spec/calendars/broadcast_spec.rb +27 -7
  78. data/spec/calendars_spec.rb +7 -1
  79. data/timeboss.gemspec +1 -0
  80. metadata +77 -8
@@ -0,0 +1,221 @@
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::Calendars::Broadcast
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::Calendars::Broadcast";
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 (B)</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="../Calendars.html" title="TimeBoss::Calendars (module)">Calendars</a></span></span>
41
+ &raquo;
42
+ <span class="title">Broadcast</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::Calendars::Broadcast
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="../Calendar.html" title="TimeBoss::Calendar (class)">TimeBoss::Calendar</a></span></span>
73
+
74
+ <ul class="fullTree">
75
+ <li>Object</li>
76
+
77
+ <li class="next"><span class='object_link'><a href="../Calendar.html" title="TimeBoss::Calendar (class)">TimeBoss::Calendar</a></span></li>
78
+
79
+ <li class="next">TimeBoss::Calendars::Broadcast</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/calendars/broadcast.rb</dd>
100
+ </dl>
101
+
102
+ </div>
103
+
104
+ <h2>Defined Under Namespace</h2>
105
+ <p class="children">
106
+
107
+
108
+
109
+
110
+ <strong class="classes">Classes:</strong> <span class='object_link'><a href="Broadcast/Basis.html" title="TimeBoss::Calendars::Broadcast::Basis (class)">Basis</a></span>
111
+
112
+
113
+ </p>
114
+
115
+
116
+
117
+
118
+
119
+
120
+
121
+
122
+ <h2>
123
+ Instance Method Summary
124
+ <small><a href="#" class="summary_toggle">collapse</a></small>
125
+ </h2>
126
+
127
+ <ul class="summary">
128
+
129
+ <li class="public ">
130
+ <span class="summary_signature">
131
+
132
+ <a href="#initialize-instance_method" title="#initialize (instance method)">#<strong>initialize</strong> &#x21d2; Broadcast </a>
133
+
134
+
135
+
136
+ </span>
137
+
138
+
139
+ <span class="note title constructor">constructor</span>
140
+
141
+
142
+
143
+
144
+
145
+
146
+
147
+
148
+ <span class="summary_desc"><div class='inline'>
149
+ <p>A new instance of Broadcast.</p>
150
+ </div></span>
151
+
152
+ </li>
153
+
154
+
155
+ </ul>
156
+
157
+
158
+
159
+
160
+
161
+
162
+
163
+
164
+ <div id="constructor_details" class="method_details_list">
165
+ <h2>Constructor Details</h2>
166
+
167
+ <div class="method_details first">
168
+ <h3 class="signature first" id="initialize-instance_method">
169
+
170
+ #<strong>initialize</strong> &#x21d2; <tt><span class='object_link'><a href="" title="TimeBoss::Calendars::Broadcast (class)">Broadcast</a></span></tt>
171
+
172
+
173
+
174
+
175
+
176
+ </h3><div class="docstring">
177
+ <div class="discussion">
178
+
179
+ <p>Returns a new instance of Broadcast.</p>
180
+
181
+
182
+ </div>
183
+ </div>
184
+ <div class="tags">
185
+
186
+
187
+ </div><table class="source_code">
188
+ <tr>
189
+ <td>
190
+ <pre class="lines">
191
+
192
+
193
+ 7
194
+ 8
195
+ 9</pre>
196
+ </td>
197
+ <td>
198
+ <pre class="code"><span class="info file"># File 'lib/timeboss/calendars/broadcast.rb', line 7</span>
199
+
200
+ <span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span>
201
+ <span class='kw'>super</span><span class='lparen'>(</span><span class='label'>basis:</span> <span class='const'><span class='object_link'><a href="Broadcast/Basis.html" title="TimeBoss::Calendars::Broadcast::Basis (class)">Basis</a></span></span><span class='rparen'>)</span>
202
+ <span class='kw'>end</span></pre>
203
+ </td>
204
+ </tr>
205
+ </table>
206
+ </div>
207
+
208
+ </div>
209
+
210
+
211
+ </div>
212
+
213
+ <div id="footer">
214
+ Generated on Sun Jul 19 10:12:11 2020 by
215
+ <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
216
+ 0.9.25 (ruby-2.4.1).
217
+ </div>
218
+
219
+ </div>
220
+ </body>
221
+ </html>
@@ -0,0 +1,278 @@
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::Calendars::Broadcast::Basis
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::Calendars::Broadcast::Basis";
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 (B)</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="../../Calendars.html" title="TimeBoss::Calendars (module)">Calendars</a></span></span> &raquo; <span class='title'><span class='object_link'><a href="../Broadcast.html" title="TimeBoss::Calendars::Broadcast (class)">Broadcast</a></span></span>
41
+ &raquo;
42
+ <span class="title">Basis</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::Calendars::Broadcast::Basis
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="../../Calendar/Support/MonthBasis.html" title="TimeBoss::Calendar::Support::MonthBasis (class)">TimeBoss::Calendar::Support::MonthBasis</a></span></span>
73
+
74
+ <ul class="fullTree">
75
+ <li>Object</li>
76
+
77
+ <li class="next"><span class='object_link'><a href="../../Calendar/Support/MonthBasis.html" title="TimeBoss::Calendar::Support::MonthBasis (class)">TimeBoss::Calendar::Support::MonthBasis</a></span></li>
78
+
79
+ <li class="next">TimeBoss::Calendars::Broadcast::Basis</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/calendars/broadcast.rb</dd>
100
+ </dl>
101
+
102
+ </div>
103
+
104
+
105
+
106
+
107
+
108
+
109
+
110
+ <h2>Instance Attribute Summary</h2>
111
+
112
+ <h3 class="inherited">Attributes inherited from <span class='object_link'><a href="../../Calendar/Support/MonthBasis.html" title="TimeBoss::Calendar::Support::MonthBasis (class)">TimeBoss::Calendar::Support::MonthBasis</a></span></h3>
113
+ <p class="inherited"><span class='object_link'><a href="../../Calendar/Support/MonthBasis.html#month-instance_method" title="TimeBoss::Calendar::Support::MonthBasis#month (method)">#month</a></span>, <span class='object_link'><a href="../../Calendar/Support/MonthBasis.html#year-instance_method" title="TimeBoss::Calendar::Support::MonthBasis#year (method)">#year</a></span></p>
114
+
115
+
116
+
117
+ <h2>
118
+ Instance Method Summary
119
+ <small><a href="#" class="summary_toggle">collapse</a></small>
120
+ </h2>
121
+
122
+ <ul class="summary">
123
+
124
+ <li class="public ">
125
+ <span class="summary_signature">
126
+
127
+ <a href="#end_date-instance_method" title="#end_date (instance method)">#<strong>end_date</strong> &#x21d2; Object </a>
128
+
129
+
130
+
131
+ </span>
132
+
133
+
134
+
135
+
136
+
137
+
138
+
139
+
140
+
141
+ <span class="summary_desc"><div class='inline'></div></span>
142
+
143
+ </li>
144
+
145
+
146
+ <li class="public ">
147
+ <span class="summary_signature">
148
+
149
+ <a href="#start_date-instance_method" title="#start_date (instance method)">#<strong>start_date</strong> &#x21d2; Object </a>
150
+
151
+
152
+
153
+ </span>
154
+
155
+
156
+
157
+
158
+
159
+
160
+
161
+
162
+
163
+ <span class="summary_desc"><div class='inline'></div></span>
164
+
165
+ </li>
166
+
167
+
168
+ </ul>
169
+
170
+
171
+
172
+
173
+
174
+
175
+
176
+
177
+
178
+
179
+
180
+ <h3 class="inherited">Methods inherited from <span class='object_link'><a href="../../Calendar/Support/MonthBasis.html" title="TimeBoss::Calendar::Support::MonthBasis (class)">TimeBoss::Calendar::Support::MonthBasis</a></span></h3>
181
+ <p class="inherited"><span class='object_link'><a href="../../Calendar/Support/MonthBasis.html#initialize-instance_method" title="TimeBoss::Calendar::Support::MonthBasis#initialize (method)">#initialize</a></span>, <span class='object_link'><a href="../../Calendar/Support/MonthBasis.html#to_range-instance_method" title="TimeBoss::Calendar::Support::MonthBasis#to_range (method)">#to_range</a></span></p>
182
+ <div id="constructor_details" class="method_details_list">
183
+ <h2>Constructor Details</h2>
184
+
185
+ <p class="notice">This class inherits a constructor from <span class='object_link'><a href="../../Calendar/Support/MonthBasis.html#initialize-instance_method" title="TimeBoss::Calendar::Support::MonthBasis#initialize (method)">TimeBoss::Calendar::Support::MonthBasis</a></span></p>
186
+
187
+ </div>
188
+
189
+
190
+ <div id="instance_method_details" class="method_details_list">
191
+ <h2>Instance Method Details</h2>
192
+
193
+
194
+ <div class="method_details first">
195
+ <h3 class="signature first" id="end_date-instance_method">
196
+
197
+ #<strong>end_date</strong> &#x21d2; <tt>Object</tt>
198
+
199
+
200
+
201
+
202
+
203
+ </h3><table class="source_code">
204
+ <tr>
205
+ <td>
206
+ <pre class="lines">
207
+
208
+
209
+ 21
210
+ 22
211
+ 23
212
+ 24
213
+ 25
214
+ 26</pre>
215
+ </td>
216
+ <td>
217
+ <pre class="code"><span class="info file"># File 'lib/timeboss/calendars/broadcast.rb', line 21</span>
218
+
219
+ <span class='kw'>def</span> <span class='id identifier rubyid_end_date'>end_date</span>
220
+ <span class='ivar'>@_end_date</span> <span class='op'>||=</span> <span class='kw'>begin</span>
221
+ <span class='id identifier rubyid_date'>date</span> <span class='op'>=</span> <span class='const'>Date</span><span class='period'>.</span><span class='id identifier rubyid_civil'>civil</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='comma'>,</span> <span class='op'>-</span><span class='int'>1</span><span class='rparen'>)</span>
222
+ <span class='id identifier rubyid_date'>date</span> <span class='op'>-</span> <span class='id identifier rubyid_date'>date</span><span class='period'>.</span><span class='id identifier rubyid_wday'>wday</span>
223
+ <span class='kw'>end</span>
224
+ <span class='kw'>end</span></pre>
225
+ </td>
226
+ </tr>
227
+ </table>
228
+ </div>
229
+
230
+ <div class="method_details ">
231
+ <h3 class="signature " id="start_date-instance_method">
232
+
233
+ #<strong>start_date</strong> &#x21d2; <tt>Object</tt>
234
+
235
+
236
+
237
+
238
+
239
+ </h3><table class="source_code">
240
+ <tr>
241
+ <td>
242
+ <pre class="lines">
243
+
244
+
245
+ 14
246
+ 15
247
+ 16
248
+ 17
249
+ 18
250
+ 19</pre>
251
+ </td>
252
+ <td>
253
+ <pre class="code"><span class="info file"># File 'lib/timeboss/calendars/broadcast.rb', line 14</span>
254
+
255
+ <span class='kw'>def</span> <span class='id identifier rubyid_start_date'>start_date</span>
256
+ <span class='ivar'>@_start_date</span> <span class='op'>||=</span> <span class='kw'>begin</span>
257
+ <span class='id identifier rubyid_date'>date</span> <span class='op'>=</span> <span class='const'>Date</span><span class='period'>.</span><span class='id identifier rubyid_civil'>civil</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='comma'>,</span> <span class='int'>1</span><span class='rparen'>)</span>
258
+ <span class='id identifier rubyid_date'>date</span> <span class='op'>-</span> <span class='lparen'>(</span><span class='id identifier rubyid_date'>date</span><span class='period'>.</span><span class='id identifier rubyid_wday'>wday</span> <span class='op'>+</span> <span class='int'>6</span><span class='rparen'>)</span> <span class='op'>%</span> <span class='int'>7</span>
259
+ <span class='kw'>end</span>
260
+ <span class='kw'>end</span></pre>
261
+ </td>
262
+ </tr>
263
+ </table>
264
+ </div>
265
+
266
+ </div>
267
+
268
+ </div>
269
+
270
+ <div id="footer">
271
+ Generated on Sun Jul 19 10:12:11 2020 by
272
+ <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
273
+ 0.9.25 (ruby-2.4.1).
274
+ </div>
275
+
276
+ </div>
277
+ </body>
278
+ </html>