lazier 2.8.1 → 3.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (48) hide show
  1. data/Gemfile +3 -3
  2. data/doc/Lazier.html +69 -99
  3. data/doc/Lazier/Boolean.html +6 -6
  4. data/doc/Lazier/DateTime.html +35 -39
  5. data/doc/Lazier/DateTime/ClassMethods.html +59 -85
  6. data/doc/Lazier/Exceptions.html +6 -6
  7. data/doc/Lazier/Exceptions/Debug.html +133 -0
  8. data/doc/Lazier/Exceptions/MissingTranslation.html +8 -8
  9. data/doc/Lazier/Hash.html +5 -270
  10. data/doc/Lazier/I18n.html +68 -26
  11. data/doc/Lazier/Localizer.html +17 -21
  12. data/doc/Lazier/Math.html +5 -5
  13. data/doc/Lazier/Math/ClassMethods.html +5 -5
  14. data/doc/Lazier/Object.html +681 -218
  15. data/doc/Lazier/Pathname.html +7 -11
  16. data/doc/Lazier/Settings.html +166 -262
  17. data/doc/Lazier/String.html +21 -25
  18. data/doc/Lazier/TimeZone.html +119 -130
  19. data/doc/Lazier/TimeZone/ClassMethods.html +75 -83
  20. data/doc/Lazier/Version.html +8 -8
  21. data/doc/_index.html +7 -7
  22. data/doc/class_list.html +2 -2
  23. data/doc/file.README.html +5 -5
  24. data/doc/file_list.html +1 -1
  25. data/doc/frames.html +1 -1
  26. data/doc/index.html +5 -5
  27. data/doc/js/full_list.js +6 -1
  28. data/doc/method_list.html +134 -324
  29. data/doc/top-level-namespace.html +5 -5
  30. data/lazier.gemspec +4 -3
  31. data/lib/lazier.rb +9 -23
  32. data/lib/lazier/boolean.rb +1 -1
  33. data/lib/lazier/datetime.rb +47 -79
  34. data/lib/lazier/exceptions.rb +4 -4
  35. data/lib/lazier/hash.rb +0 -24
  36. data/lib/lazier/i18n.rb +13 -6
  37. data/lib/lazier/localizer.rb +3 -5
  38. data/lib/lazier/object.rb +107 -78
  39. data/lib/lazier/pathname.rb +1 -3
  40. data/lib/lazier/settings.rb +22 -30
  41. data/lib/lazier/string.rb +3 -5
  42. data/lib/lazier/version.rb +3 -3
  43. data/spec/lazier/datetime_spec.rb +8 -8
  44. data/spec/lazier/hash_spec.rb +9 -10
  45. data/spec/lazier/object_spec.rb +85 -11
  46. data/spec/lazier/settings_spec.rb +10 -17
  47. data/spec/lazier_spec.rb +1 -1
  48. metadata +26 -9
@@ -6,13 +6,13 @@
6
6
  <title>
7
7
  Class: Lazier::Localizer
8
8
 
9
- &mdash; Documentation by YARD 0.8.5.2
9
+ &mdash; Documentation by YARD 0.8.6.1
10
10
 
11
11
  </title>
12
12
 
13
- <link rel="stylesheet" href="../css/style.css" type="text/css" media="screen" charset="utf-8" />
13
+ <link rel="stylesheet" href="../css/style.css" type="text/css" charset="utf-8" />
14
14
 
15
- <link rel="stylesheet" href="../css/common.css" type="text/css" media="screen" charset="utf-8" />
15
+ <link rel="stylesheet" href="../css/common.css" type="text/css" charset="utf-8" />
16
16
 
17
17
  <script type="text/javascript" charset="utf-8">
18
18
  hasFrames = window.top.frames.main ? true : false;
@@ -313,17 +313,13 @@
313
313
  17
314
314
  18
315
315
  19
316
- 20
317
- 21
318
- 22</pre>
316
+ 20</pre>
319
317
  </td>
320
318
  <td>
321
319
  <pre class="code"><span class="info file"># File 'lib/lazier/localizer.rb', line 17</span>
322
320
 
323
321
  <span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span><span class='lparen'>(</span><span class='id identifier rubyid_root'>root</span> <span class='op'>=</span> <span class='kw'>nil</span><span class='comma'>,</span> <span class='id identifier rubyid_path'>path</span> <span class='op'>=</span> <span class='kw'>nil</span><span class='comma'>,</span> <span class='id identifier rubyid_locale'>locale</span> <span class='op'>=</span> <span class='kw'>nil</span><span class='rparen'>)</span>
324
- <span class='id identifier rubyid_root'>root</span> <span class='op'>||=</span> <span class='symbol'>:lazier</span>
325
- <span class='id identifier rubyid_path'>path</span> <span class='op'>||=</span> <span class='op'>::</span><span class='const'>File</span><span class='period'>.</span><span class='id identifier rubyid_absolute_path'>absolute_path</span><span class='lparen'>(</span><span class='op'>::</span><span class='const'>Pathname</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='op'>::</span><span class='const'>File</span><span class='period'>.</span><span class='id identifier rubyid_dirname'>dirname</span><span class='lparen'>(</span><span class='kw'>__FILE__</span><span class='rparen'>)</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_to_s'>to_s</span> <span class='op'>+</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>/../../locales/</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span>
326
- <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_i18n_setup'>i18n_setup</span><span class='lparen'>(</span><span class='id identifier rubyid_root'>root</span><span class='comma'>,</span> <span class='id identifier rubyid_path'>path</span><span class='rparen'>)</span>
322
+ <span class='id identifier rubyid_i18n_setup'>i18n_setup</span><span class='lparen'>(</span><span class='id identifier rubyid_root'>root</span> <span class='op'>||</span> <span class='symbol'>:lazier</span><span class='comma'>,</span> <span class='id identifier rubyid_path'>path</span> <span class='op'>||</span> <span class='op'>::</span><span class='const'>File</span><span class='period'>.</span><span class='id identifier rubyid_absolute_path'>absolute_path</span><span class='lparen'>(</span><span class='op'>::</span><span class='const'>Pathname</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='op'>::</span><span class='const'>File</span><span class='period'>.</span><span class='id identifier rubyid_dirname'>dirname</span><span class='lparen'>(</span><span class='kw'>__FILE__</span><span class='rparen'>)</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_to_s'>to_s</span> <span class='op'>+</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>/../../locales/</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span><span class='rparen'>)</span>
327
323
  <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_i18n'>i18n</span> <span class='op'>=</span> <span class='id identifier rubyid_locale'>locale</span>
328
324
  <span class='kw'>end</span></pre>
329
325
  </td>
@@ -414,15 +410,15 @@
414
410
  <pre class="lines">
415
411
 
416
412
 
417
- 29
418
- 30
419
- 31</pre>
413
+ 27
414
+ 28
415
+ 29</pre>
420
416
  </td>
421
417
  <td>
422
- <pre class="code"><span class="info file"># File 'lib/lazier/localizer.rb', line 29</span>
418
+ <pre class="code"><span class="info file"># File 'lib/lazier/localizer.rb', line 27</span>
423
419
 
424
420
  <span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_localize'>localize</span><span class='lparen'>(</span><span class='id identifier rubyid_message'>message</span><span class='comma'>,</span> <span class='op'>*</span><span class='id identifier rubyid_args'>args</span><span class='rparen'>)</span>
425
- <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='period'>.</span><span class='id identifier rubyid_i18n'>i18n</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='comma'>,</span> <span class='op'>*</span><span class='id identifier rubyid_args'>args</span><span class='rparen'>)</span>
421
+ <span class='const'>Lazier</span><span class='op'>::</span><span class='const'>Localizer</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='period'>.</span><span class='id identifier rubyid_i18n'>i18n</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='comma'>,</span> <span class='op'>*</span><span class='id identifier rubyid_args'>args</span><span class='rparen'>)</span>
426
422
  <span class='kw'>end</span></pre>
427
423
  </td>
428
424
  </tr>
@@ -520,15 +516,15 @@
520
516
  <pre class="lines">
521
517
 
522
518
 
523
- 39
524
- 40
525
- 41</pre>
519
+ 37
520
+ 38
521
+ 39</pre>
526
522
  </td>
527
523
  <td>
528
- <pre class="code"><span class="info file"># File 'lib/lazier/localizer.rb', line 39</span>
524
+ <pre class="code"><span class="info file"># File 'lib/lazier/localizer.rb', line 37</span>
529
525
 
530
526
  <span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_localize_on_locale'>localize_on_locale</span><span class='lparen'>(</span><span class='id identifier rubyid_locale'>locale</span><span class='comma'>,</span> <span class='id identifier rubyid_message'>message</span><span class='comma'>,</span> <span class='op'>*</span><span class='id identifier rubyid_args'>args</span><span class='rparen'>)</span>
531
- <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='kw'>nil</span><span class='comma'>,</span> <span class='kw'>nil</span><span class='comma'>,</span> <span class='id identifier rubyid_locale'>locale</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_i18n'>i18n</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='comma'>,</span> <span class='op'>*</span><span class='id identifier rubyid_args'>args</span><span class='rparen'>)</span>
527
+ <span class='const'>Lazier</span><span class='op'>::</span><span class='const'>Localizer</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='kw'>nil</span><span class='comma'>,</span> <span class='kw'>nil</span><span class='comma'>,</span> <span class='id identifier rubyid_locale'>locale</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_i18n'>i18n</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='comma'>,</span> <span class='op'>*</span><span class='id identifier rubyid_args'>args</span><span class='rparen'>)</span>
532
528
  <span class='kw'>end</span></pre>
533
529
  </td>
534
530
  </tr>
@@ -540,9 +536,9 @@
540
536
  </div>
541
537
 
542
538
  <div id="footer">
543
- Generated on Sat Apr 13 11:56:54 2013 by
539
+ Generated on Fri May 17 12:03:22 2013 by
544
540
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
545
- 0.8.5.2 (ruby-1.9.3).
541
+ 0.8.6.1 (ruby-1.9.3).
546
542
  </div>
547
543
 
548
544
  </body>
data/doc/Lazier/Math.html CHANGED
@@ -6,13 +6,13 @@
6
6
  <title>
7
7
  Module: Lazier::Math
8
8
 
9
- &mdash; Documentation by YARD 0.8.5.2
9
+ &mdash; Documentation by YARD 0.8.6.1
10
10
 
11
11
  </title>
12
12
 
13
- <link rel="stylesheet" href="../css/style.css" type="text/css" media="screen" charset="utf-8" />
13
+ <link rel="stylesheet" href="../css/style.css" type="text/css" charset="utf-8" />
14
14
 
15
- <link rel="stylesheet" href="../css/common.css" type="text/css" media="screen" charset="utf-8" />
15
+ <link rel="stylesheet" href="../css/common.css" type="text/css" charset="utf-8" />
16
16
 
17
17
  <script type="text/javascript" charset="utf-8">
18
18
  hasFrames = window.top.frames.main ? true : false;
@@ -121,9 +121,9 @@
121
121
  </div>
122
122
 
123
123
  <div id="footer">
124
- Generated on Sat Apr 13 11:56:53 2013 by
124
+ Generated on Fri May 17 12:03:20 2013 by
125
125
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
126
- 0.8.5.2 (ruby-1.9.3).
126
+ 0.8.6.1 (ruby-1.9.3).
127
127
  </div>
128
128
 
129
129
  </body>
@@ -6,13 +6,13 @@
6
6
  <title>
7
7
  Module: Lazier::Math::ClassMethods
8
8
 
9
- &mdash; Documentation by YARD 0.8.5.2
9
+ &mdash; Documentation by YARD 0.8.6.1
10
10
 
11
11
  </title>
12
12
 
13
- <link rel="stylesheet" href="../../css/style.css" type="text/css" media="screen" charset="utf-8" />
13
+ <link rel="stylesheet" href="../../css/style.css" type="text/css" charset="utf-8" />
14
14
 
15
- <link rel="stylesheet" href="../../css/common.css" type="text/css" media="screen" charset="utf-8" />
15
+ <link rel="stylesheet" href="../../css/common.css" type="text/css" charset="utf-8" />
16
16
 
17
17
  <script type="text/javascript" charset="utf-8">
18
18
  hasFrames = window.top.frames.main ? true : false;
@@ -321,9 +321,9 @@
321
321
  </div>
322
322
 
323
323
  <div id="footer">
324
- Generated on Sat Apr 13 11:56:53 2013 by
324
+ Generated on Fri May 17 12:03:21 2013 by
325
325
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
326
- 0.8.5.2 (ruby-1.9.3).
326
+ 0.8.6.1 (ruby-1.9.3).
327
327
  </div>
328
328
 
329
329
  </body>
@@ -6,13 +6,13 @@
6
6
  <title>
7
7
  Module: Lazier::Object
8
8
 
9
- &mdash; Documentation by YARD 0.8.5.2
9
+ &mdash; Documentation by YARD 0.8.6.1
10
10
 
11
11
  </title>
12
12
 
13
- <link rel="stylesheet" href="../css/style.css" type="text/css" media="screen" charset="utf-8" />
13
+ <link rel="stylesheet" href="../css/style.css" type="text/css" charset="utf-8" />
14
14
 
15
- <link rel="stylesheet" href="../css/common.css" type="text/css" media="screen" charset="utf-8" />
15
+ <link rel="stylesheet" href="../css/common.css" type="text/css" charset="utf-8" />
16
16
 
17
17
  <script type="text/javascript" charset="utf-8">
18
18
  hasFrames = window.top.frames.main ? true : false;
@@ -103,6 +103,73 @@
103
103
 
104
104
 
105
105
  </div>
106
+ <h2>Constant Summary</h2>
107
+
108
+ <dl class="constants">
109
+
110
+ <dt id="BOOLEAN_MATCHER-constant" class="">BOOLEAN_MATCHER =
111
+ <div class="docstring">
112
+ <div class="discussion">
113
+ <p>Expression to match a boolean value.</p>
114
+
115
+
116
+ </div>
117
+ </div>
118
+ <div class="tags">
119
+
120
+
121
+ </div>
122
+ </dt>
123
+ <dd><pre class="code"><span class='tstring'><span class='regexp_beg'>/</span><span class='tstring_content'>^(\s*(1|0|true|false|yes|no|t|f|y|n)\s*)$</span><span class='regexp_end'>/i</span></span></pre></dd>
124
+
125
+ <dt id="BOOLEAN_TRUE_MATCHER-constant" class="">BOOLEAN_TRUE_MATCHER =
126
+ <div class="docstring">
127
+ <div class="discussion">
128
+ <p>Expression to match a true value.</p>
129
+
130
+
131
+ </div>
132
+ </div>
133
+ <div class="tags">
134
+
135
+
136
+ </div>
137
+ </dt>
138
+ <dd><pre class="code"><span class='tstring'><span class='regexp_beg'>/</span><span class='tstring_content'>^(\s*(1|true|yes|t|y)\s*)$</span><span class='regexp_end'>/i</span></span></pre></dd>
139
+
140
+ <dt id="INTEGER_MATCHER-constant" class="">INTEGER_MATCHER =
141
+ <div class="docstring">
142
+ <div class="discussion">
143
+ <p>Expression to match a integer value.</p>
144
+
145
+
146
+ </div>
147
+ </div>
148
+ <div class="tags">
149
+
150
+
151
+ </div>
152
+ </dt>
153
+ <dd><pre class="code"><span class='tstring'><span class='regexp_beg'>/</span><span class='tstring_content'>^([+-]?)(\d+)$</span><span class='regexp_end'>/</span></span></pre></dd>
154
+
155
+ <dt id="FLOAT_MATCHER-constant" class="">FLOAT_MATCHER =
156
+ <div class="docstring">
157
+ <div class="discussion">
158
+ <p>Expression to match a float value.</p>
159
+
160
+
161
+ </div>
162
+ </div>
163
+ <div class="tags">
164
+
165
+
166
+ </div>
167
+ </dt>
168
+ <dd><pre class="code"><span class='tstring'><span class='regexp_beg'>/</span><span class='tstring_content'>^([+-]?)(\d+)([.,]\d+)?$</span><span class='regexp_end'>/</span></span></pre></dd>
169
+
170
+ </dl>
171
+
172
+
106
173
 
107
174
 
108
175
 
@@ -120,7 +187,7 @@
120
187
  <li class="public ">
121
188
  <span class="summary_signature">
122
189
 
123
- <a href="#debug_dump-instance_method" title="#debug_dump (instance method)">- (String) <strong>debug_dump</strong>(format = :yaml, must_raise = true) </a>
190
+ <a href="#analyze-instance_method" title="#analyze (instance method)">- (String) <strong>analyze</strong>(format = :yaml, as_exception = true) </a>
124
191
 
125
192
 
126
193
 
@@ -143,7 +210,30 @@
143
210
  <li class="public ">
144
211
  <span class="summary_signature">
145
212
 
146
- <a href="#ensure_array-instance_method" title="#ensure_array (instance method)">- (Array) <strong>ensure_array</strong> </a>
213
+ <a href="#ensure-instance_method" title="#ensure (instance method)">- (String) <strong>ensure</strong>(default_value, verifier = :blank?) </a>
214
+
215
+
216
+
217
+ </span>
218
+
219
+
220
+
221
+
222
+
223
+
224
+
225
+
226
+
227
+ <span class="summary_desc"><div class='inline'><p>Makes sure that the object is set to something meaningful.</p>
228
+ </div></span>
229
+
230
+ </li>
231
+
232
+
233
+ <li class="public ">
234
+ <span class="summary_signature">
235
+
236
+ <a href="#ensure_array-instance_method" title="#ensure_array (instance method)">- (Array) <strong>ensure_array</strong>(default_value = nil, uniq = false, compact = false, sanitizer = nil, &amp;block) </a>
147
237
 
148
238
 
149
239
 
@@ -166,7 +256,30 @@
166
256
  <li class="public ">
167
257
  <span class="summary_signature">
168
258
 
169
- <a href="#ensure_string-instance_method" title="#ensure_string (instance method)">- (String) <strong>ensure_string</strong> </a>
259
+ <a href="#ensure_hash-instance_method" title="#ensure_hash (instance method)">- (Hash) <strong>ensure_hash</strong>(default_value = nil, sanitizer = nil) </a>
260
+
261
+
262
+
263
+ </span>
264
+
265
+
266
+
267
+
268
+
269
+
270
+
271
+
272
+
273
+ <span class="summary_desc"><div class='inline'><p>Makes sure that the object is an hash.</p>
274
+ </div></span>
275
+
276
+ </li>
277
+
278
+
279
+ <li class="public ">
280
+ <span class="summary_signature">
281
+
282
+ <a href="#ensure_string-instance_method" title="#ensure_string (instance method)">- (String) <strong>ensure_string</strong>(default_value = &quot;&quot;, stringifier = :to_s) </a>
170
283
 
171
284
 
172
285
 
@@ -212,7 +325,7 @@
212
325
  <li class="public ">
213
326
  <span class="summary_signature">
214
327
 
215
- <a href="#format_number-instance_method" title="#format_number (instance method)">- (String) <strong>format_number</strong>(prec = nil, decimal_separator = nil, add_string = nil, k_separator = nil) </a>
328
+ <a href="#format_number-instance_method" title="#format_number (instance method)">- (String) <strong>format_number</strong>(precision = nil, decimal_separator = nil, add_string = nil, k_separator = nil) </a>
216
329
 
217
330
 
218
331
 
@@ -235,7 +348,7 @@
235
348
  <li class="public ">
236
349
  <span class="summary_signature">
237
350
 
238
- <a href="#is_boolean%3F-instance_method" title="#is_boolean? (instance method)">- (Boolean) <strong>is_boolean?</strong> </a>
351
+ <a href="#indexize-instance_method" title="#indexize (instance method)">- (String) <strong>indexize</strong>(length = 2, filler = &quot;0&quot;, formatter = :rjust) </a>
239
352
 
240
353
 
241
354
 
@@ -249,7 +362,7 @@
249
362
 
250
363
 
251
364
 
252
- <span class="summary_desc"><div class='inline'><p>Checks if the object is a valid boolean value.</p>
365
+ <span class="summary_desc"><div class='inline'><p>Prepares an object to be printed in list summaries, like <code>[01/04] Opening this...</code>.</p>
253
366
  </div></span>
254
367
 
255
368
  </li>
@@ -258,7 +371,7 @@
258
371
  <li class="public ">
259
372
  <span class="summary_signature">
260
373
 
261
- <a href="#is_float%3F-instance_method" title="#is_float? (instance method)">- (Boolean) <strong>is_float?</strong> </a>
374
+ <a href="#is_boolean%3F-instance_method" title="#is_boolean? (instance method)">- (Boolean) <strong>is_boolean?</strong> </a>
262
375
 
263
376
 
264
377
 
@@ -272,7 +385,7 @@
272
385
 
273
386
 
274
387
 
275
- <span class="summary_desc"><div class='inline'><p>Checks if the object is a valid float.</p>
388
+ <span class="summary_desc"><div class='inline'><p>Checks if the object is a valid boolean value.</p>
276
389
  </div></span>
277
390
 
278
391
  </li>
@@ -281,10 +394,12 @@
281
394
  <li class="public ">
282
395
  <span class="summary_signature">
283
396
 
284
- <a href="#is_integer%3F-instance_method" title="#is_integer? (instance method)">- (Boolean) <strong>is_integer?</strong> </a>
397
+ <a href="#is_float%3F-instance_method" title="#is_float? (instance method)">- (Boolean) <strong>is_float?</strong> </a>
285
398
 
286
399
 
287
400
 
401
+ (also: #is_number?)
402
+
288
403
  </span>
289
404
 
290
405
 
@@ -295,7 +410,7 @@
295
410
 
296
411
 
297
412
 
298
- <span class="summary_desc"><div class='inline'><p>Checks if the object is a valid integer.</p>
413
+ <span class="summary_desc"><div class='inline'><p>Checks if the object is a valid float.</p>
299
414
  </div></span>
300
415
 
301
416
  </li>
@@ -304,7 +419,7 @@
304
419
  <li class="public ">
305
420
  <span class="summary_signature">
306
421
 
307
- <a href="#is_number%3F-instance_method" title="#is_number? (instance method)">- (Boolean) <strong>is_number?</strong> </a>
422
+ <a href="#is_integer%3F-instance_method" title="#is_integer? (instance method)">- (Boolean) <strong>is_integer?</strong> </a>
308
423
 
309
424
 
310
425
 
@@ -318,7 +433,7 @@
318
433
 
319
434
 
320
435
 
321
- <span class="summary_desc"><div class='inline'><p>Checks if the object is a valid number.</p>
436
+ <span class="summary_desc"><div class='inline'><p>Checks if the object is a valid integer.</p>
322
437
  </div></span>
323
438
 
324
439
  </li>
@@ -350,7 +465,7 @@
350
465
  <li class="public ">
351
466
  <span class="summary_signature">
352
467
 
353
- <a href="#round_to_precision-instance_method" title="#round_to_precision (instance method)">- (Float) <strong>round_to_precision</strong>(prec = 2) </a>
468
+ <a href="#round_to_precision-instance_method" title="#round_to_precision (instance method)">- (Float) <strong>round_to_precision</strong>(precision = 2) </a>
354
469
 
355
470
 
356
471
 
@@ -451,9 +566,9 @@
451
566
 
452
567
 
453
568
  <div class="method_details first">
454
- <h3 class="signature first" id="debug_dump-instance_method">
569
+ <h3 class="signature first" id="analyze-instance_method">
455
570
 
456
- - (<tt><span class='object_link'><a href="String.html" title="Lazier::String (module)">String</a></span></tt>) <strong>debug_dump</strong>(format = :yaml, must_raise = true)
571
+ - (<tt><span class='object_link'><a href="String.html" title="Lazier::String (module)">String</a></span></tt>) <strong>analyze</strong>(format = :yaml, as_exception = true)
457
572
 
458
573
 
459
574
 
@@ -489,7 +604,7 @@
489
604
 
490
605
  <li>
491
606
 
492
- <span class='name'>must_raise</span>
607
+ <span class='name'>as_exception</span>
493
608
 
494
609
 
495
610
  <span class='type'>(<tt><span class='object_link'><a href="Boolean.html" title="Lazier::Boolean (module)">Boolean</a></span></tt>)</span>
@@ -499,7 +614,7 @@
499
614
 
500
615
 
501
616
  &mdash;
502
- <div class='inline'><p>If raise a Dump exception.</p>
617
+ <div class='inline'><p>If raise an exception.</p>
503
618
  </div>
504
619
 
505
620
  </li>
@@ -530,39 +645,124 @@
530
645
  <pre class="lines">
531
646
 
532
647
 
533
- 157
534
- 158
535
- 159
536
- 160
537
- 161
538
- 162
539
- 163
540
- 164
541
- 165
542
- 166
543
- 167
544
- 168
545
- 169
546
- 170
547
- 171</pre>
648
+ 191
649
+ 192
650
+ 193
651
+ 194
652
+ 195
653
+ 196
654
+ 197
655
+ 198
656
+ 199
657
+ 200</pre>
548
658
  </td>
549
659
  <td>
550
- <pre class="code"><span class="info file"># File 'lib/lazier/object.rb', line 157</span>
551
-
552
- <span class='kw'>def</span> <span class='id identifier rubyid_debug_dump'>debug_dump</span><span class='lparen'>(</span><span class='id identifier rubyid_format'>format</span> <span class='op'>=</span> <span class='symbol'>:yaml</span><span class='comma'>,</span> <span class='id identifier rubyid_must_raise'>must_raise</span> <span class='op'>=</span> <span class='kw'>true</span><span class='rparen'>)</span>
553
- <span class='id identifier rubyid_rv'>rv</span> <span class='op'>=</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_end'>&quot;</span></span>
660
+ <pre class="code"><span class="info file"># File 'lib/lazier/object.rb', line 191</span>
554
661
 
555
- <span class='kw'>begin</span>
556
- <span class='kw'>if</span> <span class='id identifier rubyid_format'>format</span> <span class='op'>==</span> <span class='symbol'>:pretty_json</span> <span class='kw'>then</span>
557
- <span class='id identifier rubyid_rv'>rv</span> <span class='op'>=</span> <span class='op'>::</span><span class='const'>JSON</span><span class='period'>.</span><span class='id identifier rubyid_pretty_generate'>pretty_generate</span><span class='lparen'>(</span><span class='kw'>self</span><span class='rparen'>)</span>
662
+ <span class='kw'>def</span> <span class='id identifier rubyid_analyze'>analyze</span><span class='lparen'>(</span><span class='id identifier rubyid_format'>format</span> <span class='op'>=</span> <span class='symbol'>:yaml</span><span class='comma'>,</span> <span class='id identifier rubyid_as_exception'>as_exception</span> <span class='op'>=</span> <span class='kw'>true</span><span class='rparen'>)</span>
663
+ <span class='id identifier rubyid_rv'>rv</span> <span class='op'>=</span> <span class='kw'>case</span> <span class='id identifier rubyid_format'>format</span>
664
+ <span class='kw'>when</span> <span class='symbol'>:pretty_json</span>
665
+ <span class='op'>::</span><span class='const'>JSON</span><span class='period'>.</span><span class='id identifier rubyid_pretty_generate'>pretty_generate</span><span class='lparen'>(</span><span class='kw'>self</span><span class='rparen'>)</span>
558
666
  <span class='kw'>else</span>
559
- <span class='id identifier rubyid_rv'>rv</span> <span class='op'>=</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_send'>send</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>to_</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_format'>format</span><span class='rbrace'>}</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span>
560
- <span class='kw'>end</span>
561
- <span class='kw'>rescue</span>
562
- <span class='id identifier rubyid_rv'>rv</span> <span class='op'>=</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_inspect'>inspect</span>
667
+ <span class='id identifier rubyid_send'>send</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>to_</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_format'>format</span><span class='rbrace'>}</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span>
563
668
  <span class='kw'>end</span>
564
669
 
565
- <span class='id identifier rubyid_must_raise'>must_raise</span> <span class='op'>?</span> <span class='id identifier rubyid_raise'>raise</span><span class='lparen'>(</span><span class='op'>::</span><span class='const'>Lazier</span><span class='op'>::</span><span class='const'>Exceptions</span><span class='op'>::</span><span class='const'>Dump</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='id identifier rubyid_rv'>rv</span><span class='rparen'>)</span><span class='rparen'>)</span> <span class='op'>:</span> <span class='id identifier rubyid_rv'>rv</span>
670
+ <span class='id identifier rubyid_as_exception'>as_exception</span> <span class='op'>?</span> <span class='id identifier rubyid_raise'>raise</span><span class='lparen'>(</span><span class='op'>::</span><span class='const'>Lazier</span><span class='op'>::</span><span class='const'>Exceptions</span><span class='op'>::</span><span class='const'>Debug</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='id identifier rubyid_rv'>rv</span><span class='rparen'>)</span><span class='rparen'>)</span> <span class='op'>:</span> <span class='id identifier rubyid_rv'>rv</span>
671
+ <span class='kw'>end</span></pre>
672
+ </td>
673
+ </tr>
674
+ </table>
675
+ </div>
676
+
677
+ <div class="method_details ">
678
+ <h3 class="signature " id="ensure-instance_method">
679
+
680
+ - (<tt><span class='object_link'><a href="String.html" title="Lazier::String (module)">String</a></span></tt>) <strong>ensure</strong>(default_value, verifier = :blank?)
681
+
682
+
683
+
684
+
685
+
686
+ </h3><div class="docstring">
687
+ <div class="discussion">
688
+ <p>Makes sure that the object is set to something meaningful.</p>
689
+
690
+
691
+ </div>
692
+ </div>
693
+ <div class="tags">
694
+ <p class="tag_title">Parameters:</p>
695
+ <ul class="param">
696
+
697
+ <li>
698
+
699
+ <span class='name'>default_value</span>
700
+
701
+
702
+ <span class='type'>(<tt><span class='object_link'><a href="String.html" title="Lazier::String (module)">String</a></span></tt>)</span>
703
+
704
+
705
+
706
+ &mdash;
707
+ <div class='inline'><p>The default value to return if the <code>verifier</code> or the block returns true.</p>
708
+ </div>
709
+
710
+ </li>
711
+
712
+ <li>
713
+
714
+ <span class='name'>verifier</span>
715
+
716
+
717
+ <span class='type'>(<tt>Symbol</tt>)</span>
718
+
719
+
720
+ <em class="default">(defaults to: <tt>:blank?</tt>)</em>
721
+
722
+
723
+ &mdash;
724
+ <div class='inline'><p>The method used to verify if the object is NOT meaningful. <em>Ignored if a block is passed.</em></p>
725
+ </div>
726
+
727
+ </li>
728
+
729
+ </ul>
730
+
731
+ <p class="tag_title">Returns:</p>
732
+ <ul class="return">
733
+
734
+ <li>
735
+
736
+
737
+ <span class='type'>(<tt><span class='object_link'><a href="String.html" title="Lazier::String (module)">String</a></span></tt>)</span>
738
+
739
+
740
+
741
+ &mdash;
742
+ <div class='inline'><p>The current object or the <code>default_value</code>.</p>
743
+ </div>
744
+
745
+ </li>
746
+
747
+ </ul>
748
+
749
+ </div><table class="source_code">
750
+ <tr>
751
+ <td>
752
+ <pre class="lines">
753
+
754
+
755
+ 59
756
+ 60
757
+ 61
758
+ 62</pre>
759
+ </td>
760
+ <td>
761
+ <pre class="code"><span class="info file"># File 'lib/lazier/object.rb', line 59</span>
762
+
763
+ <span class='kw'>def</span> <span class='kw'>ensure</span><span class='lparen'>(</span><span class='id identifier rubyid_default_value'>default_value</span><span class='comma'>,</span> <span class='id identifier rubyid_verifier'>verifier</span> <span class='op'>=</span> <span class='symbol'>:blank?</span><span class='rparen'>)</span>
764
+ <span class='id identifier rubyid_valid'>valid</span> <span class='op'>=</span> <span class='id identifier rubyid_block_given?'>block_given?</span> <span class='op'>?</span> <span class='kw'>yield</span><span class='lparen'>(</span><span class='kw'>self</span><span class='rparen'>)</span> <span class='op'>:</span> <span class='id identifier rubyid_send'>send</span><span class='lparen'>(</span><span class='id identifier rubyid_verifier'>verifier</span><span class='rparen'>)</span>
765
+ <span class='op'>!</span><span class='id identifier rubyid_valid'>valid</span> <span class='op'>?</span> <span class='kw'>self</span> <span class='op'>:</span> <span class='id identifier rubyid_default_value'>default_value</span>
566
766
  <span class='kw'>end</span></pre>
567
767
  </td>
568
768
  </tr>
@@ -572,7 +772,7 @@
572
772
  <div class="method_details ">
573
773
  <h3 class="signature " id="ensure_array-instance_method">
574
774
 
575
- - (<tt>Array</tt>) <strong>ensure_array</strong>
775
+ - (<tt>Array</tt>) <strong>ensure_array</strong>(default_value = nil, uniq = false, compact = false, sanitizer = nil, &amp;block)
576
776
 
577
777
 
578
778
 
@@ -586,7 +786,94 @@
586
786
  </div>
587
787
  </div>
588
788
  <div class="tags">
789
+ <p class="tag_title">Parameters:</p>
790
+ <ul class="param">
791
+
792
+ <li>
793
+
794
+ <span class='name'>default_value</span>
795
+
796
+
797
+ <span class='type'>(<tt>Array|NilClass</tt>)</span>
798
+
799
+
800
+ <em class="default">(defaults to: <tt>nil</tt>)</em>
801
+
802
+
803
+ &mdash;
804
+ <div class='inline'><p>The default array to use. If not specified, an array containing the object is returned.</p>
805
+ </div>
806
+
807
+ </li>
808
+
809
+ <li>
810
+
811
+ <span class='name'>uniq</span>
812
+
813
+
814
+ <span class='type'>(<tt><span class='object_link'><a href="Boolean.html" title="Lazier::Boolean (module)">Boolean</a></span></tt>)</span>
815
+
816
+
817
+ <em class="default">(defaults to: <tt>false</tt>)</em>
818
+
819
+
820
+ &mdash;
821
+ <div class='inline'><p>If to remove duplicates from the array before sanitizing.</p>
822
+ </div>
823
+
824
+ </li>
825
+
826
+ <li>
827
+
828
+ <span class='name'>compact</span>
829
+
830
+
831
+ <span class='type'>(<tt><span class='object_link'><a href="Boolean.html" title="Lazier::Boolean (module)">Boolean</a></span></tt>)</span>
832
+
833
+
834
+ <em class="default">(defaults to: <tt>false</tt>)</em>
835
+
836
+
837
+ &mdash;
838
+ <div class='inline'><p>If to compact the array before sanitizing.</p>
839
+ </div>
840
+
841
+ </li>
842
+
843
+ <li>
844
+
845
+ <span class='name'>sanitizer</span>
846
+
847
+
848
+ <span class='type'>(<tt>Symbol|nil</tt>)</span>
849
+
850
+
851
+ <em class="default">(defaults to: <tt>nil</tt>)</em>
852
+
853
+
854
+ &mdash;
855
+ <div class='inline'><p>If not <code>nil</code>, the method to use to sanitize entries of the array. <em>Ignored if a block is present.</em></p>
856
+ </div>
857
+
858
+ </li>
859
+
860
+ <li>
861
+
862
+ <span class='name'>block</span>
863
+
864
+
865
+ <span class='type'>(<tt>Proc</tt>)</span>
866
+
867
+
868
+
869
+ &mdash;
870
+ <div class='inline'><p>A block to sanitize entries. It must accept the value as unique argument.</p>
871
+ </div>
872
+
873
+ </li>
589
874
 
875
+ </ul>
876
+
590
877
  <p class="tag_title">Returns:</p>
591
878
  <ul class="return">
592
879
 
@@ -611,15 +898,150 @@
611
898
  <pre class="lines">
612
899
 
613
900
 
614
- 59
615
- 60
616
- 61</pre>
901
+ 81
902
+ 82
903
+ 83
904
+ 84
905
+ 85
906
+ 86
907
+ 87</pre>
617
908
  </td>
618
909
  <td>
619
- <pre class="code"><span class="info file"># File 'lib/lazier/object.rb', line 59</span>
910
+ <pre class="code"><span class="info file"># File 'lib/lazier/object.rb', line 81</span>
911
+
912
+ <span class='kw'>def</span> <span class='id identifier rubyid_ensure_array'>ensure_array</span><span class='lparen'>(</span><span class='id identifier rubyid_default_value'>default_value</span> <span class='op'>=</span> <span class='kw'>nil</span><span class='comma'>,</span> <span class='id identifier rubyid_uniq'>uniq</span> <span class='op'>=</span> <span class='kw'>false</span><span class='comma'>,</span> <span class='id identifier rubyid_compact'>compact</span> <span class='op'>=</span> <span class='kw'>false</span><span class='comma'>,</span> <span class='id identifier rubyid_sanitizer'>sanitizer</span> <span class='op'>=</span> <span class='kw'>nil</span><span class='comma'>,</span> <span class='op'>&amp;</span><span class='id identifier rubyid_block'>block</span><span class='rparen'>)</span>
913
+ <span class='id identifier rubyid_rv'>rv</span> <span class='op'>=</span> <span class='id identifier rubyid_is_a?'>is_a?</span><span class='lparen'>(</span><span class='op'>::</span><span class='const'>Array</span><span class='rparen'>)</span> <span class='op'>?</span> <span class='kw'>self</span> <span class='op'>:</span> <span class='lparen'>(</span><span class='id identifier rubyid_default_value'>default_value</span> <span class='op'>||</span> <span class='lbracket'>[</span><span class='kw'>self</span><span class='rbracket'>]</span><span class='rparen'>)</span>
914
+ <span class='id identifier rubyid_rv'>rv</span><span class='period'>.</span><span class='id identifier rubyid_collect!'>collect!</span><span class='lparen'>(</span><span class='op'>&amp;</span><span class='lparen'>(</span><span class='id identifier rubyid_block'>block</span> <span class='op'>||</span> <span class='id identifier rubyid_sanitizer'>sanitizer</span><span class='rparen'>)</span><span class='rparen'>)</span>
915
+ <span class='id identifier rubyid_rv'>rv</span><span class='period'>.</span><span class='id identifier rubyid_uniq!'>uniq!</span> <span class='kw'>if</span> <span class='id identifier rubyid_uniq'>uniq</span>
916
+ <span class='id identifier rubyid_rv'>rv</span><span class='period'>.</span><span class='id identifier rubyid_compact!'>compact!</span> <span class='kw'>if</span> <span class='id identifier rubyid_compact'>compact</span>
917
+ <span class='id identifier rubyid_rv'>rv</span>
918
+ <span class='kw'>end</span></pre>
919
+ </td>
920
+ </tr>
921
+ </table>
922
+ </div>
923
+
924
+ <div class="method_details ">
925
+ <h3 class="signature " id="ensure_hash-instance_method">
926
+
927
+ - (<tt><span class='object_link'><a href="Hash.html" title="Lazier::Hash (module)">Hash</a></span></tt>) <strong>ensure_hash</strong>(default_value = nil, sanitizer = nil)
928
+
929
+
930
+
931
+
932
+
933
+ </h3><div class="docstring">
934
+ <div class="discussion">
935
+ <p>Makes sure that the object is an hash. For non hash objects, return an hash basing on the <code>default_value</code> parameter.</p>
936
+
937
+
938
+ </div>
939
+ </div>
940
+ <div class="tags">
941
+ <p class="tag_title">Parameters:</p>
942
+ <ul class="param">
943
+
944
+ <li>
945
+
946
+ <span class='name'>default_value</span>
947
+
948
+
949
+ <span class='type'>(<tt><span class='object_link'><a href="Hash.html" title="Lazier::Hash (module)">Hash</a></span>|<span class='object_link'><a href="" title="Lazier::Object (module)">Object</a></span>|NilClass</tt>)</span>
950
+
951
+
952
+ <em class="default">(defaults to: <tt>nil</tt>)</em>
953
+
954
+
955
+ &mdash;
956
+ <div class='inline'><p>The default value to use. If it is an <code>Hash</code>, it is returned as value otherwise it is used to build as a key to build an hash with the current object as only value (everything but strings and symbols are mapped to <code>key</code>).</p>
957
+ </div>
958
+
959
+ </li>
960
+
961
+ <li>
962
+
963
+ <span class='name'>sanitizer</span>
964
+
965
+
966
+ <span class='type'>(<tt>Symbol|nil</tt>)</span>
967
+
968
+
969
+ <em class="default">(defaults to: <tt>nil</tt>)</em>
970
+
971
+
972
+ &mdash;
973
+ <div class='inline'><p>If not <code>nil</code>, the method to use to sanitize values of the hash. <em>Ignored if a block is present.</em></p>
974
+ </div>
975
+
976
+ </li>
977
+
978
+ </ul>
979
+
980
+ <p class="tag_title">Returns:</p>
981
+ <ul class="return">
982
+
983
+ <li>
984
+
985
+
986
+ <span class='type'>(<tt><span class='object_link'><a href="Hash.html" title="Lazier::Hash (module)">Hash</a></span></tt>)</span>
987
+
988
+
989
+
990
+ &mdash;
991
+ <div class='inline'><p>If the object is an hash, then the object itself, a hash with the object as single value otherwise.</p>
992
+ </div>
993
+
994
+ </li>
995
+
996
+ </ul>
997
+
998
+ </div><table class="source_code">
999
+ <tr>
1000
+ <td>
1001
+ <pre class="lines">
1002
+
1003
+
1004
+ 94
1005
+ 95
1006
+ 96
1007
+ 97
1008
+ 98
1009
+ 99
1010
+ 100
1011
+ 101
1012
+ 102
1013
+ 103
1014
+ 104
1015
+ 105
1016
+ 106
1017
+ 107
1018
+ 108
1019
+ 109
1020
+ 110
1021
+ 111
1022
+ 112</pre>
1023
+ </td>
1024
+ <td>
1025
+ <pre class="code"><span class="info file"># File 'lib/lazier/object.rb', line 94</span>
1026
+
1027
+ <span class='kw'>def</span> <span class='id identifier rubyid_ensure_hash'>ensure_hash</span><span class='lparen'>(</span><span class='id identifier rubyid_default_value'>default_value</span> <span class='op'>=</span> <span class='kw'>nil</span><span class='comma'>,</span> <span class='id identifier rubyid_sanitizer'>sanitizer</span> <span class='op'>=</span> <span class='kw'>nil</span><span class='rparen'>)</span>
1028
+ <span class='id identifier rubyid_rv'>rv</span> <span class='op'>=</span> <span class='kw'>if</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>
1029
+ <span class='kw'>self</span>
1030
+ <span class='kw'>elsif</span> <span class='id identifier rubyid_default_value'>default_value</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>
1031
+ <span class='id identifier rubyid_default_value'>default_value</span>
1032
+ <span class='kw'>else</span>
1033
+ <span class='id identifier rubyid_key'>key</span> <span class='op'>=</span> <span class='id identifier rubyid_default_value'>default_value</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'>String</span><span class='rparen'>)</span> <span class='op'>||</span> <span class='id identifier rubyid_default_value'>default_value</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'>Symbol</span><span class='rparen'>)</span> <span class='op'>?</span> <span class='id identifier rubyid_default_value'>default_value</span> <span class='op'>:</span> <span class='symbol'>:key</span>
1034
+ <span class='lbrace'>{</span><span class='id identifier rubyid_key'>key</span> <span class='op'>=&gt;</span> <span class='kw'>self</span><span class='rbrace'>}</span>
1035
+ <span class='kw'>end</span>
620
1036
 
621
- <span class='kw'>def</span> <span class='id identifier rubyid_ensure_array'>ensure_array</span>
622
- <span class='kw'>self</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'>Array</span><span class='rparen'>)</span> <span class='op'>?</span> <span class='kw'>self</span> <span class='op'>:</span> <span class='lbracket'>[</span><span class='kw'>self</span><span class='rbracket'>]</span>
1037
+ <span class='kw'>if</span> <span class='id identifier rubyid_block_given?'>block_given?</span> <span class='op'>||</span> <span class='id identifier rubyid_sanitizer'>sanitizer</span> <span class='kw'>then</span>
1038
+ <span class='id identifier rubyid_rv'>rv</span><span class='period'>.</span><span class='id identifier rubyid_inject'>inject</span><span class='lparen'>(</span><span class='lbrace'>{</span><span class='rbrace'>}</span><span class='rparen'>)</span> <span class='lbrace'>{</span><span class='op'>|</span><span class='id identifier rubyid_h'>h</span><span class='comma'>,</span> <span class='lparen'>(</span><span class='id identifier rubyid_k'>k</span><span class='comma'>,</span> <span class='id identifier rubyid_v'>v</span><span class='rparen'>)</span><span class='op'>|</span>
1039
+ <span class='id identifier rubyid_h'>h</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_block_given?'>block_given?</span> <span class='op'>?</span> <span class='kw'>yield</span><span class='lparen'>(</span><span class='id identifier rubyid_v'>v</span><span class='rparen'>)</span> <span class='op'>:</span> <span class='id identifier rubyid_v'>v</span><span class='period'>.</span><span class='id identifier rubyid_send'>send</span><span class='lparen'>(</span><span class='id identifier rubyid_sanitizer'>sanitizer</span><span class='rparen'>)</span>
1040
+ <span class='id identifier rubyid_h'>h</span>
1041
+ <span class='rbrace'>}</span>
1042
+ <span class='kw'>else</span>
1043
+ <span class='id identifier rubyid_rv'>rv</span>
1044
+ <span class='kw'>end</span>
623
1045
  <span class='kw'>end</span></pre>
624
1046
  </td>
625
1047
  </tr>
@@ -629,7 +1051,7 @@
629
1051
  <div class="method_details ">
630
1052
  <h3 class="signature " id="ensure_string-instance_method">
631
1053
 
632
- - (<tt><span class='object_link'><a href="String.html" title="Lazier::String (module)">String</a></span></tt>) <strong>ensure_string</strong>
1054
+ - (<tt><span class='object_link'><a href="String.html" title="Lazier::String (module)">String</a></span></tt>) <strong>ensure_string</strong>(default_value = &quot;&quot;, stringifier = :to_s)
633
1055
 
634
1056
 
635
1057
 
@@ -637,13 +1059,51 @@
637
1059
 
638
1060
  </h3><div class="docstring">
639
1061
  <div class="discussion">
640
- <p>Makes sure that the object is a string. For <code>nil</code>, it returns &#8220;&#8221;.</p>
1062
+ <p>Makes sure that the object is a string.</p>
641
1063
 
642
1064
 
643
1065
  </div>
644
1066
  </div>
645
1067
  <div class="tags">
1068
+ <p class="tag_title">Parameters:</p>
1069
+ <ul class="param">
1070
+
1071
+ <li>
1072
+
1073
+ <span class='name'>default_value</span>
1074
+
1075
+
1076
+ <span class='type'>(<tt><span class='object_link'><a href="String.html" title="Lazier::String (module)">String</a></span></tt>)</span>
1077
+
1078
+
1079
+ <em class="default">(defaults to: <tt>&quot;&quot;</tt>)</em>
1080
+
1081
+
1082
+ &mdash;
1083
+ <div class='inline'><p>The default value to return if the object is <code>nil</code>. It is also passed to the block stringifier.</p>
1084
+ </div>
1085
+
1086
+ </li>
646
1087
 
1088
+ <li>
1089
+
1090
+ <span class='name'>stringifier</span>
1091
+
1092
+
1093
+ <span class='type'>(<tt>Symbol</tt>)</span>
1094
+
1095
+
1096
+ <em class="default">(defaults to: <tt>:to_s</tt>)</em>
1097
+
1098
+
1099
+ &mdash;
1100
+ <div class='inline'><p>The method used to convert the object to a string. <em>Ignored if a block is passed.</em></p>
1101
+ </div>
1102
+
1103
+ </li>
1104
+
1105
+ </ul>
1106
+
647
1107
  <p class="tag_title">Returns:</p>
648
1108
  <ul class="return">
649
1109
 
@@ -668,23 +1128,15 @@
668
1128
  <pre class="lines">
669
1129
 
670
1130
 
671
- 66
672
- 67
673
- 68
674
1131
  69
675
1132
  70
676
- 71
677
- 72</pre>
1133
+ 71</pre>
678
1134
  </td>
679
1135
  <td>
680
- <pre class="code"><span class="info file"># File 'lib/lazier/object.rb', line 66</span>
1136
+ <pre class="code"><span class="info file"># File 'lib/lazier/object.rb', line 69</span>
681
1137
 
682
- <span class='kw'>def</span> <span class='id identifier rubyid_ensure_string'>ensure_string</span>
683
- <span class='kw'>if</span> <span class='kw'>self</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'>String</span><span class='rparen'>)</span> <span class='kw'>then</span>
684
- <span class='kw'>self</span>
685
- <span class='kw'>else</span>
686
- <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_present?'>present?</span> <span class='op'>?</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_to_s'>to_s</span> <span class='op'>:</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_end'>&quot;</span></span>
687
- <span class='kw'>end</span>
1138
+ <span class='kw'>def</span> <span class='id identifier rubyid_ensure_string'>ensure_string</span><span class='lparen'>(</span><span class='id identifier rubyid_default_value'>default_value</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_stringifier'>stringifier</span> <span class='op'>=</span> <span class='symbol'>:to_s</span><span class='rparen'>)</span>
1139
+ <span class='op'>!</span><span class='id identifier rubyid_nil?'>nil?</span> <span class='op'>?</span> <span class='lparen'>(</span><span class='id identifier rubyid_block_given?'>block_given?</span> <span class='op'>?</span> <span class='kw'>yield</span><span class='lparen'>(</span><span class='kw'>self</span><span class='comma'>,</span> <span class='id identifier rubyid_default_value'>default_value</span><span class='rparen'>)</span> <span class='op'>:</span> <span class='id identifier rubyid_send'>send</span><span class='lparen'>(</span><span class='id identifier rubyid_stringifier'>stringifier</span><span class='rparen'>)</span><span class='rparen'>)</span> <span class='op'>:</span> <span class='id identifier rubyid_default_value'>default_value</span>
688
1140
  <span class='kw'>end</span></pre>
689
1141
  </td>
690
1142
  </tr>
@@ -778,25 +1230,17 @@
778
1230
  <pre class="lines">
779
1231
 
780
1232
 
781
- 143
782
- 144
783
- 145
784
- 146
785
- 147
786
- 148
787
- 149
788
- 150</pre>
1233
+ 171
1234
+ 172
1235
+ 173
1236
+ 174</pre>
789
1237
  </td>
790
1238
  <td>
791
- <pre class="code"><span class="info file"># File 'lib/lazier/object.rb', line 143</span>
1239
+ <pre class="code"><span class="info file"># File 'lib/lazier/object.rb', line 171</span>
792
1240
 
793
1241
  <span class='kw'>def</span> <span class='id identifier rubyid_format_boolean'>format_boolean</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>
794
- <span class='id identifier rubyid_names'>names</span> <span class='op'>=</span> <span class='lbrace'>{</span>
795
- <span class='kw'>true</span> <span class='op'>=&gt;</span> <span class='id identifier rubyid_true_name'>true_name</span> <span class='op'>||</span> <span class='op'>::</span><span class='const'>Lazier</span><span class='period'>.</span><span class='id identifier rubyid_settings'>settings</span><span class='period'>.</span><span class='id identifier rubyid_boolean_names'>boolean_names</span><span class='lbracket'>[</span><span class='kw'>true</span><span class='rbracket'>]</span><span class='comma'>,</span>
796
- <span class='kw'>false</span> <span class='op'>=&gt;</span> <span class='id identifier rubyid_false_name'>false_name</span> <span class='op'>||</span> <span class='op'>::</span><span class='const'>Lazier</span><span class='period'>.</span><span class='id identifier rubyid_settings'>settings</span><span class='period'>.</span><span class='id identifier rubyid_boolean_names'>boolean_names</span><span class='lbracket'>[</span><span class='kw'>false</span><span class='rbracket'>]</span>
797
- <span class='rbrace'>}</span>
798
-
799
- <span class='id identifier rubyid_names'>names</span><span class='lbracket'>[</span><span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_to_boolean'>to_boolean</span><span class='rbracket'>]</span>
1242
+ <span class='id identifier rubyid_settings'>settings</span> <span class='op'>=</span> <span class='op'>::</span><span class='const'>Lazier</span><span class='period'>.</span><span class='id identifier rubyid_settings'>settings</span><span class='period'>.</span><span class='id identifier rubyid_boolean_names'>boolean_names</span>
1243
+ <span class='id identifier rubyid_to_boolean'>to_boolean</span> <span class='op'>?</span> <span class='lparen'>(</span><span class='id identifier rubyid_true_name'>true_name</span> <span class='op'>||</span> <span class='id identifier rubyid_settings'>settings</span><span class='lbracket'>[</span><span class='kw'>true</span><span class='rbracket'>]</span><span class='rparen'>)</span> <span class='op'>:</span> <span class='lparen'>(</span><span class='id identifier rubyid_false_name'>false_name</span> <span class='op'>||</span> <span class='id identifier rubyid_settings'>settings</span><span class='lbracket'>[</span><span class='kw'>false</span><span class='rbracket'>]</span><span class='rparen'>)</span>
800
1244
  <span class='kw'>end</span></pre>
801
1245
  </td>
802
1246
  </tr>
@@ -806,7 +1250,7 @@
806
1250
  <div class="method_details ">
807
1251
  <h3 class="signature " id="format_number-instance_method">
808
1252
 
809
- - (<tt><span class='object_link'><a href="String.html" title="Lazier::String (module)">String</a></span></tt>) <strong>format_number</strong>(prec = nil, decimal_separator = nil, add_string = nil, k_separator = nil)
1253
+ - (<tt><span class='object_link'><a href="String.html" title="Lazier::String (module)">String</a></span></tt>) <strong>format_number</strong>(precision = nil, decimal_separator = nil, add_string = nil, k_separator = nil)
810
1254
 
811
1255
 
812
1256
 
@@ -825,7 +1269,7 @@
825
1269
 
826
1270
  <li>
827
1271
 
828
- <span class='name'>prec</span>
1272
+ <span class='name'>precision</span>
829
1273
 
830
1274
 
831
1275
  <span class='type'>(<tt>Fixnum</tt>)</span>
@@ -924,39 +1368,31 @@
924
1368
  <pre class="lines">
925
1369
 
926
1370
 
927
- 121
928
- 122
929
- 123
930
- 124
931
- 125
932
- 126
933
- 127
934
- 128
935
- 129
936
- 130
937
- 131
938
- 132
939
- 133
940
- 134
941
- 135</pre>
1371
+ 153
1372
+ 154
1373
+ 155
1374
+ 156
1375
+ 157
1376
+ 158
1377
+ 159
1378
+ 160
1379
+ 161
1380
+ 162
1381
+ 163</pre>
942
1382
  </td>
943
1383
  <td>
944
- <pre class="code"><span class="info file"># File 'lib/lazier/object.rb', line 121</span>
945
-
946
- <span class='kw'>def</span> <span class='id identifier rubyid_format_number'>format_number</span><span class='lparen'>(</span><span class='id identifier rubyid_prec'>prec</span> <span class='op'>=</span> <span class='kw'>nil</span><span class='comma'>,</span> <span class='id identifier rubyid_decimal_separator'>decimal_separator</span> <span class='op'>=</span> <span class='kw'>nil</span><span class='comma'>,</span> <span class='id identifier rubyid_add_string'>add_string</span> <span class='op'>=</span> <span class='kw'>nil</span><span class='comma'>,</span> <span class='id identifier rubyid_k_separator'>k_separator</span> <span class='op'>=</span> <span class='kw'>nil</span><span class='rparen'>)</span>
947
- <span class='id identifier rubyid_prec'>prec</span> <span class='op'>||=</span> <span class='op'>::</span><span class='const'>Lazier</span><span class='period'>.</span><span class='id identifier rubyid_settings'>settings</span><span class='period'>.</span><span class='id identifier rubyid_format_number'>format_number</span><span class='lbracket'>[</span><span class='symbol'>:prec</span><span class='rbracket'>]</span>
948
- <span class='id identifier rubyid_decimal_separator'>decimal_separator</span> <span class='op'>||=</span> <span class='op'>::</span><span class='const'>Lazier</span><span class='period'>.</span><span class='id identifier rubyid_settings'>settings</span><span class='period'>.</span><span class='id identifier rubyid_format_number'>format_number</span><span class='lbracket'>[</span><span class='symbol'>:decimal_separator</span><span class='rbracket'>]</span>
949
- <span class='id identifier rubyid_add_string'>add_string</span> <span class='op'>||=</span> <span class='op'>::</span><span class='const'>Lazier</span><span class='period'>.</span><span class='id identifier rubyid_settings'>settings</span><span class='period'>.</span><span class='id identifier rubyid_format_number'>format_number</span><span class='lbracket'>[</span><span class='symbol'>:add_string</span><span class='rbracket'>]</span>
950
- <span class='id identifier rubyid_k_separator'>k_separator</span> <span class='op'>||=</span> <span class='op'>::</span><span class='const'>Lazier</span><span class='period'>.</span><span class='id identifier rubyid_settings'>settings</span><span class='period'>.</span><span class='id identifier rubyid_format_number'>format_number</span><span class='lbracket'>[</span><span class='symbol'>:k_separator</span><span class='rbracket'>]</span>
951
- <span class='id identifier rubyid_format'>format</span> <span class='op'>=</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>%n</span><span class='tstring_end'>&quot;</span></span>
952
- <span class='id identifier rubyid_unit'>unit</span> <span class='op'>=</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_end'>&quot;</span></span>
953
-
954
- <span class='kw'>if</span> <span class='id identifier rubyid_add_string'>add_string</span><span class='period'>.</span><span class='id identifier rubyid_present?'>present?</span> <span class='kw'>then</span>
955
- <span class='id identifier rubyid_format'>format</span> <span class='op'>=</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>%n %u</span><span class='tstring_end'>&quot;</span></span>
956
- <span class='id identifier rubyid_unit'>unit</span> <span class='op'>=</span> <span class='id identifier rubyid_add_string'>add_string</span>
957
- <span class='kw'>end</span>
1384
+ <pre class="code"><span class="info file"># File 'lib/lazier/object.rb', line 153</span>
1385
+
1386
+ <span class='kw'>def</span> <span class='id identifier rubyid_format_number'>format_number</span><span class='lparen'>(</span><span class='id identifier rubyid_precision'>precision</span> <span class='op'>=</span> <span class='kw'>nil</span><span class='comma'>,</span> <span class='id identifier rubyid_decimal_separator'>decimal_separator</span> <span class='op'>=</span> <span class='kw'>nil</span><span class='comma'>,</span> <span class='id identifier rubyid_add_string'>add_string</span> <span class='op'>=</span> <span class='kw'>nil</span><span class='comma'>,</span> <span class='id identifier rubyid_k_separator'>k_separator</span> <span class='op'>=</span> <span class='kw'>nil</span><span class='rparen'>)</span>
1387
+ <span class='kw'>if</span> <span class='id identifier rubyid_is_number?'>is_number?</span> <span class='kw'>then</span>
1388
+ <span class='id identifier rubyid_settings'>settings</span> <span class='op'>=</span> <span class='op'>::</span><span class='const'>Lazier</span><span class='period'>.</span><span class='id identifier rubyid_settings'>settings</span><span class='period'>.</span><span class='id identifier rubyid_format_number'>format_number</span>
1389
+ <span class='id identifier rubyid_add_string'>add_string</span> <span class='op'>||=</span> <span class='id identifier rubyid_settings'>settings</span><span class='lbracket'>[</span><span class='symbol'>:add_string</span><span class='rbracket'>]</span>
1390
+ <span class='id identifier rubyid_format'>format</span><span class='comma'>,</span> <span class='id identifier rubyid_unit'>unit</span> <span class='op'>=</span> <span class='lparen'>(</span><span class='id identifier rubyid_add_string'>add_string</span> <span class='op'>?</span> <span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>%n %u</span><span class='tstring_end'>&quot;</span></span><span class='comma'>,</span> <span class='id identifier rubyid_add_string'>add_string</span><span class='rbracket'>]</span> <span class='op'>:</span> <span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>%n</span><span class='tstring_end'>&quot;</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_end'>&quot;</span></span><span class='rbracket'>]</span><span class='rparen'>)</span>
958
1391
 
959
- <span class='lparen'>(</span><span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_is_number?'>is_number?</span> <span class='op'>&amp;&amp;</span> <span class='id identifier rubyid_prec'>prec</span> <span class='op'>&gt;=</span> <span class='int'>0</span><span class='rparen'>)</span> <span class='op'>?</span> <span class='id identifier rubyid_number_to_currency'>number_to_currency</span><span class='lparen'>(</span><span class='kw'>self</span><span class='comma'>,</span> <span class='lbrace'>{</span><span class='label'>precision:</span> <span class='id identifier rubyid_prec'>prec</span><span class='comma'>,</span> <span class='label'>separator:</span> <span class='id identifier rubyid_decimal_separator'>decimal_separator</span><span class='comma'>,</span> <span class='label'>delimiter:</span> <span class='id identifier rubyid_k_separator'>k_separator</span><span class='comma'>,</span> <span class='label'>format:</span> <span class='id identifier rubyid_format'>format</span><span class='comma'>,</span> <span class='label'>unit:</span> <span class='id identifier rubyid_unit'>unit</span><span class='rbrace'>}</span><span class='rparen'>)</span> <span class='op'>:</span> <span class='kw'>nil</span>
1392
+ <span class='id identifier rubyid_number_to_currency'>number_to_currency</span><span class='lparen'>(</span><span class='kw'>self</span><span class='comma'>,</span> <span class='lbrace'>{</span><span class='label'>precision:</span> <span class='lbracket'>[</span><span class='id identifier rubyid_precision'>precision</span> <span class='op'>||</span> <span class='id identifier rubyid_settings'>settings</span><span class='lbracket'>[</span><span class='symbol'>:precision</span><span class='rbracket'>]</span><span class='comma'>,</span> <span class='int'>0</span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_max'>max</span><span class='comma'>,</span> <span class='label'>separator:</span> <span class='id identifier rubyid_decimal_separator'>decimal_separator</span> <span class='op'>||</span> <span class='id identifier rubyid_settings'>settings</span><span class='lbracket'>[</span><span class='symbol'>:decimal_separator</span><span class='rbracket'>]</span><span class='comma'>,</span> <span class='label'>delimiter:</span> <span class='id identifier rubyid_k_separator'>k_separator</span> <span class='op'>||</span> <span class='id identifier rubyid_settings'>settings</span><span class='lbracket'>[</span><span class='symbol'>:k_separator</span><span class='rbracket'>]</span><span class='comma'>,</span> <span class='label'>format:</span> <span class='id identifier rubyid_format'>format</span><span class='comma'>,</span> <span class='label'>unit:</span> <span class='id identifier rubyid_unit'>unit</span><span class='rbrace'>}</span><span class='rparen'>)</span>
1393
+ <span class='kw'>else</span>
1394
+ <span class='kw'>nil</span>
1395
+ <span class='kw'>end</span>
960
1396
  <span class='kw'>end</span></pre>
961
1397
  </td>
962
1398
  </tr>
@@ -964,9 +1400,9 @@
964
1400
  </div>
965
1401
 
966
1402
  <div class="method_details ">
967
- <h3 class="signature " id="is_boolean?-instance_method">
1403
+ <h3 class="signature " id="indexize-instance_method">
968
1404
 
969
- - (<tt><span class='object_link'><a href="Boolean.html" title="Lazier::Boolean (module)">Boolean</a></span></tt>) <strong>is_boolean?</strong>
1405
+ - (<tt><span class='object_link'><a href="String.html" title="Lazier::String (module)">String</a></span></tt>) <strong>indexize</strong>(length = 2, filler = &quot;0&quot;, formatter = :rjust)
970
1406
 
971
1407
 
972
1408
 
@@ -974,25 +1410,80 @@
974
1410
 
975
1411
  </h3><div class="docstring">
976
1412
  <div class="discussion">
977
- <p>Checks if the object is a valid boolean value.</p>
1413
+ <p>Prepares an object to be printed in list summaries, like <code>[01/04] Opening this...</code>.</p>
978
1414
 
979
1415
 
980
1416
  </div>
981
1417
  </div>
982
1418
  <div class="tags">
1419
+ <p class="tag_title">Parameters:</p>
1420
+ <ul class="param">
1421
+
1422
+ <li>
1423
+
1424
+ <span class='name'>length</span>
1425
+
1426
+
1427
+ <span class='type'>(<tt>Fixnum</tt>)</span>
1428
+
1429
+
1430
+ <em class="default">(defaults to: <tt>2</tt>)</em>
1431
+
1432
+
1433
+ &mdash;
1434
+ <div class='inline'><p>The minimum length of the label.</p>
1435
+ </div>
1436
+
1437
+ </li>
1438
+
1439
+ <li>
1440
+
1441
+ <span class='name'>filler</span>
1442
+
1443
+
1444
+ <span class='type'>(<tt><span class='object_link'><a href="String.html" title="Lazier::String (module)">String</a></span></tt>)</span>
1445
+
1446
+
1447
+ <em class="default">(defaults to: <tt>&quot;0&quot;</tt>)</em>
1448
+
1449
+
1450
+ &mdash;
1451
+ <div class='inline'><p>The minimum length of the label.</p>
1452
+ </div>
1453
+
1454
+ </li>
983
1455
 
1456
+ <li>
1457
+
1458
+ <span class='name'>formatter</span>
1459
+
1460
+
1461
+ <span class='type'>(<tt>Symbol</tt>)</span>
1462
+
1463
+
1464
+ <em class="default">(defaults to: <tt>:rjust</tt>)</em>
1465
+
1466
+
1467
+ &mdash;
1468
+ <div class='inline'><p>The method to use to format the label. Must accept the <code>length</code> and the `filler arguments.</p>
1469
+ </div>
1470
+
1471
+ </li>
1472
+
1473
+ </ul>
1474
+
984
1475
  <p class="tag_title">Returns:</p>
985
1476
  <ul class="return">
986
1477
 
987
1478
  <li>
988
1479
 
989
1480
 
990
- <span class='type'>(<tt><span class='object_link'><a href="Boolean.html" title="Lazier::Boolean (module)">Boolean</a></span></tt>)</span>
1481
+ <span class='type'>(<tt><span class='object_link'><a href="String.html" title="Lazier::String (module)">String</a></span></tt>)</span>
991
1482
 
992
1483
 
993
1484
 
994
1485
  &mdash;
995
- <div class='inline'><p><code>true</code> is a valid boolean value, <code>false</code> otherwise.</p>
1486
+ <div class='inline'><p>The object inspected and formatted.</p>
996
1487
  </div>
997
1488
 
998
1489
  </li>
@@ -1005,15 +1496,15 @@
1005
1496
  <pre class="lines">
1006
1497
 
1007
1498
 
1008
- 52
1009
- 53
1010
- 54</pre>
1499
+ 182
1500
+ 183
1501
+ 184</pre>
1011
1502
  </td>
1012
1503
  <td>
1013
- <pre class="code"><span class="info file"># File 'lib/lazier/object.rb', line 52</span>
1504
+ <pre class="code"><span class="info file"># File 'lib/lazier/object.rb', line 182</span>
1014
1505
 
1015
- <span class='kw'>def</span> <span class='id identifier rubyid_is_boolean?'>is_boolean?</span>
1016
- <span class='kw'>self</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'>TrueClass</span><span class='rparen'>)</span> <span class='op'>||</span> <span class='kw'>self</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'>FalseClass</span><span class='rparen'>)</span> <span class='op'>||</span> <span class='kw'>self</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'>NilClass</span><span class='rparen'>)</span> <span class='op'>||</span> <span class='lparen'>(</span><span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_ensure_string'>ensure_string</span><span class='period'>.</span><span class='id identifier rubyid_strip'>strip</span> <span class='op'>=~</span> <span class='tstring'><span class='regexp_beg'>/</span><span class='tstring_content'>^(1|0|true|false|yes|no|t|f|y|n)$</span><span class='regexp_end'>/i</span></span><span class='rparen'>)</span>
1506
+ <span class='kw'>def</span> <span class='id identifier rubyid_indexize'>indexize</span><span class='lparen'>(</span><span class='id identifier rubyid_length'>length</span> <span class='op'>=</span> <span class='int'>2</span><span class='comma'>,</span> <span class='id identifier rubyid_filler'>filler</span> <span class='op'>=</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>0</span><span class='tstring_end'>&quot;</span></span><span class='comma'>,</span> <span class='id identifier rubyid_formatter'>formatter</span> <span class='op'>=</span> <span class='symbol'>:rjust</span><span class='rparen'>)</span>
1507
+ <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_ensure_string'>ensure_string</span><span class='period'>.</span><span class='id identifier rubyid_send'>send</span><span class='lparen'>(</span><span class='id identifier rubyid_formatter'>formatter</span><span class='comma'>,</span> <span class='id identifier rubyid_length'>length</span><span class='comma'>,</span> <span class='id identifier rubyid_filler'>filler</span><span class='rparen'>)</span>
1017
1508
  <span class='kw'>end</span></pre>
1018
1509
  </td>
1019
1510
  </tr>
@@ -1021,9 +1512,9 @@
1021
1512
  </div>
1022
1513
 
1023
1514
  <div class="method_details ">
1024
- <h3 class="signature " id="is_float?-instance_method">
1515
+ <h3 class="signature " id="is_boolean?-instance_method">
1025
1516
 
1026
- - (<tt><span class='object_link'><a href="Boolean.html" title="Lazier::Boolean (module)">Boolean</a></span></tt>) <strong>is_float?</strong>
1517
+ - (<tt><span class='object_link'><a href="Boolean.html" title="Lazier::Boolean (module)">Boolean</a></span></tt>) <strong>is_boolean?</strong>
1027
1518
 
1028
1519
 
1029
1520
 
@@ -1031,7 +1522,7 @@
1031
1522
 
1032
1523
  </h3><div class="docstring">
1033
1524
  <div class="discussion">
1034
- <p>Checks if the object is a valid float.</p>
1525
+ <p>Checks if the object is a valid boolean value.</p>
1035
1526
 
1036
1527
 
1037
1528
  </div>
@@ -1049,7 +1540,7 @@
1049
1540
 
1050
1541
 
1051
1542
  &mdash;
1052
- <div class='inline'><p><code>true</code> is a valid float, <code>false</code> otherwise.</p>
1543
+ <div class='inline'><p><code>true</code> is a valid boolean value, <code>false</code> otherwise.</p>
1053
1544
  </div>
1054
1545
 
1055
1546
  </li>
@@ -1062,15 +1553,15 @@
1062
1553
  <pre class="lines">
1063
1554
 
1064
1555
 
1065
- 45
1066
- 46
1067
- 47</pre>
1556
+ 50
1557
+ 51
1558
+ 52</pre>
1068
1559
  </td>
1069
1560
  <td>
1070
- <pre class="code"><span class="info file"># File 'lib/lazier/object.rb', line 45</span>
1561
+ <pre class="code"><span class="info file"># File 'lib/lazier/object.rb', line 50</span>
1071
1562
 
1072
- <span class='kw'>def</span> <span class='id identifier rubyid_is_float?'>is_float?</span>
1073
- <span class='kw'>self</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'>Float</span><span class='rparen'>)</span> <span class='op'>||</span> <span class='tstring'><span class='regexp_beg'>/</span><span class='tstring_content'>^([+-]?)(\d+)([.,]\d+)?$</span><span class='regexp_end'>/</span></span><span class='period'>.</span><span class='id identifier rubyid_match'>match</span><span class='lparen'>(</span><span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_normalize_number'>normalize_number</span><span class='rparen'>)</span>
1563
+ <span class='kw'>def</span> <span class='id identifier rubyid_is_boolean?'>is_boolean?</span>
1564
+ <span class='id identifier rubyid_is_a?'>is_a?</span><span class='lparen'>(</span><span class='op'>::</span><span class='const'>TrueClass</span><span class='rparen'>)</span> <span class='op'>||</span> <span class='op'>!</span><span class='kw'>self</span> <span class='op'>||</span> <span class='id identifier rubyid_to_s'>to_s</span> <span class='op'>=~</span> <span class='op'>::</span><span class='const'>Lazier</span><span class='op'>::</span><span class='const'>Object</span><span class='op'>::</span><span class='const'>BOOLEAN_MATCHER</span>
1074
1565
  <span class='kw'>end</span></pre>
1075
1566
  </td>
1076
1567
  </tr>
@@ -1078,17 +1569,21 @@
1078
1569
  </div>
1079
1570
 
1080
1571
  <div class="method_details ">
1081
- <h3 class="signature " id="is_integer?-instance_method">
1572
+ <h3 class="signature " id="is_float?-instance_method">
1082
1573
 
1083
- - (<tt><span class='object_link'><a href="Boolean.html" title="Lazier::Boolean (module)">Boolean</a></span></tt>) <strong>is_integer?</strong>
1574
+ - (<tt><span class='object_link'><a href="Boolean.html" title="Lazier::Boolean (module)">Boolean</a></span></tt>) <strong>is_float?</strong>
1084
1575
 
1085
1576
 
1086
1577
 
1578
+ <span class="aliases">Also known as:
1579
+ <span class="names"><span id='is_number?-instance_method'>is_number?</span></span>
1580
+ </span>
1581
+
1087
1582
 
1088
1583
 
1089
1584
  </h3><div class="docstring">
1090
1585
  <div class="discussion">
1091
- <p>Checks if the object is a valid integer.</p>
1586
+ <p>Checks if the object is a valid float.</p>
1092
1587
 
1093
1588
 
1094
1589
  </div>
@@ -1106,7 +1601,7 @@
1106
1601
 
1107
1602
 
1108
1603
  &mdash;
1109
- <div class='inline'><p><code>true</code> is a valid integer, <code>false</code> otherwise.</p>
1604
+ <div class='inline'><p><code>true</code> is a valid float, <code>false</code> otherwise.</p>
1110
1605
  </div>
1111
1606
 
1112
1607
  </li>
@@ -1119,15 +1614,15 @@
1119
1614
  <pre class="lines">
1120
1615
 
1121
1616
 
1122
- 38
1123
- 39
1124
- 40</pre>
1617
+ 42
1618
+ 43
1619
+ 44</pre>
1125
1620
  </td>
1126
1621
  <td>
1127
- <pre class="code"><span class="info file"># File 'lib/lazier/object.rb', line 38</span>
1622
+ <pre class="code"><span class="info file"># File 'lib/lazier/object.rb', line 42</span>
1128
1623
 
1129
- <span class='kw'>def</span> <span class='id identifier rubyid_is_integer?'>is_integer?</span>
1130
- <span class='kw'>self</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'>Integer</span><span class='rparen'>)</span> <span class='op'>||</span> <span class='tstring'><span class='regexp_beg'>/</span><span class='tstring_content'>^([+-]?)(\d+)$</span><span class='regexp_end'>/</span></span><span class='period'>.</span><span class='id identifier rubyid_match'>match</span><span class='lparen'>(</span><span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_normalize_number'>normalize_number</span><span class='rparen'>)</span>
1624
+ <span class='kw'>def</span> <span class='id identifier rubyid_is_float?'>is_float?</span>
1625
+ <span class='id identifier rubyid_is_a?'>is_a?</span><span class='lparen'>(</span><span class='op'>::</span><span class='const'>Numeric</span><span class='rparen'>)</span> <span class='op'>||</span> <span class='id identifier rubyid_is_a?'>is_a?</span><span class='lparen'>(</span><span class='op'>::</span><span class='const'>TrueClass</span><span class='rparen'>)</span> <span class='op'>||</span> <span class='op'>!</span><span class='kw'>self</span> <span class='op'>||</span> <span class='id identifier rubyid_normalize_number'>normalize_number</span> <span class='op'>=~</span> <span class='op'>::</span><span class='const'>Lazier</span><span class='op'>::</span><span class='const'>Object</span><span class='op'>::</span><span class='const'>FLOAT_MATCHER</span>
1131
1626
  <span class='kw'>end</span></pre>
1132
1627
  </td>
1133
1628
  </tr>
@@ -1135,9 +1630,9 @@
1135
1630
  </div>
1136
1631
 
1137
1632
  <div class="method_details ">
1138
- <h3 class="signature " id="is_number?-instance_method">
1633
+ <h3 class="signature " id="is_integer?-instance_method">
1139
1634
 
1140
- - (<tt><span class='object_link'><a href="Boolean.html" title="Lazier::Boolean (module)">Boolean</a></span></tt>) <strong>is_number?</strong>
1635
+ - (<tt><span class='object_link'><a href="Boolean.html" title="Lazier::Boolean (module)">Boolean</a></span></tt>) <strong>is_integer?</strong>
1141
1636
 
1142
1637
 
1143
1638
 
@@ -1145,7 +1640,7 @@
1145
1640
 
1146
1641
  </h3><div class="docstring">
1147
1642
  <div class="discussion">
1148
- <p>Checks if the object is a valid number.</p>
1643
+ <p>Checks if the object is a valid integer.</p>
1149
1644
 
1150
1645
 
1151
1646
  </div>
@@ -1163,7 +1658,7 @@
1163
1658
 
1164
1659
 
1165
1660
  &mdash;
1166
- <div class='inline'><p><code>true</code> is a valid number, <code>false</code> otherwise.</p>
1661
+ <div class='inline'><p><code>true</code> is a valid integer, <code>false</code> otherwise.</p>
1167
1662
  </div>
1168
1663
 
1169
1664
  </li>
@@ -1176,15 +1671,15 @@
1176
1671
  <pre class="lines">
1177
1672
 
1178
1673
 
1179
- 31
1180
- 32
1181
- 33</pre>
1674
+ 35
1675
+ 36
1676
+ 37</pre>
1182
1677
  </td>
1183
1678
  <td>
1184
- <pre class="code"><span class="info file"># File 'lib/lazier/object.rb', line 31</span>
1679
+ <pre class="code"><span class="info file"># File 'lib/lazier/object.rb', line 35</span>
1185
1680
 
1186
- <span class='kw'>def</span> <span class='id identifier rubyid_is_number?'>is_number?</span>
1187
- <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_is_float?'>is_float?</span>
1681
+ <span class='kw'>def</span> <span class='id identifier rubyid_is_integer?'>is_integer?</span>
1682
+ <span class='id identifier rubyid_is_a?'>is_a?</span><span class='lparen'>(</span><span class='op'>::</span><span class='const'>Integer</span><span class='rparen'>)</span> <span class='op'>||</span> <span class='id identifier rubyid_is_a?'>is_a?</span><span class='lparen'>(</span><span class='op'>::</span><span class='const'>TrueClass</span><span class='rparen'>)</span> <span class='op'>||</span> <span class='op'>!</span><span class='kw'>self</span> <span class='op'>||</span> <span class='id identifier rubyid_normalize_number'>normalize_number</span> <span class='op'>=~</span> <span class='op'>::</span><span class='const'>Lazier</span><span class='op'>::</span><span class='const'>Object</span><span class='op'>::</span><span class='const'>INTEGER_MATCHER</span>
1188
1683
  <span class='kw'>end</span></pre>
1189
1684
  </td>
1190
1685
  </tr>
@@ -1233,31 +1728,15 @@
1233
1728
  <pre class="lines">
1234
1729
 
1235
1730
 
1236
- 16
1237
- 17
1238
- 18
1239
- 19
1240
- 20
1241
- 21
1242
- 22
1243
- 23
1244
- 24
1245
- 25
1246
- 26</pre>
1731
+ 28
1732
+ 29
1733
+ 30</pre>
1247
1734
  </td>
1248
1735
  <td>
1249
- <pre class="code"><span class="info file"># File 'lib/lazier/object.rb', line 16</span>
1736
+ <pre class="code"><span class="info file"># File 'lib/lazier/object.rb', line 28</span>
1250
1737
 
1251
1738
  <span class='kw'>def</span> <span class='id identifier rubyid_normalize_number'>normalize_number</span>
1252
- <span class='kw'>if</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_is_a?'>is_a?</span><span class='lparen'>(</span><span class='const'>TrueClass</span><span class='rparen'>)</span> <span class='kw'>then</span>
1253
- <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>1</span><span class='tstring_end'>&quot;</span></span>
1254
- <span class='kw'>elsif</span> <span class='op'>!</span><span class='kw'>self</span> <span class='kw'>then</span>
1255
- <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>0</span><span class='tstring_end'>&quot;</span></span>
1256
- <span class='kw'>else</span>
1257
- <span class='id identifier rubyid_rv'>rv</span> <span class='op'>=</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_ensure_string'>ensure_string</span><span class='period'>.</span><span class='id identifier rubyid_strip'>strip</span><span class='period'>.</span><span class='id identifier rubyid_split'>split</span><span class='lparen'>(</span><span class='tstring'><span class='regexp_beg'>/</span><span class='tstring_content'>[\.,]</span><span class='regexp_end'>/</span></span><span class='rparen'>)</span>
1258
- <span class='id identifier rubyid_rv'>rv</span><span class='lbracket'>[</span><span class='op'>-</span><span class='int'>1</span><span class='rbracket'>]</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='op'>+</span> <span class='id identifier rubyid_rv'>rv</span><span class='lbracket'>[</span><span class='op'>-</span><span class='int'>1</span><span class='rbracket'>]</span> <span class='kw'>if</span> <span class='id identifier rubyid_rv'>rv</span><span class='period'>.</span><span class='id identifier rubyid_length'>length</span> <span class='op'>&gt;</span> <span class='int'>1</span>
1259
- <span class='id identifier rubyid_rv'>rv</span><span class='period'>.</span><span class='id identifier rubyid_join'>join</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span>
1260
- <span class='kw'>end</span>
1739
+ <span class='id identifier rubyid_is_boolean?'>is_boolean?</span> <span class='op'>?</span> <span class='id identifier rubyid_to_i'>to_i</span><span class='period'>.</span><span class='id identifier rubyid_to_s'>to_s</span> <span class='op'>:</span> <span class='id identifier rubyid_ensure_string'>ensure_string</span><span class='period'>.</span><span class='id identifier rubyid_strip'>strip</span><span class='period'>.</span><span class='id identifier rubyid_gsub'>gsub</span><span class='lparen'>(</span><span class='tstring'><span class='regexp_beg'>/</span><span class='tstring_content'>[\.,](?=(.*[\.,]))</span><span class='regexp_end'>/</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_gsub'>gsub</span><span class='lparen'>(</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='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>.</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span>
1261
1740
  <span class='kw'>end</span></pre>
1262
1741
  </td>
1263
1742
  </tr>
@@ -1267,7 +1746,7 @@
1267
1746
  <div class="method_details ">
1268
1747
  <h3 class="signature " id="round_to_precision-instance_method">
1269
1748
 
1270
- - (<tt>Float</tt>) <strong>round_to_precision</strong>(prec = 2)
1749
+ - (<tt>Float</tt>) <strong>round_to_precision</strong>(precision = 2)
1271
1750
 
1272
1751
 
1273
1752
 
@@ -1286,7 +1765,7 @@
1286
1765
 
1287
1766
  <li>
1288
1767
 
1289
- <span class='name'>prec</span>
1768
+ <span class='name'>precision</span>
1290
1769
 
1291
1770
 
1292
1771
  <span class='type'>(<tt>Fixnum</tt>)</span>
@@ -1327,15 +1806,15 @@
1327
1806
  <pre class="lines">
1328
1807
 
1329
1808
 
1330
- 109
1331
- 110
1332
- 111</pre>
1809
+ 141
1810
+ 142
1811
+ 143</pre>
1333
1812
  </td>
1334
1813
  <td>
1335
- <pre class="code"><span class="info file"># File 'lib/lazier/object.rb', line 109</span>
1814
+ <pre class="code"><span class="info file"># File 'lib/lazier/object.rb', line 141</span>
1336
1815
 
1337
- <span class='kw'>def</span> <span class='id identifier rubyid_round_to_precision'>round_to_precision</span><span class='lparen'>(</span><span class='id identifier rubyid_prec'>prec</span> <span class='op'>=</span> <span class='int'>2</span><span class='rparen'>)</span>
1338
- <span class='lparen'>(</span><span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_is_number?'>is_number?</span> <span class='op'>&amp;&amp;</span> <span class='id identifier rubyid_prec'>prec</span> <span class='op'>&gt;=</span> <span class='int'>0</span><span class='rparen'>)</span> <span class='op'>?</span> <span class='id identifier rubyid_number_with_precision'>number_with_precision</span><span class='lparen'>(</span><span class='kw'>self</span><span class='comma'>,</span> <span class='label'>precision:</span> <span class='id identifier rubyid_prec'>prec</span><span class='rparen'>)</span> <span class='op'>:</span> <span class='kw'>nil</span>
1816
+ <span class='kw'>def</span> <span class='id identifier rubyid_round_to_precision'>round_to_precision</span><span class='lparen'>(</span><span class='id identifier rubyid_precision'>precision</span> <span class='op'>=</span> <span class='int'>2</span><span class='rparen'>)</span>
1817
+ <span class='id identifier rubyid_is_number?'>is_number?</span> <span class='op'>?</span> <span class='id identifier rubyid_number_with_precision'>number_with_precision</span><span class='lparen'>(</span><span class='id identifier rubyid_to_float'>to_float</span><span class='comma'>,</span> <span class='label'>precision:</span> <span class='lbracket'>[</span><span class='id identifier rubyid_precision'>precision</span><span class='comma'>,</span> <span class='int'>0</span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_max'>max</span><span class='rparen'>)</span> <span class='op'>:</span> <span class='kw'>nil</span>
1339
1818
  <span class='kw'>end</span></pre>
1340
1819
  </td>
1341
1820
  </tr>
@@ -1384,19 +1863,15 @@
1384
1863
  <pre class="lines">
1385
1864
 
1386
1865
 
1387
- 99
1388
- 100
1389
- 101
1390
- 102
1391
- 103</pre>
1866
+ 117
1867
+ 118
1868
+ 119</pre>
1392
1869
  </td>
1393
1870
  <td>
1394
- <pre class="code"><span class="info file"># File 'lib/lazier/object.rb', line 99</span>
1871
+ <pre class="code"><span class="info file"># File 'lib/lazier/object.rb', line 117</span>
1395
1872
 
1396
1873
  <span class='kw'>def</span> <span class='id identifier rubyid_to_boolean'>to_boolean</span>
1397
- <span class='id identifier rubyid_rv'>rv</span> <span class='op'>=</span> <span class='kw'>self</span>
1398
- <span class='id identifier rubyid_rv'>rv</span> <span class='op'>=</span> <span class='id identifier rubyid_rv'>rv</span><span class='period'>.</span><span class='id identifier rubyid_to_i'>to_i</span> <span class='kw'>if</span> <span class='id identifier rubyid_rv'>rv</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'>Float</span><span class='rparen'>)</span>
1399
- <span class='lparen'>(</span><span class='id identifier rubyid_rv'>rv</span><span class='period'>.</span><span class='id identifier rubyid_is_a?'>is_a?</span><span class='lparen'>(</span><span class='const'>TrueClass</span><span class='rparen'>)</span> <span class='op'>||</span> <span class='tstring'><span class='regexp_beg'>/</span><span class='tstring_content'>^(1|on|true|yes|t|y)$</span><span class='regexp_end'>/i</span></span><span class='period'>.</span><span class='id identifier rubyid_match'>match</span><span class='lparen'>(</span><span class='id identifier rubyid_rv'>rv</span><span class='period'>.</span><span class='id identifier rubyid_ensure_string'>ensure_string</span><span class='period'>.</span><span class='id identifier rubyid_strip'>strip</span><span class='rparen'>)</span><span class='rparen'>)</span> <span class='op'>?</span> <span class='kw'>true</span> <span class='op'>:</span> <span class='kw'>false</span>
1874
+ <span class='id identifier rubyid_is_a?'>is_a?</span><span class='lparen'>(</span><span class='const'>TrueClass</span><span class='rparen'>)</span> <span class='op'>||</span> <span class='kw'>self</span> <span class='op'>==</span> <span class='float'>1.0</span> <span class='op'>||</span> <span class='kw'>self</span> <span class='op'>==</span> <span class='int'>1</span> <span class='op'>||</span> <span class='id identifier rubyid_ensure_string'>ensure_string</span> <span class='op'>=~</span> <span class='op'>::</span><span class='const'>Lazier</span><span class='op'>::</span><span class='const'>Object</span><span class='op'>::</span><span class='const'>BOOLEAN_TRUE_MATCHER</span>
1400
1875
  <span class='kw'>end</span></pre>
1401
1876
  </td>
1402
1877
  </tr>
@@ -1466,27 +1941,15 @@
1466
1941
  <pre class="lines">
1467
1942
 
1468
1943
 
1469
- 78
1470
- 79
1471
- 80
1472
- 81
1473
- 82
1474
- 83
1475
- 84
1476
- 85
1477
- 86</pre>
1944
+ 133
1945
+ 134
1946
+ 135</pre>
1478
1947
  </td>
1479
1948
  <td>
1480
- <pre class="code"><span class="info file"># File 'lib/lazier/object.rb', line 78</span>
1949
+ <pre class="code"><span class="info file"># File 'lib/lazier/object.rb', line 133</span>
1481
1950
 
1482
1951
  <span class='kw'>def</span> <span class='id identifier rubyid_to_float'>to_float</span><span class='lparen'>(</span><span class='id identifier rubyid_default_value'>default_value</span> <span class='op'>=</span> <span class='float'>0.0</span><span class='rparen'>)</span>
1483
- <span class='kw'>if</span> <span class='kw'>self</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'>Float</span><span class='rparen'>)</span>
1484
- <span class='kw'>self</span>
1485
- <span class='kw'>elsif</span> <span class='kw'>self</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'>Integer</span><span class='rparen'>)</span>
1486
- <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_to_f'>to_f</span>
1487
- <span class='kw'>else</span>
1488
- <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_is_float?'>is_float?</span> <span class='op'>?</span> <span class='op'>::</span><span class='const'>Kernel</span><span class='period'>.</span><span class='const'>Float</span><span class='lparen'>(</span><span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_normalize_number'>normalize_number</span><span class='rparen'>)</span> <span class='op'>:</span> <span class='id identifier rubyid_default_value'>default_value</span>
1489
- <span class='kw'>end</span>
1952
+ <span class='id identifier rubyid_is_float?'>is_float?</span> <span class='op'>?</span> <span class='op'>::</span><span class='const'>Kernel</span><span class='period'>.</span><span class='const'>Float</span><span class='lparen'>(</span><span class='id identifier rubyid_is_a?'>is_a?</span><span class='lparen'>(</span><span class='op'>::</span><span class='const'>Numeric</span><span class='rparen'>)</span> <span class='op'>?</span> <span class='kw'>self</span> <span class='op'>:</span> <span class='id identifier rubyid_normalize_number'>normalize_number</span><span class='rparen'>)</span> <span class='op'>:</span> <span class='id identifier rubyid_default_value'>default_value</span>
1490
1953
  <span class='kw'>end</span></pre>
1491
1954
  </td>
1492
1955
  </tr>
@@ -1556,15 +2019,15 @@
1556
2019
  <pre class="lines">
1557
2020
 
1558
2021
 
1559
- 92
1560
- 93
1561
- 94</pre>
2022
+ 125
2023
+ 126
2024
+ 127</pre>
1562
2025
  </td>
1563
2026
  <td>
1564
- <pre class="code"><span class="info file"># File 'lib/lazier/object.rb', line 92</span>
2027
+ <pre class="code"><span class="info file"># File 'lib/lazier/object.rb', line 125</span>
1565
2028
 
1566
2029
  <span class='kw'>def</span> <span class='id identifier rubyid_to_integer'>to_integer</span><span class='lparen'>(</span><span class='id identifier rubyid_default_value'>default_value</span> <span class='op'>=</span> <span class='int'>0</span><span class='rparen'>)</span>
1567
- <span class='kw'>self</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'>Integer</span><span class='rparen'>)</span> <span class='op'>?</span> <span class='kw'>self</span> <span class='op'>:</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_to_float'>to_float</span><span class='lparen'>(</span><span class='id identifier rubyid_default_value'>default_value</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_to_i'>to_i</span>
2030
+ <span class='id identifier rubyid_to_float'>to_float</span><span class='lparen'>(</span><span class='id identifier rubyid_default_value'>default_value</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_to_i'>to_i</span>
1568
2031
  <span class='kw'>end</span></pre>
1569
2032
  </td>
1570
2033
  </tr>
@@ -1576,9 +2039,9 @@
1576
2039
  </div>
1577
2040
 
1578
2041
  <div id="footer">
1579
- Generated on Sat Apr 13 11:56:53 2013 by
2042
+ Generated on Fri May 17 12:03:21 2013 by
1580
2043
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
1581
- 0.8.5.2 (ruby-1.9.3).
2044
+ 0.8.6.1 (ruby-1.9.3).
1582
2045
  </div>
1583
2046
 
1584
2047
  </body>