lazier 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (61) hide show
  1. data/.gitignore +6 -0
  2. data/.travis.yml +8 -0
  3. data/.yardopts +1 -0
  4. data/Gemfile +9 -0
  5. data/Gemfile.lock +82 -0
  6. data/README.md +33 -0
  7. data/Rakefile +18 -0
  8. data/doc/Lazier.html +557 -0
  9. data/doc/Lazier/Boolean.html +297 -0
  10. data/doc/Lazier/DateTime.html +787 -0
  11. data/doc/Lazier/DateTime/ClassMethods.html +1592 -0
  12. data/doc/Lazier/Exceptions.html +125 -0
  13. data/doc/Lazier/Exceptions/Dump.html +133 -0
  14. data/doc/Lazier/Hash.html +393 -0
  15. data/doc/Lazier/Math.html +130 -0
  16. data/doc/Lazier/Math/ClassMethods.html +362 -0
  17. data/doc/Lazier/Object.html +1565 -0
  18. data/doc/Lazier/Pathname.html +225 -0
  19. data/doc/Lazier/Settings.html +1249 -0
  20. data/doc/Lazier/String.html +471 -0
  21. data/doc/Lazier/TimeZone.html +1675 -0
  22. data/doc/Lazier/TimeZone/ClassMethods.html +1055 -0
  23. data/doc/Lazier/Version.html +189 -0
  24. data/doc/_index.html +306 -0
  25. data/doc/class_list.html +53 -0
  26. data/doc/css/common.css +1 -0
  27. data/doc/css/full_list.css +57 -0
  28. data/doc/css/style.css +328 -0
  29. data/doc/file.README.html +107 -0
  30. data/doc/file_list.html +55 -0
  31. data/doc/frames.html +28 -0
  32. data/doc/index.html +107 -0
  33. data/doc/js/app.js +214 -0
  34. data/doc/js/full_list.js +173 -0
  35. data/doc/js/jquery.js +4 -0
  36. data/doc/method_list.html +652 -0
  37. data/doc/top-level-namespace.html +112 -0
  38. data/lazier.gemspec +36 -0
  39. data/lib/lazier.rb +127 -0
  40. data/lib/lazier/boolean.rb +26 -0
  41. data/lib/lazier/datetime.rb +548 -0
  42. data/lib/lazier/exceptions.rb +14 -0
  43. data/lib/lazier/hash.rb +40 -0
  44. data/lib/lazier/math.rb +47 -0
  45. data/lib/lazier/object.rb +163 -0
  46. data/lib/lazier/pathname.rb +26 -0
  47. data/lib/lazier/settings.rb +118 -0
  48. data/lib/lazier/string.rb +54 -0
  49. data/lib/lazier/version.rb +24 -0
  50. data/spec/coverage_helper.rb +19 -0
  51. data/spec/cowtech-extensions/boolean_spec.rb +30 -0
  52. data/spec/cowtech-extensions/datetime_spec.rb +352 -0
  53. data/spec/cowtech-extensions/hash_spec.rb +30 -0
  54. data/spec/cowtech-extensions/math_spec.rb +41 -0
  55. data/spec/cowtech-extensions/object_spec.rb +231 -0
  56. data/spec/cowtech-extensions/pathname_spec.rb +21 -0
  57. data/spec/cowtech-extensions/settings_spec.rb +118 -0
  58. data/spec/cowtech-extensions/string_spec.rb +45 -0
  59. data/spec/lazier_spec.rb +57 -0
  60. data/spec/spec_helper.rb +16 -0
  61. metadata +292 -0
@@ -0,0 +1,130 @@
1
+ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
2
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3
+ <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
4
+ <head>
5
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
6
+ <title>
7
+ Module: Lazier::Math
8
+
9
+ &mdash; Documentation by YARD 0.8.2.1
10
+
11
+ </title>
12
+
13
+ <link rel="stylesheet" href="../css/style.css" type="text/css" media="screen" charset="utf-8" />
14
+
15
+ <link rel="stylesheet" href="../css/common.css" type="text/css" media="screen" charset="utf-8" />
16
+
17
+ <script type="text/javascript" charset="utf-8">
18
+ hasFrames = window.top.frames.main ? true : false;
19
+ relpath = '../';
20
+ framesUrl = "../frames.html#!" + escape(window.location.href);
21
+ </script>
22
+
23
+
24
+ <script type="text/javascript" charset="utf-8" src="../js/jquery.js"></script>
25
+
26
+ <script type="text/javascript" charset="utf-8" src="../js/app.js"></script>
27
+
28
+
29
+ </head>
30
+ <body>
31
+ <div id="header">
32
+ <div id="menu">
33
+
34
+ <a href="../_index.html">Index (M)</a> &raquo;
35
+ <span class='title'><span class='object_link'><a href="../Lazier.html" title="Lazier (module)">Lazier</a></span></span>
36
+ &raquo;
37
+ <span class="title">Math</span>
38
+
39
+
40
+ <div class="noframes"><span class="title">(</span><a href="." target="_top">no frames</a><span class="title">)</span></div>
41
+ </div>
42
+
43
+ <div id="search">
44
+
45
+ <a class="full_list_link" id="class_list_link"
46
+ href="../class_list.html">
47
+ Class List
48
+ </a>
49
+
50
+ <a class="full_list_link" id="method_list_link"
51
+ href="../method_list.html">
52
+ Method List
53
+ </a>
54
+
55
+ <a class="full_list_link" id="file_list_link"
56
+ href="../file_list.html">
57
+ File List
58
+ </a>
59
+
60
+ </div>
61
+ <div class="clear"></div>
62
+ </div>
63
+
64
+ <iframe id="search_frame"></iframe>
65
+
66
+ <div id="content"><h1>Module: Lazier::Math
67
+
68
+
69
+
70
+ </h1>
71
+
72
+ <dl class="box">
73
+
74
+
75
+
76
+ <dt class="r1">Extended by:</dt>
77
+ <dd class="r1">ActiveSupport::Concern</dd>
78
+
79
+
80
+
81
+
82
+
83
+
84
+
85
+ <dt class="r2 last">Defined in:</dt>
86
+ <dd class="r2 last">lib/lazier/math.rb</dd>
87
+
88
+ </dl>
89
+ <div class="clear"></div>
90
+
91
+ <h2>Overview</h2><div class="docstring">
92
+ <div class="discussion">
93
+ <p>Utility methods for Math module.</p>
94
+
95
+
96
+ </div>
97
+ </div>
98
+ <div class="tags">
99
+
100
+
101
+ </div><h2>Defined Under Namespace</h2>
102
+ <p class="children">
103
+
104
+
105
+ <strong class="modules">Modules:</strong> <span class='object_link'><a href="Math/ClassMethods.html" title="Lazier::Math::ClassMethods (module)">ClassMethods</a></span>
106
+
107
+
108
+
109
+
110
+ </p>
111
+
112
+
113
+
114
+
115
+
116
+
117
+
118
+
119
+
120
+
121
+ </div>
122
+
123
+ <div id="footer">
124
+ Generated on Wed Aug 1 08:57:55 2012 by
125
+ <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
126
+ 0.8.2.1 (ruby-1.9.2).
127
+ </div>
128
+
129
+ </body>
130
+ </html>
@@ -0,0 +1,362 @@
1
+ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
2
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3
+ <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
4
+ <head>
5
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
6
+ <title>
7
+ Module: Lazier::Math::ClassMethods
8
+
9
+ &mdash; Documentation by YARD 0.8.2.1
10
+
11
+ </title>
12
+
13
+ <link rel="stylesheet" href="../../css/style.css" type="text/css" media="screen" charset="utf-8" />
14
+
15
+ <link rel="stylesheet" href="../../css/common.css" type="text/css" media="screen" charset="utf-8" />
16
+
17
+ <script type="text/javascript" charset="utf-8">
18
+ hasFrames = window.top.frames.main ? true : false;
19
+ relpath = '../../';
20
+ framesUrl = "../../frames.html#!" + escape(window.location.href);
21
+ </script>
22
+
23
+
24
+ <script type="text/javascript" charset="utf-8" src="../../js/jquery.js"></script>
25
+
26
+ <script type="text/javascript" charset="utf-8" src="../../js/app.js"></script>
27
+
28
+
29
+ </head>
30
+ <body>
31
+ <div id="header">
32
+ <div id="menu">
33
+
34
+ <a href="../../_index.html">Index (C)</a> &raquo;
35
+ <span class='title'><span class='object_link'><a href="../../Lazier.html" title="Lazier (module)">Lazier</a></span></span> &raquo; <span class='title'><span class='object_link'><a href="../Math.html" title="Lazier::Math (module)">Math</a></span></span>
36
+ &raquo;
37
+ <span class="title">ClassMethods</span>
38
+
39
+
40
+ <div class="noframes"><span class="title">(</span><a href="." target="_top">no frames</a><span class="title">)</span></div>
41
+ </div>
42
+
43
+ <div id="search">
44
+
45
+ <a class="full_list_link" id="class_list_link"
46
+ href="../../class_list.html">
47
+ Class List
48
+ </a>
49
+
50
+ <a class="full_list_link" id="method_list_link"
51
+ href="../../method_list.html">
52
+ Method List
53
+ </a>
54
+
55
+ <a class="full_list_link" id="file_list_link"
56
+ href="../../file_list.html">
57
+ File List
58
+ </a>
59
+
60
+ </div>
61
+ <div class="clear"></div>
62
+ </div>
63
+
64
+ <iframe id="search_frame"></iframe>
65
+
66
+ <div id="content"><h1>Module: Lazier::Math::ClassMethods
67
+
68
+
69
+
70
+ </h1>
71
+
72
+ <dl class="box">
73
+
74
+
75
+
76
+
77
+
78
+
79
+
80
+
81
+ <dt class="r1 last">Defined in:</dt>
82
+ <dd class="r1 last">lib/lazier/math.rb</dd>
83
+
84
+ </dl>
85
+ <div class="clear"></div>
86
+
87
+ <h2>Overview</h2><div class="docstring">
88
+ <div class="discussion">
89
+ <p>General methods.</p>
90
+
91
+
92
+ </div>
93
+ </div>
94
+ <div class="tags">
95
+
96
+
97
+ </div>
98
+
99
+
100
+
101
+
102
+
103
+
104
+
105
+ <h2>
106
+ Instance Method Summary
107
+ <small>(<a href="#" class="summary_toggle">collapse</a>)</small>
108
+ </h2>
109
+
110
+ <ul class="summary">
111
+
112
+ <li class="public ">
113
+ <span class="summary_signature">
114
+
115
+ <a href="#max-instance_method" title="#max (instance method)">- (Object) <strong>max</strong>(*args) </a>
116
+
117
+
118
+
119
+ </span>
120
+
121
+
122
+
123
+
124
+
125
+
126
+
127
+
128
+
129
+ <span class="summary_desc"><div class='inline'><p>Returns the maximum value in the arguments.</p>
130
+ </div></span>
131
+
132
+ </li>
133
+
134
+
135
+ <li class="public ">
136
+ <span class="summary_signature">
137
+
138
+ <a href="#min-instance_method" title="#min (instance method)">- (Object) <strong>min</strong>(*args) </a>
139
+
140
+
141
+
142
+ </span>
143
+
144
+
145
+
146
+
147
+
148
+
149
+
150
+
151
+
152
+ <span class="summary_desc"><div class='inline'><p>Returns the minimum value in the arguments.</p>
153
+ </div></span>
154
+
155
+ </li>
156
+
157
+
158
+ </ul>
159
+
160
+
161
+
162
+
163
+ <div id="instance_method_details" class="method_details_list">
164
+ <h2>Instance Method Details</h2>
165
+
166
+
167
+ <div class="method_details first">
168
+ <h3 class="signature first" id="max-instance_method">
169
+
170
+ - (<tt><span class='object_link'><a href="../Object.html" title="Lazier::Object (module)">Object</a></span></tt>) <strong>max</strong>(*args)
171
+
172
+
173
+
174
+
175
+
176
+ </h3><div class="docstring">
177
+ <div class="discussion">
178
+ <p>Returns the maximum value in the arguments</p>
179
+
180
+
181
+ </div>
182
+ </div>
183
+ <div class="tags">
184
+ <p class="tag_title">Parameters:</p>
185
+ <ul class="param">
186
+
187
+ <li>
188
+
189
+ <span class='name'>args</span>
190
+
191
+
192
+ <span class='type'>(<tt>Array</tt>)</span>
193
+
194
+
195
+
196
+ &mdash;
197
+ <div class='inline'><p>A collection of object to compare (with the <code>&gt;</code> operator).</p>
198
+ </div>
199
+
200
+ </li>
201
+
202
+ </ul>
203
+
204
+ <p class="tag_title">Returns:</p>
205
+ <ul class="return">
206
+
207
+ <li>
208
+
209
+
210
+ <span class='type'>(<tt><span class='object_link'><a href="../Object.html" title="Lazier::Object (module)">Object</a></span></tt>)</span>
211
+
212
+
213
+
214
+ &mdash;
215
+ <div class='inline'><p>The maximum value or <code>nil</code> (if the collection is empty).</p>
216
+ </div>
217
+
218
+ </li>
219
+
220
+ </ul>
221
+
222
+ </div><table class="source_code">
223
+ <tr>
224
+ <td>
225
+ <pre class="lines">
226
+
227
+
228
+ 34
229
+ 35
230
+ 36
231
+ 37
232
+ 38
233
+ 39
234
+ 40
235
+ 41
236
+ 42
237
+ 43
238
+ 44</pre>
239
+ </td>
240
+ <td>
241
+ <pre class="code"><span class="info file"># File 'lib/lazier/math.rb', line 34</span>
242
+
243
+ <span class='kw'>def</span> <span class='id identifier rubyid_max'>max</span><span class='lparen'>(</span><span class='op'>*</span><span class='id identifier rubyid_args'>args</span><span class='rparen'>)</span>
244
+ <span class='id identifier rubyid_rv'>rv</span> <span class='op'>=</span> <span class='kw'>nil</span>
245
+
246
+ <span class='id identifier rubyid_args'>args</span> <span class='op'>=</span> <span class='id identifier rubyid_args'>args</span><span class='period'>.</span><span class='id identifier rubyid_ensure_array'>ensure_array</span><span class='period'>.</span><span class='id identifier rubyid_flatten'>flatten</span>
247
+ <span class='kw'>if</span> <span class='id identifier rubyid_args'>args</span><span class='period'>.</span><span class='id identifier rubyid_length'>length</span> <span class='op'>&gt;</span> <span class='int'>0</span> <span class='kw'>then</span>
248
+ <span class='id identifier rubyid_rv'>rv</span> <span class='op'>=</span> <span class='id identifier rubyid_args'>args</span><span class='lbracket'>[</span><span class='int'>0</span><span class='rbracket'>]</span>
249
+ <span class='id identifier rubyid_args'>args</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_a'>a</span><span class='op'>|</span> <span class='id identifier rubyid_rv'>rv</span> <span class='op'>=</span> <span class='id identifier rubyid_a'>a</span> <span class='kw'>if</span> <span class='id identifier rubyid_a'>a</span> <span class='op'>&gt;</span> <span class='id identifier rubyid_rv'>rv</span> <span class='kw'>end</span>
250
+ <span class='kw'>end</span>
251
+
252
+ <span class='id identifier rubyid_rv'>rv</span>
253
+ <span class='kw'>end</span></pre>
254
+ </td>
255
+ </tr>
256
+ </table>
257
+ </div>
258
+
259
+ <div class="method_details ">
260
+ <h3 class="signature " id="min-instance_method">
261
+
262
+ - (<tt><span class='object_link'><a href="../Object.html" title="Lazier::Object (module)">Object</a></span></tt>) <strong>min</strong>(*args)
263
+
264
+
265
+
266
+
267
+
268
+ </h3><div class="docstring">
269
+ <div class="discussion">
270
+ <p>Returns the minimum value in the arguments</p>
271
+
272
+
273
+ </div>
274
+ </div>
275
+ <div class="tags">
276
+ <p class="tag_title">Parameters:</p>
277
+ <ul class="param">
278
+
279
+ <li>
280
+
281
+ <span class='name'>args</span>
282
+
283
+
284
+ <span class='type'>(<tt>Array</tt>)</span>
285
+
286
+
287
+
288
+ &mdash;
289
+ <div class='inline'><p>A collection of object to compare (with the <code>&lt;</code> operator).</p>
290
+ </div>
291
+
292
+ </li>
293
+
294
+ </ul>
295
+
296
+ <p class="tag_title">Returns:</p>
297
+ <ul class="return">
298
+
299
+ <li>
300
+
301
+
302
+ <span class='type'>(<tt><span class='object_link'><a href="../Object.html" title="Lazier::Object (module)">Object</a></span></tt>)</span>
303
+
304
+
305
+
306
+ &mdash;
307
+ <div class='inline'><p>The minimum value or <code>nil</code> (if the collection is empty).</p>
308
+ </div>
309
+
310
+ </li>
311
+
312
+ </ul>
313
+
314
+ </div><table class="source_code">
315
+ <tr>
316
+ <td>
317
+ <pre class="lines">
318
+
319
+
320
+ 18
321
+ 19
322
+ 20
323
+ 21
324
+ 22
325
+ 23
326
+ 24
327
+ 25
328
+ 26
329
+ 27
330
+ 28</pre>
331
+ </td>
332
+ <td>
333
+ <pre class="code"><span class="info file"># File 'lib/lazier/math.rb', line 18</span>
334
+
335
+ <span class='kw'>def</span> <span class='id identifier rubyid_min'>min</span><span class='lparen'>(</span><span class='op'>*</span><span class='id identifier rubyid_args'>args</span><span class='rparen'>)</span>
336
+ <span class='id identifier rubyid_rv'>rv</span> <span class='op'>=</span> <span class='kw'>nil</span>
337
+
338
+ <span class='id identifier rubyid_args'>args</span> <span class='op'>=</span> <span class='id identifier rubyid_args'>args</span><span class='period'>.</span><span class='id identifier rubyid_ensure_array'>ensure_array</span><span class='period'>.</span><span class='id identifier rubyid_flatten'>flatten</span>
339
+ <span class='kw'>if</span> <span class='id identifier rubyid_args'>args</span><span class='period'>.</span><span class='id identifier rubyid_length'>length</span> <span class='op'>&gt;</span> <span class='int'>0</span> <span class='kw'>then</span>
340
+ <span class='id identifier rubyid_rv'>rv</span> <span class='op'>=</span> <span class='id identifier rubyid_args'>args</span><span class='lbracket'>[</span><span class='int'>0</span><span class='rbracket'>]</span>
341
+ <span class='id identifier rubyid_args'>args</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_a'>a</span><span class='op'>|</span> <span class='id identifier rubyid_rv'>rv</span> <span class='op'>=</span> <span class='id identifier rubyid_a'>a</span> <span class='kw'>if</span> <span class='id identifier rubyid_a'>a</span> <span class='op'>&lt;</span> <span class='id identifier rubyid_rv'>rv</span> <span class='kw'>end</span>
342
+ <span class='kw'>end</span>
343
+
344
+ <span class='id identifier rubyid_rv'>rv</span>
345
+ <span class='kw'>end</span></pre>
346
+ </td>
347
+ </tr>
348
+ </table>
349
+ </div>
350
+
351
+ </div>
352
+
353
+ </div>
354
+
355
+ <div id="footer">
356
+ Generated on Wed Aug 1 08:57:55 2012 by
357
+ <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
358
+ 0.8.2.1 (ruby-1.9.2).
359
+ </div>
360
+
361
+ </body>
362
+ </html>