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,225 @@
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::Pathname
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 (P)</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">Pathname</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::Pathname
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/pathname.rb</dd>
87
+
88
+ </dl>
89
+ <div class="clear"></div>
90
+
91
+ <h2>Overview</h2><div class="docstring">
92
+ <div class="discussion">
93
+ <p>Extensions for the Pathname class.</p>
94
+
95
+
96
+ </div>
97
+ </div>
98
+ <div class="tags">
99
+
100
+
101
+ </div>
102
+
103
+
104
+
105
+
106
+
107
+
108
+
109
+ <h2>
110
+ Instance Method Summary
111
+ <small>(<a href="#" class="summary_toggle">collapse</a>)</small>
112
+ </h2>
113
+
114
+ <ul class="summary">
115
+
116
+ <li class="public ">
117
+ <span class="summary_signature">
118
+
119
+ <a href="#components-instance_method" title="#components (instance method)">- (Array) <strong>components</strong> </a>
120
+
121
+
122
+
123
+ </span>
124
+
125
+
126
+
127
+
128
+
129
+
130
+
131
+
132
+
133
+ <span class="summary_desc"><div class='inline'><p>Returns all the components that are included in this path.</p>
134
+ </div></span>
135
+
136
+ </li>
137
+
138
+
139
+ </ul>
140
+
141
+
142
+
143
+
144
+
145
+ <div id="instance_method_details" class="method_details_list">
146
+ <h2>Instance Method Details</h2>
147
+
148
+
149
+ <div class="method_details first">
150
+ <h3 class="signature first" id="components-instance_method">
151
+
152
+ - (<tt>Array</tt>) <strong>components</strong>
153
+
154
+
155
+
156
+
157
+
158
+ </h3><div class="docstring">
159
+ <div class="discussion">
160
+ <p>Returns all the components that are included in this path.</p>
161
+
162
+ <pre class="code ruby"><code><span class='const'>Pathname</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>/usr/bin/ruby</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_components'>components</span>
163
+ <span class='comment'># =&gt; [&quot;usr&quot;, &quot;bin&quot;, &quot;ruby&quot;]
164
+ </span></code></pre>
165
+
166
+
167
+ </div>
168
+ </div>
169
+ <div class="tags">
170
+
171
+ <p class="tag_title">Returns:</p>
172
+ <ul class="return">
173
+
174
+ <li>
175
+
176
+
177
+ <span class='type'>(<tt>Array</tt>)</span>
178
+
179
+
180
+
181
+ &mdash;
182
+ <div class='inline'><p>A list of all components that are included in this path.</p>
183
+ </div>
184
+
185
+ </li>
186
+
187
+ </ul>
188
+
189
+ </div><table class="source_code">
190
+ <tr>
191
+ <td>
192
+ <pre class="lines">
193
+
194
+
195
+ 20
196
+ 21
197
+ 22
198
+ 23
199
+ 24</pre>
200
+ </td>
201
+ <td>
202
+ <pre class="code"><span class="info file"># File 'lib/lazier/pathname.rb', line 20</span>
203
+
204
+ <span class='kw'>def</span> <span class='id identifier rubyid_components'>components</span>
205
+ <span class='id identifier rubyid_rv'>rv</span> <span class='op'>=</span> <span class='lbracket'>[</span><span class='rbracket'>]</span>
206
+ <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_each_filename'>each_filename</span> <span class='lbrace'>{</span> <span class='op'>|</span><span class='id identifier rubyid_p'>p</span><span class='op'>|</span> <span class='id identifier rubyid_rv'>rv</span> <span class='op'>&lt;&lt;</span> <span class='id identifier rubyid_p'>p</span> <span class='rbrace'>}</span>
207
+ <span class='id identifier rubyid_rv'>rv</span>
208
+ <span class='kw'>end</span></pre>
209
+ </td>
210
+ </tr>
211
+ </table>
212
+ </div>
213
+
214
+ </div>
215
+
216
+ </div>
217
+
218
+ <div id="footer">
219
+ Generated on Wed Aug 1 08:57:55 2012 by
220
+ <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
221
+ 0.8.2.1 (ruby-1.9.2).
222
+ </div>
223
+
224
+ </body>
225
+ </html>
@@ -0,0 +1,1249 @@
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
+ Class: Lazier::Settings
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 (S)</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">Settings</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>Class: Lazier::Settings
67
+
68
+
69
+
70
+ </h1>
71
+
72
+ <dl class="box">
73
+
74
+ <dt class="r1">Inherits:</dt>
75
+ <dd class="r1">
76
+ <span class="inheritName">Object</span>
77
+
78
+ <ul class="fullTree">
79
+ <li>Object</li>
80
+
81
+ <li class="next">Lazier::Settings</li>
82
+
83
+ </ul>
84
+ <a href="#" class="inheritanceTree">show all</a>
85
+
86
+ </dd>
87
+
88
+
89
+
90
+
91
+
92
+
93
+
94
+
95
+
96
+ <dt class="r2 last">Defined in:</dt>
97
+ <dd class="r2 last">lib/lazier/settings.rb</dd>
98
+
99
+ </dl>
100
+ <div class="clear"></div>
101
+
102
+ <h2>Overview</h2><div class="docstring">
103
+ <div class="discussion">
104
+ <p>Settings for the extensions.</p>
105
+
106
+
107
+ </div>
108
+ </div>
109
+ <div class="tags">
110
+
111
+
112
+ </div>
113
+
114
+
115
+
116
+ <h2>Instance Attribute Summary <small>(<a href="#" class="summary_toggle">collapse</a>)</small></h2>
117
+ <ul class="summary">
118
+
119
+ <li class="public ">
120
+ <span class="summary_signature">
121
+
122
+ <a href="#boolean_names-instance_method" title="#boolean_names (instance method)">- (Object) <strong>boolean_names</strong> </a>
123
+
124
+
125
+
126
+ </span>
127
+
128
+
129
+
130
+
131
+ <span class="note title readonly">readonly</span>
132
+
133
+
134
+
135
+
136
+
137
+
138
+
139
+
140
+
141
+ <span class="summary_desc"><div class='inline'><p>String representations of booleans.</p>
142
+ </div></span>
143
+
144
+ </li>
145
+
146
+
147
+ <li class="public ">
148
+ <span class="summary_signature">
149
+
150
+ <a href="#date_formats-instance_method" title="#date_formats (instance method)">- (Object) <strong>date_formats</strong> </a>
151
+
152
+
153
+
154
+ </span>
155
+
156
+
157
+
158
+
159
+ <span class="note title readonly">readonly</span>
160
+
161
+
162
+
163
+
164
+
165
+
166
+
167
+
168
+
169
+ <span class="summary_desc"><div class='inline'><p>Custom date and time formats.</p>
170
+ </div></span>
171
+
172
+ </li>
173
+
174
+
175
+ <li class="public ">
176
+ <span class="summary_signature">
177
+
178
+ <a href="#date_names-instance_method" title="#date_names (instance method)">- (Object) <strong>date_names</strong> </a>
179
+
180
+
181
+
182
+ </span>
183
+
184
+
185
+
186
+
187
+ <span class="note title readonly">readonly</span>
188
+
189
+
190
+
191
+
192
+
193
+
194
+
195
+
196
+
197
+ <span class="summary_desc"><div class='inline'><p>String representations of days and months.</p>
198
+ </div></span>
199
+
200
+ </li>
201
+
202
+
203
+ <li class="public ">
204
+ <span class="summary_signature">
205
+
206
+ <a href="#format_number-instance_method" title="#format_number (instance method)">- (Object) <strong>format_number</strong> </a>
207
+
208
+
209
+
210
+ </span>
211
+
212
+
213
+
214
+
215
+ <span class="note title readonly">readonly</span>
216
+
217
+
218
+
219
+
220
+
221
+
222
+
223
+
224
+
225
+ <span class="summary_desc"><div class='inline'><p>Settings for numbers formatting.</p>
226
+ </div></span>
227
+
228
+ </li>
229
+
230
+
231
+ </ul>
232
+
233
+
234
+
235
+
236
+
237
+ <h2>
238
+ Class Method Summary
239
+ <small>(<a href="#" class="summary_toggle">collapse</a>)</small>
240
+ </h2>
241
+
242
+ <ul class="summary">
243
+
244
+ <li class="public ">
245
+ <span class="summary_signature">
246
+
247
+ <a href="#instance-class_method" title="instance (class method)">+ (Settings) <strong>instance</strong> </a>
248
+
249
+
250
+
251
+ </span>
252
+
253
+
254
+
255
+
256
+
257
+
258
+
259
+
260
+
261
+ <span class="summary_desc"><div class='inline'><p>Returns the singleton instance of the settings.</p>
262
+ </div></span>
263
+
264
+ </li>
265
+
266
+
267
+ </ul>
268
+
269
+ <h2>
270
+ Instance Method Summary
271
+ <small>(<a href="#" class="summary_toggle">collapse</a>)</small>
272
+ </h2>
273
+
274
+ <ul class="summary">
275
+
276
+ <li class="public ">
277
+ <span class="summary_signature">
278
+
279
+ <a href="#initialize-instance_method" title="#initialize (instance method)">- (Settings) <strong>initialize</strong> </a>
280
+
281
+
282
+
283
+ </span>
284
+
285
+
286
+ <span class="note title constructor">constructor</span>
287
+
288
+
289
+
290
+
291
+
292
+
293
+
294
+
295
+ <span class="summary_desc"><div class='inline'><p>Initializes a new settings object.</p>
296
+ </div></span>
297
+
298
+ </li>
299
+
300
+
301
+ <li class="public ">
302
+ <span class="summary_signature">
303
+
304
+ <a href="#setup_boolean_names-instance_method" title="#setup_boolean_names (instance method)">- (Hash) <strong>setup_boolean_names</strong>(true_name = nil, false_name = nil) </a>
305
+
306
+
307
+
308
+ </span>
309
+
310
+
311
+
312
+
313
+
314
+
315
+
316
+
317
+
318
+ <span class="summary_desc"><div class='inline'><p>Setups strings representation of booleans.</p>
319
+ </div></span>
320
+
321
+ </li>
322
+
323
+
324
+ <li class="public ">
325
+ <span class="summary_signature">
326
+
327
+ <a href="#setup_date_formats-instance_method" title="#setup_date_formats (instance method)">- (Hash) <strong>setup_date_formats</strong>(formats = nil, replace = false) </a>
328
+
329
+
330
+
331
+ </span>
332
+
333
+
334
+
335
+
336
+
337
+
338
+
339
+
340
+
341
+ <span class="summary_desc"><div class='inline'><p>Setups custom formats for dates and times.</p>
342
+ </div></span>
343
+
344
+ </li>
345
+
346
+
347
+ <li class="public ">
348
+ <span class="summary_signature">
349
+
350
+ <a href="#setup_date_names-instance_method" title="#setup_date_names (instance method)">- (Hash) <strong>setup_date_names</strong>(long_months = nil, short_months = nil, long_days = nil, short_days = nil) </a>
351
+
352
+
353
+
354
+ </span>
355
+
356
+
357
+
358
+
359
+
360
+
361
+
362
+
363
+
364
+ <span class="summary_desc"><div class='inline'><p>Setups strings representation of days and months.</p>
365
+ </div></span>
366
+
367
+ </li>
368
+
369
+
370
+ <li class="public ">
371
+ <span class="summary_signature">
372
+
373
+ <a href="#setup_format_number-instance_method" title="#setup_format_number (instance method)">- (Hash) <strong>setup_format_number</strong>(prec = 2, decimal_separator = &quot;.&quot;, add_string = &quot;&quot;, k_separator = &quot;,&quot;) </a>
374
+
375
+
376
+
377
+ </span>
378
+
379
+
380
+
381
+
382
+
383
+
384
+
385
+
386
+
387
+ <span class="summary_desc"><div class='inline'><p>Setups formatters for a number.</p>
388
+ </div></span>
389
+
390
+ </li>
391
+
392
+
393
+ </ul>
394
+
395
+
396
+ <div id="constructor_details" class="method_details_list">
397
+ <h2>Constructor Details</h2>
398
+
399
+ <div class="method_details first">
400
+ <h3 class="signature first" id="initialize-instance_method">
401
+
402
+ - (<tt><span class='object_link'><a href="" title="Lazier::Settings (class)">Settings</a></span></tt>) <strong>initialize</strong>
403
+
404
+
405
+
406
+
407
+
408
+ </h3><div class="docstring">
409
+ <div class="discussion">
410
+ <p>Initializes a new settings object.</p>
411
+
412
+
413
+ </div>
414
+ </div>
415
+ <div class="tags">
416
+
417
+
418
+ </div><table class="source_code">
419
+ <tr>
420
+ <td>
421
+ <pre class="lines">
422
+
423
+
424
+ 30
425
+ 31
426
+ 32
427
+ 33
428
+ 34
429
+ 35</pre>
430
+ </td>
431
+ <td>
432
+ <pre class="code"><span class="info file"># File 'lib/lazier/settings.rb', line 30</span>
433
+
434
+ <span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span>
435
+ <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_setup_format_number'>setup_format_number</span>
436
+ <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_setup_boolean_names'>setup_boolean_names</span>
437
+ <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_setup_date_formats'>setup_date_formats</span>
438
+ <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_setup_date_names'>setup_date_names</span>
439
+ <span class='kw'>end</span></pre>
440
+ </td>
441
+ </tr>
442
+ </table>
443
+ </div>
444
+
445
+ </div>
446
+
447
+ <div id="instance_attr_details" class="attr_details">
448
+ <h2>Instance Attribute Details</h2>
449
+
450
+
451
+ <span id=""></span>
452
+ <div class="method_details first">
453
+ <h3 class="signature first" id="boolean_names-instance_method">
454
+
455
+ - (<tt><span class='object_link'><a href="Object.html" title="Lazier::Object (module)">Object</a></span></tt>) <strong>boolean_names</strong> <span class="extras">(readonly)</span>
456
+
457
+
458
+
459
+
460
+
461
+ </h3><div class="docstring">
462
+ <div class="discussion">
463
+ <p>String representations of booleans.</p>
464
+
465
+
466
+ </div>
467
+ </div>
468
+ <div class="tags">
469
+
470
+
471
+ </div><table class="source_code">
472
+ <tr>
473
+ <td>
474
+ <pre class="lines">
475
+
476
+
477
+ 14
478
+ 15
479
+ 16</pre>
480
+ </td>
481
+ <td>
482
+ <pre class="code"><span class="info file"># File 'lib/lazier/settings.rb', line 14</span>
483
+
484
+ <span class='kw'>def</span> <span class='id identifier rubyid_boolean_names'>boolean_names</span>
485
+ <span class='ivar'>@boolean_names</span>
486
+ <span class='kw'>end</span></pre>
487
+ </td>
488
+ </tr>
489
+ </table>
490
+ </div>
491
+
492
+
493
+ <span id=""></span>
494
+ <div class="method_details ">
495
+ <h3 class="signature " id="date_formats-instance_method">
496
+
497
+ - (<tt><span class='object_link'><a href="Object.html" title="Lazier::Object (module)">Object</a></span></tt>) <strong>date_formats</strong> <span class="extras">(readonly)</span>
498
+
499
+
500
+
501
+
502
+
503
+ </h3><div class="docstring">
504
+ <div class="discussion">
505
+ <p>Custom date and time formats.</p>
506
+
507
+
508
+ </div>
509
+ </div>
510
+ <div class="tags">
511
+
512
+
513
+ </div><table class="source_code">
514
+ <tr>
515
+ <td>
516
+ <pre class="lines">
517
+
518
+
519
+ 20
520
+ 21
521
+ 22</pre>
522
+ </td>
523
+ <td>
524
+ <pre class="code"><span class="info file"># File 'lib/lazier/settings.rb', line 20</span>
525
+
526
+ <span class='kw'>def</span> <span class='id identifier rubyid_date_formats'>date_formats</span>
527
+ <span class='ivar'>@date_formats</span>
528
+ <span class='kw'>end</span></pre>
529
+ </td>
530
+ </tr>
531
+ </table>
532
+ </div>
533
+
534
+
535
+ <span id=""></span>
536
+ <div class="method_details ">
537
+ <h3 class="signature " id="date_names-instance_method">
538
+
539
+ - (<tt><span class='object_link'><a href="Object.html" title="Lazier::Object (module)">Object</a></span></tt>) <strong>date_names</strong> <span class="extras">(readonly)</span>
540
+
541
+
542
+
543
+
544
+
545
+ </h3><div class="docstring">
546
+ <div class="discussion">
547
+ <p>String representations of days and months.</p>
548
+
549
+
550
+ </div>
551
+ </div>
552
+ <div class="tags">
553
+
554
+
555
+ </div><table class="source_code">
556
+ <tr>
557
+ <td>
558
+ <pre class="lines">
559
+
560
+
561
+ 17
562
+ 18
563
+ 19</pre>
564
+ </td>
565
+ <td>
566
+ <pre class="code"><span class="info file"># File 'lib/lazier/settings.rb', line 17</span>
567
+
568
+ <span class='kw'>def</span> <span class='id identifier rubyid_date_names'>date_names</span>
569
+ <span class='ivar'>@date_names</span>
570
+ <span class='kw'>end</span></pre>
571
+ </td>
572
+ </tr>
573
+ </table>
574
+ </div>
575
+
576
+
577
+ <span id=""></span>
578
+ <div class="method_details ">
579
+ <h3 class="signature " id="format_number-instance_method">
580
+
581
+ - (<tt><span class='object_link'><a href="Object.html" title="Lazier::Object (module)">Object</a></span></tt>) <strong>format_number</strong> <span class="extras">(readonly)</span>
582
+
583
+
584
+
585
+
586
+
587
+ </h3><div class="docstring">
588
+ <div class="discussion">
589
+ <p>Settings for numbers formatting.</p>
590
+
591
+
592
+ </div>
593
+ </div>
594
+ <div class="tags">
595
+
596
+
597
+ </div><table class="source_code">
598
+ <tr>
599
+ <td>
600
+ <pre class="lines">
601
+
602
+
603
+ 11
604
+ 12
605
+ 13</pre>
606
+ </td>
607
+ <td>
608
+ <pre class="code"><span class="info file"># File 'lib/lazier/settings.rb', line 11</span>
609
+
610
+ <span class='kw'>def</span> <span class='id identifier rubyid_format_number'>format_number</span>
611
+ <span class='ivar'>@format_number</span>
612
+ <span class='kw'>end</span></pre>
613
+ </td>
614
+ </tr>
615
+ </table>
616
+ </div>
617
+
618
+ </div>
619
+
620
+
621
+ <div id="class_method_details" class="method_details_list">
622
+ <h2>Class Method Details</h2>
623
+
624
+
625
+ <div class="method_details first">
626
+ <h3 class="signature first" id="instance-class_method">
627
+
628
+ + (<tt><span class='object_link'><a href="" title="Lazier::Settings (class)">Settings</a></span></tt>) <strong>instance</strong>
629
+
630
+
631
+
632
+
633
+
634
+ </h3><div class="docstring">
635
+ <div class="discussion">
636
+ <p>Returns the singleton instance of the settings.</p>
637
+
638
+
639
+ </div>
640
+ </div>
641
+ <div class="tags">
642
+
643
+ <p class="tag_title">Returns:</p>
644
+ <ul class="return">
645
+
646
+ <li>
647
+
648
+
649
+ <span class='type'>(<tt><span class='object_link'><a href="" title="Lazier::Settings (class)">Settings</a></span></tt>)</span>
650
+
651
+
652
+
653
+ &mdash;
654
+ <div class='inline'><p>The singleton instance of the settings.</p>
655
+ </div>
656
+
657
+ </li>
658
+
659
+ </ul>
660
+
661
+ </div><table class="source_code">
662
+ <tr>
663
+ <td>
664
+ <pre class="lines">
665
+
666
+
667
+ 25
668
+ 26
669
+ 27</pre>
670
+ </td>
671
+ <td>
672
+ <pre class="code"><span class="info file"># File 'lib/lazier/settings.rb', line 25</span>
673
+
674
+ <span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_instance'>instance</span>
675
+ <span class='ivar'>@instance</span> <span class='op'>||=</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span>
676
+ <span class='kw'>end</span></pre>
677
+ </td>
678
+ </tr>
679
+ </table>
680
+ </div>
681
+
682
+ </div>
683
+
684
+ <div id="instance_method_details" class="method_details_list">
685
+ <h2>Instance Method Details</h2>
686
+
687
+
688
+ <div class="method_details first">
689
+ <h3 class="signature first" id="setup_boolean_names-instance_method">
690
+
691
+ - (<tt><span class='object_link'><a href="Hash.html" title="Lazier::Hash (module)">Hash</a></span></tt>) <strong>setup_boolean_names</strong>(true_name = nil, false_name = nil)
692
+
693
+
694
+
695
+
696
+
697
+ </h3><div class="docstring">
698
+ <div class="discussion">
699
+ <p>Setups strings representation of booleans.</p>
700
+
701
+
702
+ </div>
703
+ </div>
704
+ <div class="tags">
705
+ <p class="tag_title">Parameters:</p>
706
+ <ul class="param">
707
+
708
+ <li>
709
+
710
+ <span class='name'>true_name</span>
711
+
712
+
713
+ <span class='type'>(<tt><span class='object_link'><a href="String.html" title="Lazier::String (module)">String</a></span></tt>)</span>
714
+
715
+
716
+ <em class="default">(defaults to: <tt>nil</tt>)</em>
717
+
718
+
719
+ &mdash;
720
+ <div class='inline'><p>The string representation of <code>true</code>. Defaults to <code>Yes</code>.</p>
721
+ </div>
722
+
723
+ </li>
724
+
725
+ <li>
726
+
727
+ <span class='name'>false_name</span>
728
+
729
+
730
+ <span class='type'>(<tt><span class='object_link'><a href="String.html" title="Lazier::String (module)">String</a></span></tt>)</span>
731
+
732
+
733
+ <em class="default">(defaults to: <tt>nil</tt>)</em>
734
+
735
+
736
+ &mdash;
737
+ <div class='inline'><p>The string representation of <code>false</code>. Defaults to <code>No</code>.</p>
738
+ </div>
739
+
740
+ </li>
741
+
742
+ </ul>
743
+
744
+ <p class="tag_title">Returns:</p>
745
+ <ul class="return">
746
+
747
+ <li>
748
+
749
+
750
+ <span class='type'>(<tt><span class='object_link'><a href="Hash.html" title="Lazier::Hash (module)">Hash</a></span></tt>)</span>
751
+
752
+
753
+
754
+ &mdash;
755
+ <div class='inline'><p>The new representations.</p>
756
+ </div>
757
+
758
+ </li>
759
+
760
+ </ul>
761
+
762
+ <p class="tag_title">See Also:</p>
763
+ <ul class="see">
764
+
765
+ <li><span class='object_link'><a href="Object.html#format_boolean-instance_method" title="Lazier::Object#format_boolean (method)">Object#format_boolean</a></span></li>
766
+
767
+ </ul>
768
+
769
+ </div><table class="source_code">
770
+ <tr>
771
+ <td>
772
+ <pre class="lines">
773
+
774
+
775
+ 60
776
+ 61
777
+ 62
778
+ 63
779
+ 64</pre>
780
+ </td>
781
+ <td>
782
+ <pre class="code"><span class="info file"># File 'lib/lazier/settings.rb', line 60</span>
783
+
784
+ <span class='kw'>def</span> <span class='id identifier rubyid_setup_boolean_names'>setup_boolean_names</span><span class='lparen'>(</span><span class='id identifier rubyid_true_name'>true_name</span> <span class='op'>=</span> <span class='kw'>nil</span><span class='comma'>,</span> <span class='id identifier rubyid_false_name'>false_name</span> <span class='op'>=</span> <span class='kw'>nil</span><span class='rparen'>)</span>
785
+ <span class='id identifier rubyid_true_name'>true_name</span> <span class='op'>||=</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>Yes</span><span class='tstring_end'>&quot;</span></span>
786
+ <span class='id identifier rubyid_false_name'>false_name</span> <span class='op'>||=</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>No</span><span class='tstring_end'>&quot;</span></span>
787
+ <span class='ivar'>@boolean_names</span> <span class='op'>=</span> <span class='lbrace'>{</span><span class='kw'>true</span> <span class='op'>=&gt;</span> <span class='id identifier rubyid_true_name'>true_name</span><span class='comma'>,</span> <span class='kw'>false</span> <span class='op'>=&gt;</span> <span class='id identifier rubyid_false_name'>false_name</span><span class='rbrace'>}</span>
788
+ <span class='kw'>end</span></pre>
789
+ </td>
790
+ </tr>
791
+ </table>
792
+ </div>
793
+
794
+ <div class="method_details ">
795
+ <h3 class="signature " id="setup_date_formats-instance_method">
796
+
797
+ - (<tt><span class='object_link'><a href="Hash.html" title="Lazier::Hash (module)">Hash</a></span></tt>) <strong>setup_date_formats</strong>(formats = nil, replace = false)
798
+
799
+
800
+
801
+
802
+
803
+ </h3><div class="docstring">
804
+ <div class="discussion">
805
+ <p>Setups custom formats for dates and times.</p>
806
+
807
+
808
+ </div>
809
+ </div>
810
+ <div class="tags">
811
+ <p class="tag_title">Parameters:</p>
812
+ <ul class="param">
813
+
814
+ <li>
815
+
816
+ <span class='name'>formats</span>
817
+
818
+
819
+ <span class='type'>(<tt><span class='object_link'><a href="Hash.html" title="Lazier::Hash (module)">Hash</a></span></tt>)</span>
820
+
821
+
822
+ <em class="default">(defaults to: <tt>nil</tt>)</em>
823
+
824
+
825
+ &mdash;
826
+ <div class='inline'><p>The format to add or replace.</p>
827
+ </div>
828
+
829
+ </li>
830
+
831
+ <li>
832
+
833
+ <span class='name'>replace</span>
834
+
835
+
836
+ <span class='type'>(<tt><span class='object_link'><a href="Boolean.html" title="Lazier::Boolean (module)">Boolean</a></span></tt>)</span>
837
+
838
+
839
+ <em class="default">(defaults to: <tt>false</tt>)</em>
840
+
841
+
842
+ &mdash;
843
+ <div class='inline'><p>If to discard current formats.</p>
844
+ </div>
845
+
846
+ </li>
847
+
848
+ </ul>
849
+
850
+ <p class="tag_title">Returns:</p>
851
+ <ul class="return">
852
+
853
+ <li>
854
+
855
+
856
+ <span class='type'>(<tt><span class='object_link'><a href="Hash.html" title="Lazier::Hash (module)">Hash</a></span></tt>)</span>
857
+
858
+
859
+
860
+ &mdash;
861
+ <div class='inline'><p>The new formats.</p>
862
+ </div>
863
+
864
+ </li>
865
+
866
+ </ul>
867
+
868
+ <p class="tag_title">See Also:</p>
869
+ <ul class="see">
870
+
871
+ <li><span class='object_link'><a href="DateTime.html#lstrftime-instance_method" title="Lazier::DateTime#lstrftime (method)">DateTime#lstrftime</a></span></li>
872
+
873
+ </ul>
874
+
875
+ </div><table class="source_code">
876
+ <tr>
877
+ <td>
878
+ <pre class="lines">
879
+
880
+
881
+ 72
882
+ 73
883
+ 74
884
+ 75
885
+ 76
886
+ 77
887
+ 78
888
+ 79
889
+ 80
890
+ 81
891
+ 82
892
+ 83
893
+ 84
894
+ 85
895
+ 86
896
+ 87
897
+ 88
898
+ 89
899
+ 90
900
+ 91
901
+ 92</pre>
902
+ </td>
903
+ <td>
904
+ <pre class="code"><span class="info file"># File 'lib/lazier/settings.rb', line 72</span>
905
+
906
+ <span class='kw'>def</span> <span class='id identifier rubyid_setup_date_formats'>setup_date_formats</span><span class='lparen'>(</span><span class='id identifier rubyid_formats'>formats</span> <span class='op'>=</span> <span class='kw'>nil</span><span class='comma'>,</span> <span class='id identifier rubyid_replace'>replace</span> <span class='op'>=</span> <span class='kw'>false</span><span class='rparen'>)</span>
907
+ <span class='id identifier rubyid_formats'>formats</span> <span class='op'>=</span> <span class='lbrace'>{</span>
908
+ <span class='symbol'>:ct_date</span> <span class='op'>=&gt;</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>%Y-%m-%d</span><span class='tstring_end'>&quot;</span></span><span class='comma'>,</span>
909
+ <span class='symbol'>:ct_time</span> <span class='op'>=&gt;</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>%H:%M:%S</span><span class='tstring_end'>&quot;</span></span><span class='comma'>,</span>
910
+ <span class='symbol'>:ct_date_time</span> <span class='op'>=&gt;</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>%F %T</span><span class='tstring_end'>&quot;</span></span><span class='comma'>,</span>
911
+ <span class='symbol'>:ct_iso_8601</span> <span class='op'>=&gt;</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>%FT%T%z</span><span class='tstring_end'>&quot;</span></span>
912
+ <span class='rbrace'>}</span> <span class='kw'>if</span> <span class='id identifier rubyid_formats'>formats</span><span class='period'>.</span><span class='id identifier rubyid_blank?'>blank?</span>
913
+
914
+ <span class='kw'>if</span> <span class='id identifier rubyid_formats'>formats</span><span class='period'>.</span><span class='id identifier rubyid_is_a?'>is_a?</span><span class='lparen'>(</span><span class='op'>::</span><span class='const'>Hash</span><span class='rparen'>)</span> <span class='kw'>then</span>
915
+ <span class='kw'>if</span> <span class='op'>!</span><span class='id identifier rubyid_replace'>replace</span> <span class='kw'>then</span>
916
+ <span class='ivar'>@date_formats</span> <span class='op'>||=</span> <span class='lbrace'>{</span><span class='rbrace'>}</span>
917
+ <span class='ivar'>@date_formats</span><span class='period'>.</span><span class='id identifier rubyid_merge!'>merge!</span><span class='lparen'>(</span><span class='id identifier rubyid_formats'>formats</span><span class='rparen'>)</span>
918
+ <span class='kw'>else</span>
919
+ <span class='ivar'>@date_formats</span> <span class='op'>=</span> <span class='id identifier rubyid_formats'>formats</span>
920
+ <span class='kw'>end</span>
921
+
922
+ <span class='ivar'>@date_formats</span><span class='period'>.</span><span class='id identifier rubyid_each_pair'>each_pair</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_k'>k</span><span class='comma'>,</span> <span class='id identifier rubyid_v'>v</span><span class='op'>|</span> <span class='op'>::</span><span class='const'>Time</span><span class='op'>::</span><span class='const'>DATE_FORMATS</span><span class='lbracket'>[</span><span class='id identifier rubyid_k'>k</span><span class='rbracket'>]</span> <span class='op'>=</span> <span class='id identifier rubyid_v'>v</span> <span class='kw'>end</span>
923
+ <span class='kw'>end</span>
924
+
925
+ <span class='ivar'>@date_formats</span>
926
+ <span class='kw'>end</span></pre>
927
+ </td>
928
+ </tr>
929
+ </table>
930
+ </div>
931
+
932
+ <div class="method_details ">
933
+ <h3 class="signature " id="setup_date_names-instance_method">
934
+
935
+ - (<tt><span class='object_link'><a href="Hash.html" title="Lazier::Hash (module)">Hash</a></span></tt>) <strong>setup_date_names</strong>(long_months = nil, short_months = nil, long_days = nil, short_days = nil)
936
+
937
+
938
+
939
+
940
+
941
+ </h3><div class="docstring">
942
+ <div class="discussion">
943
+ <p>Setups strings representation of days and months.</p>
944
+
945
+
946
+ </div>
947
+ </div>
948
+ <div class="tags">
949
+ <p class="tag_title">Parameters:</p>
950
+ <ul class="param">
951
+
952
+ <li>
953
+
954
+ <span class='name'>long_months</span>
955
+
956
+
957
+ <span class='type'>(<tt>Array</tt>)</span>
958
+
959
+
960
+ <em class="default">(defaults to: <tt>nil</tt>)</em>
961
+
962
+
963
+ &mdash;
964
+ <div class='inline'><p>The string representation of months.</p>
965
+ </div>
966
+
967
+ </li>
968
+
969
+ <li>
970
+
971
+ <span class='name'>short_months</span>
972
+
973
+
974
+ <span class='type'>(<tt>Array</tt>)</span>
975
+
976
+
977
+ <em class="default">(defaults to: <tt>nil</tt>)</em>
978
+
979
+
980
+ &mdash;
981
+ <div class='inline'><p>The abbreviated string representation of months.</p>
982
+ </div>
983
+
984
+ </li>
985
+
986
+ <li>
987
+
988
+ <span class='name'>long_days</span>
989
+
990
+
991
+ <span class='type'>(<tt>Array</tt>)</span>
992
+
993
+
994
+ <em class="default">(defaults to: <tt>nil</tt>)</em>
995
+
996
+
997
+ &mdash;
998
+ <div class='inline'><p>The string representation of days.</p>
999
+ </div>
1000
+
1001
+ </li>
1002
+
1003
+ <li>
1004
+
1005
+ <span class='name'>short_days</span>
1006
+
1007
+
1008
+ <span class='type'>(<tt>Array</tt>)</span>
1009
+
1010
+
1011
+ <em class="default">(defaults to: <tt>nil</tt>)</em>
1012
+
1013
+
1014
+ &mdash;
1015
+ <div class='inline'><p>The abbreviated string representation of days.</p>
1016
+ </div>
1017
+
1018
+ </li>
1019
+
1020
+ </ul>
1021
+
1022
+ <p class="tag_title">Returns:</p>
1023
+ <ul class="return">
1024
+
1025
+ <li>
1026
+
1027
+
1028
+ <span class='type'>(<tt><span class='object_link'><a href="Hash.html" title="Lazier::Hash (module)">Hash</a></span></tt>)</span>
1029
+
1030
+
1031
+
1032
+ &mdash;
1033
+ <div class='inline'><p>The new representations.</p>
1034
+ </div>
1035
+
1036
+ </li>
1037
+
1038
+ </ul>
1039
+
1040
+ <p class="tag_title">See Also:</p>
1041
+ <ul class="see">
1042
+
1043
+ <li><span class='object_link'><a href="DateTime/ClassMethods.html#days-instance_method" title="Lazier::DateTime::ClassMethods#days (method)">DateTime::ClassMethods#days</a></span></li>
1044
+
1045
+ <li><span class='object_link'><a href="DateTime/ClassMethods.html#months-instance_method" title="Lazier::DateTime::ClassMethods#months (method)">DateTime::ClassMethods#months</a></span></li>
1046
+
1047
+ <li><span class='object_link'><a href="DateTime.html#lstrftime-instance_method" title="Lazier::DateTime#lstrftime (method)">DateTime#lstrftime</a></span></li>
1048
+
1049
+ </ul>
1050
+
1051
+ </div><table class="source_code">
1052
+ <tr>
1053
+ <td>
1054
+ <pre class="lines">
1055
+
1056
+
1057
+ 104
1058
+ 105
1059
+ 106
1060
+ 107
1061
+ 108
1062
+ 109
1063
+ 110
1064
+ 111
1065
+ 112
1066
+ 113
1067
+ 114
1068
+ 115
1069
+ 116</pre>
1070
+ </td>
1071
+ <td>
1072
+ <pre class="code"><span class="info file"># File 'lib/lazier/settings.rb', line 104</span>
1073
+
1074
+ <span class='kw'>def</span> <span class='id identifier rubyid_setup_date_names'>setup_date_names</span><span class='lparen'>(</span><span class='id identifier rubyid_long_months'>long_months</span> <span class='op'>=</span> <span class='kw'>nil</span><span class='comma'>,</span> <span class='id identifier rubyid_short_months'>short_months</span> <span class='op'>=</span> <span class='kw'>nil</span><span class='comma'>,</span> <span class='id identifier rubyid_long_days'>long_days</span> <span class='op'>=</span> <span class='kw'>nil</span><span class='comma'>,</span> <span class='id identifier rubyid_short_days'>short_days</span> <span class='op'>=</span> <span class='kw'>nil</span><span class='rparen'>)</span>
1075
+ <span class='id identifier rubyid_long_months'>long_months</span> <span class='op'>=</span> <span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>January</span><span class='tstring_end'>&quot;</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>February</span><span class='tstring_end'>&quot;</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>March</span><span class='tstring_end'>&quot;</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>April</span><span class='tstring_end'>&quot;</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>May</span><span class='tstring_end'>&quot;</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>June</span><span class='tstring_end'>&quot;</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>July</span><span class='tstring_end'>&quot;</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>August</span><span class='tstring_end'>&quot;</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>September</span><span class='tstring_end'>&quot;</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>October</span><span class='tstring_end'>&quot;</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>November</span><span class='tstring_end'>&quot;</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>December</span><span class='tstring_end'>&quot;</span></span><span class='rbracket'>]</span> <span class='kw'>if</span> <span class='id identifier rubyid_long_months'>long_months</span><span class='period'>.</span><span class='id identifier rubyid_blank?'>blank?</span>
1076
+ <span class='id identifier rubyid_short_months'>short_months</span> <span class='op'>=</span> <span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>Jan</span><span class='tstring_end'>&quot;</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>Feb</span><span class='tstring_end'>&quot;</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>Mar</span><span class='tstring_end'>&quot;</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>Apr</span><span class='tstring_end'>&quot;</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>May</span><span class='tstring_end'>&quot;</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>Jun</span><span class='tstring_end'>&quot;</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>Jul</span><span class='tstring_end'>&quot;</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>Aug</span><span class='tstring_end'>&quot;</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>Sep</span><span class='tstring_end'>&quot;</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>Oct</span><span class='tstring_end'>&quot;</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>Nov</span><span class='tstring_end'>&quot;</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>Dec</span><span class='tstring_end'>&quot;</span></span><span class='rbracket'>]</span> <span class='kw'>if</span> <span class='id identifier rubyid_short_months'>short_months</span><span class='period'>.</span><span class='id identifier rubyid_blank?'>blank?</span>
1077
+ <span class='id identifier rubyid_long_days'>long_days</span> <span class='op'>=</span> <span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>Sunday</span><span class='tstring_end'>&quot;</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>Monday</span><span class='tstring_end'>&quot;</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>Tuesday</span><span class='tstring_end'>&quot;</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>Wednesday</span><span class='tstring_end'>&quot;</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>Thursday</span><span class='tstring_end'>&quot;</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>Friday</span><span class='tstring_end'>&quot;</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>Saturday</span><span class='tstring_end'>&quot;</span></span><span class='rbracket'>]</span> <span class='kw'>if</span> <span class='id identifier rubyid_long_days'>long_days</span><span class='period'>.</span><span class='id identifier rubyid_blank?'>blank?</span>
1078
+ <span class='id identifier rubyid_short_days'>short_days</span> <span class='op'>=</span> <span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>Sun</span><span class='tstring_end'>&quot;</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>Mon</span><span class='tstring_end'>&quot;</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>Tue</span><span class='tstring_end'>&quot;</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>Wed</span><span class='tstring_end'>&quot;</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>Thu</span><span class='tstring_end'>&quot;</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>Fri</span><span class='tstring_end'>&quot;</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>Sat</span><span class='tstring_end'>&quot;</span></span><span class='rbracket'>]</span> <span class='kw'>if</span> <span class='id identifier rubyid_short_days'>short_days</span><span class='period'>.</span><span class='id identifier rubyid_blank?'>blank?</span>
1079
+
1080
+ <span class='ivar'>@date_names</span> <span class='op'>=</span> <span class='lbrace'>{</span>
1081
+ <span class='symbol'>:long_months</span> <span class='op'>=&gt;</span> <span class='id identifier rubyid_long_months'>long_months</span><span class='comma'>,</span>
1082
+ <span class='symbol'>:short_months</span> <span class='op'>=&gt;</span> <span class='id identifier rubyid_short_months'>short_months</span><span class='comma'>,</span>
1083
+ <span class='symbol'>:long_days</span> <span class='op'>=&gt;</span> <span class='id identifier rubyid_long_days'>long_days</span><span class='comma'>,</span>
1084
+ <span class='symbol'>:short_days</span> <span class='op'>=&gt;</span> <span class='id identifier rubyid_short_days'>short_days</span>
1085
+ <span class='rbrace'>}</span>
1086
+ <span class='kw'>end</span></pre>
1087
+ </td>
1088
+ </tr>
1089
+ </table>
1090
+ </div>
1091
+
1092
+ <div class="method_details ">
1093
+ <h3 class="signature " id="setup_format_number-instance_method">
1094
+
1095
+ - (<tt><span class='object_link'><a href="Hash.html" title="Lazier::Hash (module)">Hash</a></span></tt>) <strong>setup_format_number</strong>(prec = 2, decimal_separator = &quot;.&quot;, add_string = &quot;&quot;, k_separator = &quot;,&quot;)
1096
+
1097
+
1098
+
1099
+
1100
+
1101
+ </h3><div class="docstring">
1102
+ <div class="discussion">
1103
+ <p>Setups formatters for a number.</p>
1104
+
1105
+
1106
+ </div>
1107
+ </div>
1108
+ <div class="tags">
1109
+ <p class="tag_title">Parameters:</p>
1110
+ <ul class="param">
1111
+
1112
+ <li>
1113
+
1114
+ <span class='name'>prec</span>
1115
+
1116
+
1117
+ <span class='type'>(<tt>Fixnum</tt>)</span>
1118
+
1119
+
1120
+ <em class="default">(defaults to: <tt>2</tt>)</em>
1121
+
1122
+
1123
+ &mdash;
1124
+ <div class='inline'><p>The precision to show.</p>
1125
+ </div>
1126
+
1127
+ </li>
1128
+
1129
+ <li>
1130
+
1131
+ <span class='name'>decimal_separator</span>
1132
+
1133
+
1134
+ <span class='type'>(<tt><span class='object_link'><a href="String.html" title="Lazier::String (module)">String</a></span></tt>)</span>
1135
+
1136
+
1137
+ <em class="default">(defaults to: <tt>&quot;.&quot;</tt>)</em>
1138
+
1139
+
1140
+ &mdash;
1141
+ <div class='inline'><p>The string to use as decimal separator.</p>
1142
+ </div>
1143
+
1144
+ </li>
1145
+
1146
+ <li>
1147
+
1148
+ <span class='name'>add_string</span>
1149
+
1150
+
1151
+ <span class='type'>(<tt><span class='object_link'><a href="String.html" title="Lazier::String (module)">String</a></span></tt>)</span>
1152
+
1153
+
1154
+ <em class="default">(defaults to: <tt>&quot;&quot;</tt>)</em>
1155
+
1156
+
1157
+ &mdash;
1158
+ <div class='inline'><p>The string to append to the number.</p>
1159
+ </div>
1160
+
1161
+ </li>
1162
+
1163
+ <li>
1164
+
1165
+ <span class='name'>k_separator</span>
1166
+
1167
+
1168
+ <span class='type'>(<tt><span class='object_link'><a href="String.html" title="Lazier::String (module)">String</a></span></tt>)</span>
1169
+
1170
+
1171
+ <em class="default">(defaults to: <tt>&quot;,&quot;</tt>)</em>
1172
+
1173
+
1174
+ &mdash;
1175
+ <div class='inline'><p>The string to use as thousands separator.</p>
1176
+ </div>
1177
+
1178
+ </li>
1179
+
1180
+ </ul>
1181
+
1182
+ <p class="tag_title">Returns:</p>
1183
+ <ul class="return">
1184
+
1185
+ <li>
1186
+
1187
+
1188
+ <span class='type'>(<tt><span class='object_link'><a href="Hash.html" title="Lazier::Hash (module)">Hash</a></span></tt>)</span>
1189
+
1190
+
1191
+
1192
+ &mdash;
1193
+ <div class='inline'><p>The new formatters.</p>
1194
+ </div>
1195
+
1196
+ </li>
1197
+
1198
+ </ul>
1199
+
1200
+ <p class="tag_title">See Also:</p>
1201
+ <ul class="see">
1202
+
1203
+ <li><span class='object_link'><a href="Object.html#format_number-instance_method" title="Lazier::Object#format_number (method)">Object#format_number</a></span></li>
1204
+
1205
+ </ul>
1206
+
1207
+ </div><table class="source_code">
1208
+ <tr>
1209
+ <td>
1210
+ <pre class="lines">
1211
+
1212
+
1213
+ 45
1214
+ 46
1215
+ 47
1216
+ 48
1217
+ 49
1218
+ 50
1219
+ 51
1220
+ 52</pre>
1221
+ </td>
1222
+ <td>
1223
+ <pre class="code"><span class="info file"># File 'lib/lazier/settings.rb', line 45</span>
1224
+
1225
+ <span class='kw'>def</span> <span class='id identifier rubyid_setup_format_number'>setup_format_number</span><span class='lparen'>(</span><span class='id identifier rubyid_prec'>prec</span> <span class='op'>=</span> <span class='int'>2</span><span class='comma'>,</span> <span class='id identifier rubyid_decimal_separator'>decimal_separator</span> <span class='op'>=</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>.</span><span class='tstring_end'>&quot;</span></span><span class='comma'>,</span> <span class='id identifier rubyid_add_string'>add_string</span> <span class='op'>=</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_end'>&quot;</span></span><span class='comma'>,</span> <span class='id identifier rubyid_k_separator'>k_separator</span> <span class='op'>=</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>,</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span>
1226
+ <span class='ivar'>@format_number</span> <span class='op'>=</span> <span class='lbrace'>{</span>
1227
+ <span class='symbol'>:prec</span> <span class='op'>=&gt;</span> <span class='id identifier rubyid_prec'>prec</span><span class='comma'>,</span>
1228
+ <span class='symbol'>:decimal_separator</span> <span class='op'>=&gt;</span> <span class='id identifier rubyid_decimal_separator'>decimal_separator</span><span class='comma'>,</span>
1229
+ <span class='symbol'>:add_string</span> <span class='op'>=&gt;</span> <span class='id identifier rubyid_add_string'>add_string</span><span class='comma'>,</span>
1230
+ <span class='symbol'>:k_separator</span> <span class='op'>=&gt;</span> <span class='id identifier rubyid_k_separator'>k_separator</span>
1231
+ <span class='rbrace'>}</span>
1232
+ <span class='kw'>end</span></pre>
1233
+ </td>
1234
+ </tr>
1235
+ </table>
1236
+ </div>
1237
+
1238
+ </div>
1239
+
1240
+ </div>
1241
+
1242
+ <div id="footer">
1243
+ Generated on Wed Aug 1 08:57:56 2012 by
1244
+ <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
1245
+ 0.8.2.1 (ruby-1.9.2).
1246
+ </div>
1247
+
1248
+ </body>
1249
+ </html>