lazier 1.0.3 → 1.0.4
Sign up to get free protection for your applications and to get access to all the features.
- data/doc/Lazier.html +86 -83
- data/doc/Lazier/Boolean.html +10 -8
- data/doc/Lazier/DateTime.html +58 -52
- data/doc/Lazier/DateTime/ClassMethods.html +91 -79
- data/doc/Lazier/Exceptions.html +2 -2
- data/doc/Lazier/Exceptions/Dump.html +2 -2
- data/doc/Lazier/Hash.html +20 -18
- data/doc/Lazier/Math.html +2 -2
- data/doc/Lazier/Math/ClassMethods.html +24 -22
- data/doc/Lazier/Object.html +109 -95
- data/doc/Lazier/Pathname.html +11 -10
- data/doc/Lazier/Settings.html +80 -70
- data/doc/Lazier/String.html +26 -22
- data/doc/Lazier/TimeZone.html +102 -90
- data/doc/Lazier/TimeZone/ClassMethods.html +79 -72
- data/doc/Lazier/Version.html +10 -6
- data/doc/_index.html +2 -2
- data/doc/file.README.html +5 -5
- data/doc/index.html +5 -5
- data/doc/top-level-namespace.html +2 -2
- data/lib/lazier/version.rb +1 -1
- data/spec/{cowtech-extensions → lazier}/boolean_spec.rb +0 -0
- data/spec/{cowtech-extensions → lazier}/datetime_spec.rb +0 -0
- data/spec/{cowtech-extensions → lazier}/hash_spec.rb +0 -0
- data/spec/{cowtech-extensions → lazier}/math_spec.rb +0 -0
- data/spec/{cowtech-extensions → lazier}/object_spec.rb +0 -0
- data/spec/{cowtech-extensions → lazier}/pathname_spec.rb +0 -0
- data/spec/{cowtech-extensions → lazier}/settings_spec.rb +0 -0
- data/spec/{cowtech-extensions → lazier}/string_spec.rb +0 -0
- metadata +20 -20
data/doc/Lazier/Exceptions.html
CHANGED
@@ -116,9 +116,9 @@
|
|
116
116
|
</div>
|
117
117
|
|
118
118
|
<div id="footer">
|
119
|
-
Generated on
|
119
|
+
Generated on Wed Aug 22 16:33:57 2012 by
|
120
120
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
121
|
-
0.8.2.1 (ruby-1.
|
121
|
+
0.8.2.1 (ruby-1.8.7).
|
122
122
|
</div>
|
123
123
|
|
124
124
|
</body>
|
@@ -124,9 +124,9 @@
|
|
124
124
|
</div>
|
125
125
|
|
126
126
|
<div id="footer">
|
127
|
-
Generated on
|
127
|
+
Generated on Wed Aug 22 16:33:58 2012 by
|
128
128
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
129
|
-
0.8.2.1 (ruby-1.
|
129
|
+
0.8.2.1 (ruby-1.8.7).
|
130
130
|
</div>
|
131
131
|
|
132
132
|
</body>
|
data/doc/Lazier/Hash.html
CHANGED
@@ -278,19 +278,20 @@
|
|
278
278
|
<td>
|
279
279
|
<pre class="code"><span class="info file"># File 'lib/lazier/hash.rb', line 18</span>
|
280
280
|
|
281
|
-
<span class='kw'>def</span> <span class='
|
282
|
-
<span class='
|
283
|
-
|
284
|
-
<span class='kw'>if</span> <span class='kw'>self</span><span class='
|
285
|
-
<span class='
|
286
|
-
<span class='kw'>elsif</span> <span class='kw'>self</span><span class='
|
287
|
-
<span class='
|
288
|
-
<span class='kw'>else</span>
|
289
|
-
<span class='
|
290
|
-
<span class='kw'>end</span>
|
291
|
-
|
292
|
-
<span class='
|
293
|
-
<span class='kw'>end</span
|
281
|
+
<span class='rubyid_def def kw'>def</span> <span class='rubyid_method_missing identifier id'>method_missing</span><span class='lparen token'>(</span><span class='rubyid_method identifier id'>method</span><span class='comma token'>,</span> <span class='mult op'>*</span><span class='rubyid_args identifier id'>args</span><span class='comma token'>,</span> <span class='bitand op'>&</span><span class='rubyid_block identifier id'>block</span><span class='rparen token'>)</span>
|
282
|
+
<span class='rubyid_rv identifier id'>rv</span> <span class='assign token'>=</span> <span class='rubyid_nil nil kw'>nil</span>
|
283
|
+
|
284
|
+
<span class='rubyid_if if kw'>if</span> <span class='rubyid_self self kw'>self</span><span class='dot token'>.</span><span class='rubyid_has_key? fid id'>has_key?</span><span class='lparen token'>(</span><span class='rubyid_method identifier id'>method</span><span class='dot token'>.</span><span class='rubyid_to_sym identifier id'>to_sym</span><span class='rparen token'>)</span> <span class='rubyid_then then kw'>then</span>
|
285
|
+
<span class='rubyid_rv identifier id'>rv</span> <span class='assign token'>=</span> <span class='rubyid_self self kw'>self</span><span class='lbrack token'>[</span><span class='rubyid_method identifier id'>method</span><span class='dot token'>.</span><span class='rubyid_to_sym identifier id'>to_sym</span><span class='rbrack token'>]</span>
|
286
|
+
<span class='rubyid_elsif elsif kw'>elsif</span> <span class='rubyid_self self kw'>self</span><span class='dot token'>.</span><span class='rubyid_has_key? fid id'>has_key?</span><span class='lparen token'>(</span><span class='rubyid_method identifier id'>method</span><span class='dot token'>.</span><span class='rubyid_to_s identifier id'>to_s</span><span class='rparen token'>)</span> <span class='rubyid_then then kw'>then</span>
|
287
|
+
<span class='rubyid_rv identifier id'>rv</span> <span class='assign token'>=</span> <span class='rubyid_self self kw'>self</span><span class='lbrack token'>[</span><span class='rubyid_method identifier id'>method</span><span class='dot token'>.</span><span class='rubyid_to_s identifier id'>to_s</span><span class='rbrack token'>]</span>
|
288
|
+
<span class='rubyid_else else kw'>else</span>
|
289
|
+
<span class='rubyid_rv identifier id'>rv</span> <span class='assign token'>=</span> <span class='colon3 op'>::</span><span class='rubyid_Hash constant id'>Hash</span><span class='dot token'>.</span><span class='rubyid_method_missing identifier id'>method_missing</span><span class='lparen token'>(</span><span class='rubyid_method identifier id'>method</span><span class='comma token'>,</span> <span class='mult op'>*</span><span class='rubyid_args identifier id'>args</span><span class='comma token'>,</span> <span class='bitand op'>&</span><span class='rubyid_block identifier id'>block</span><span class='rparen token'>)</span>
|
290
|
+
<span class='rubyid_end end kw'>end</span>
|
291
|
+
|
292
|
+
<span class='rubyid_rv identifier id'>rv</span>
|
293
|
+
<span class='rubyid_end end kw'>end</span>
|
294
|
+
</pre>
|
294
295
|
</td>
|
295
296
|
</tr>
|
296
297
|
</table>
|
@@ -371,9 +372,10 @@
|
|
371
372
|
<td>
|
372
373
|
<pre class="code"><span class="info file"># File 'lib/lazier/hash.rb', line 36</span>
|
373
374
|
|
374
|
-
<span class='kw'>def</span> <span class='
|
375
|
-
<span class='lparen'>(</span><span class='kw'>self</span><span class='
|
376
|
-
<span class='kw'>end</span
|
375
|
+
<span class='rubyid_def def kw'>def</span> <span class='rubyid_respond_to? fid id'>respond_to?</span><span class='lparen token'>(</span><span class='rubyid_method identifier id'>method</span><span class='rparen token'>)</span>
|
376
|
+
<span class='lparen token'>(</span><span class='rubyid_self self kw'>self</span><span class='dot token'>.</span><span class='rubyid_has_key? fid id'>has_key?</span><span class='lparen token'>(</span><span class='rubyid_method identifier id'>method</span><span class='dot token'>.</span><span class='rubyid_to_sym identifier id'>to_sym</span><span class='rparen token'>)</span> <span class='orop op'>||</span> <span class='rubyid_self self kw'>self</span><span class='dot token'>.</span><span class='rubyid_has_key? fid id'>has_key?</span><span class='lparen token'>(</span><span class='rubyid_method identifier id'>method</span><span class='dot token'>.</span><span class='rubyid_to_s identifier id'>to_s</span><span class='rparen token'>)</span><span class='rparen token'>)</span> <span class='question op'>?</span> <span class='rubyid_true true kw'>true</span> <span class='colon op'>:</span> <span class='colon3 op'>::</span><span class='rubyid_Hash constant id'>Hash</span><span class='dot token'>.</span><span class='rubyid_respond_to? fid id'>respond_to?</span><span class='lparen token'>(</span><span class='rubyid_method identifier id'>method</span><span class='rparen token'>)</span>
|
377
|
+
<span class='rubyid_end end kw'>end</span>
|
378
|
+
</pre>
|
377
379
|
</td>
|
378
380
|
</tr>
|
379
381
|
</table>
|
@@ -384,9 +386,9 @@
|
|
384
386
|
</div>
|
385
387
|
|
386
388
|
<div id="footer">
|
387
|
-
Generated on
|
389
|
+
Generated on Wed Aug 22 16:33:55 2012 by
|
388
390
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
389
|
-
0.8.2.1 (ruby-1.
|
391
|
+
0.8.2.1 (ruby-1.8.7).
|
390
392
|
</div>
|
391
393
|
|
392
394
|
</body>
|
data/doc/Lazier/Math.html
CHANGED
@@ -121,9 +121,9 @@
|
|
121
121
|
</div>
|
122
122
|
|
123
123
|
<div id="footer">
|
124
|
-
Generated on
|
124
|
+
Generated on Wed Aug 22 16:33:55 2012 by
|
125
125
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
126
|
-
0.8.2.1 (ruby-1.
|
126
|
+
0.8.2.1 (ruby-1.8.7).
|
127
127
|
</div>
|
128
128
|
|
129
129
|
</body>
|
@@ -240,17 +240,18 @@
|
|
240
240
|
<td>
|
241
241
|
<pre class="code"><span class="info file"># File 'lib/lazier/math.rb', line 34</span>
|
242
242
|
|
243
|
-
<span class='kw'>def</span> <span class='
|
244
|
-
<span class='
|
245
|
-
|
246
|
-
<span class='
|
247
|
-
<span class='kw'>if</span> <span class='
|
248
|
-
<span class='
|
249
|
-
<span class='
|
250
|
-
<span class='kw'>end</span>
|
251
|
-
|
252
|
-
<span class='
|
253
|
-
<span class='kw'>end</span
|
243
|
+
<span class='rubyid_def def kw'>def</span> <span class='rubyid_max identifier id'>max</span><span class='lparen token'>(</span><span class='mult op'>*</span><span class='rubyid_args identifier id'>args</span><span class='rparen token'>)</span>
|
244
|
+
<span class='rubyid_rv identifier id'>rv</span> <span class='assign token'>=</span> <span class='rubyid_nil nil kw'>nil</span>
|
245
|
+
|
246
|
+
<span class='rubyid_args identifier id'>args</span> <span class='assign token'>=</span> <span class='rubyid_args identifier id'>args</span><span class='dot token'>.</span><span class='rubyid_ensure_array identifier id'>ensure_array</span><span class='dot token'>.</span><span class='rubyid_flatten identifier id'>flatten</span>
|
247
|
+
<span class='rubyid_if if kw'>if</span> <span class='rubyid_args identifier id'>args</span><span class='dot token'>.</span><span class='rubyid_length identifier id'>length</span> <span class='gt op'>></span> <span class='integer val'>0</span> <span class='rubyid_then then kw'>then</span>
|
248
|
+
<span class='rubyid_rv identifier id'>rv</span> <span class='assign token'>=</span> <span class='rubyid_args identifier id'>args</span><span class='lbrack token'>[</span><span class='integer val'>0</span><span class='rbrack token'>]</span>
|
249
|
+
<span class='rubyid_args identifier id'>args</span><span class='dot token'>.</span><span class='rubyid_each identifier id'>each</span> <span class='rubyid_do do kw'>do</span> <span class='bitor op'>|</span><span class='rubyid_a identifier id'>a</span><span class='bitor op'>|</span> <span class='rubyid_rv identifier id'>rv</span> <span class='assign token'>=</span> <span class='rubyid_a identifier id'>a</span> <span class='rubyid_if if_mod kw'>if</span> <span class='rubyid_a identifier id'>a</span> <span class='gt op'>></span> <span class='rubyid_rv identifier id'>rv</span> <span class='rubyid_end end kw'>end</span>
|
250
|
+
<span class='rubyid_end end kw'>end</span>
|
251
|
+
|
252
|
+
<span class='rubyid_rv identifier id'>rv</span>
|
253
|
+
<span class='rubyid_end end kw'>end</span>
|
254
|
+
</pre>
|
254
255
|
</td>
|
255
256
|
</tr>
|
256
257
|
</table>
|
@@ -332,17 +333,18 @@
|
|
332
333
|
<td>
|
333
334
|
<pre class="code"><span class="info file"># File 'lib/lazier/math.rb', line 18</span>
|
334
335
|
|
335
|
-
<span class='kw'>def</span> <span class='
|
336
|
-
<span class='
|
336
|
+
<span class='rubyid_def def kw'>def</span> <span class='rubyid_min identifier id'>min</span><span class='lparen token'>(</span><span class='mult op'>*</span><span class='rubyid_args identifier id'>args</span><span class='rparen token'>)</span>
|
337
|
+
<span class='rubyid_rv identifier id'>rv</span> <span class='assign token'>=</span> <span class='rubyid_nil nil kw'>nil</span>
|
337
338
|
|
338
|
-
<span class='
|
339
|
-
<span class='kw'>if</span> <span class='
|
340
|
-
<span class='
|
341
|
-
<span class='
|
342
|
-
<span class='kw'>end</span>
|
339
|
+
<span class='rubyid_args identifier id'>args</span> <span class='assign token'>=</span> <span class='rubyid_args identifier id'>args</span><span class='dot token'>.</span><span class='rubyid_ensure_array identifier id'>ensure_array</span><span class='dot token'>.</span><span class='rubyid_flatten identifier id'>flatten</span>
|
340
|
+
<span class='rubyid_if if kw'>if</span> <span class='rubyid_args identifier id'>args</span><span class='dot token'>.</span><span class='rubyid_length identifier id'>length</span> <span class='gt op'>></span> <span class='integer val'>0</span> <span class='rubyid_then then kw'>then</span>
|
341
|
+
<span class='rubyid_rv identifier id'>rv</span> <span class='assign token'>=</span> <span class='rubyid_args identifier id'>args</span><span class='lbrack token'>[</span><span class='integer val'>0</span><span class='rbrack token'>]</span>
|
342
|
+
<span class='rubyid_args identifier id'>args</span><span class='dot token'>.</span><span class='rubyid_each identifier id'>each</span> <span class='rubyid_do do kw'>do</span> <span class='bitor op'>|</span><span class='rubyid_a identifier id'>a</span><span class='bitor op'>|</span> <span class='rubyid_rv identifier id'>rv</span> <span class='assign token'>=</span> <span class='rubyid_a identifier id'>a</span> <span class='rubyid_if if_mod kw'>if</span> <span class='rubyid_a identifier id'>a</span> <span class='lt op'><</span> <span class='rubyid_rv identifier id'>rv</span> <span class='rubyid_end end kw'>end</span>
|
343
|
+
<span class='rubyid_end end kw'>end</span>
|
343
344
|
|
344
|
-
<span class='
|
345
|
-
<span class='kw'>end</span
|
345
|
+
<span class='rubyid_rv identifier id'>rv</span>
|
346
|
+
<span class='rubyid_end end kw'>end</span>
|
347
|
+
</pre>
|
346
348
|
</td>
|
347
349
|
</tr>
|
348
350
|
</table>
|
@@ -353,9 +355,9 @@
|
|
353
355
|
</div>
|
354
356
|
|
355
357
|
<div id="footer">
|
356
|
-
Generated on
|
358
|
+
Generated on Wed Aug 22 16:33:55 2012 by
|
357
359
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
358
|
-
0.8.2.1 (ruby-1.
|
360
|
+
0.8.2.1 (ruby-1.8.7).
|
359
361
|
</div>
|
360
362
|
|
361
363
|
</body>
|
data/doc/Lazier/Object.html
CHANGED
@@ -549,21 +549,22 @@
|
|
549
549
|
<td>
|
550
550
|
<pre class="code"><span class="info file"># File 'lib/lazier/object.rb', line 161</span>
|
551
551
|
|
552
|
-
<span class='kw'>def</span> <span class='
|
553
|
-
<span class='
|
554
|
-
|
555
|
-
<span class='kw'>begin</span>
|
556
|
-
<span class='kw'>if</span> <span class='
|
557
|
-
<span class='
|
558
|
-
<span class='kw'>else</span>
|
559
|
-
<span class='
|
560
|
-
<span class='kw'>end</span>
|
561
|
-
<span class='kw'>rescue</span>
|
562
|
-
<span class='
|
563
|
-
<span class='kw'>end</span>
|
564
|
-
|
565
|
-
<span class='
|
566
|
-
<span class='kw'>end</span
|
552
|
+
<span class='rubyid_def def kw'>def</span> <span class='rubyid_debug_dump identifier id'>debug_dump</span><span class='lparen token'>(</span><span class='rubyid_format identifier id'>format</span> <span class='assign token'>=</span> <span class='symbol val'>:yaml</span><span class='comma token'>,</span> <span class='rubyid_must_raise identifier id'>must_raise</span> <span class='assign token'>=</span> <span class='rubyid_true true kw'>true</span><span class='rparen token'>)</span>
|
553
|
+
<span class='rubyid_rv identifier id'>rv</span> <span class='assign token'>=</span> <span class='string val'>""</span>
|
554
|
+
|
555
|
+
<span class='rubyid_begin begin kw'>begin</span>
|
556
|
+
<span class='rubyid_if if kw'>if</span> <span class='rubyid_format identifier id'>format</span> <span class='eq op'>==</span> <span class='symbol val'>:pretty_json</span> <span class='rubyid_then then kw'>then</span>
|
557
|
+
<span class='rubyid_rv identifier id'>rv</span> <span class='assign token'>=</span> <span class='colon3 op'>::</span><span class='rubyid_JSON constant id'>JSON</span><span class='dot token'>.</span><span class='rubyid_pretty_generate identifier id'>pretty_generate</span><span class='lparen token'>(</span><span class='rubyid_self self kw'>self</span><span class='rparen token'>)</span>
|
558
|
+
<span class='rubyid_else else kw'>else</span>
|
559
|
+
<span class='rubyid_rv identifier id'>rv</span> <span class='assign token'>=</span> <span class='rubyid_self self kw'>self</span><span class='dot token'>.</span><span class='rubyid_send identifier id'>send</span><span class='lparen token'>(</span><span class='dstring node'>"to_#{format}"</span><span class='rparen token'>)</span>
|
560
|
+
<span class='rubyid_end end kw'>end</span>
|
561
|
+
<span class='rubyid_rescue rescue kw'>rescue</span>
|
562
|
+
<span class='rubyid_rv identifier id'>rv</span> <span class='assign token'>=</span> <span class='rubyid_self self kw'>self</span><span class='dot token'>.</span><span class='rubyid_inspect identifier id'>inspect</span>
|
563
|
+
<span class='rubyid_end end kw'>end</span>
|
564
|
+
|
565
|
+
<span class='rubyid_must_raise identifier id'>must_raise</span> <span class='integer val'>? </span><span class='rubyid_raise identifier id'>raise</span><span class='lparen token'>(</span><span class='colon3 op'>::</span><span class='rubyid_Lazier constant id'>Lazier</span><span class='colon2 op'>::</span><span class='rubyid_Exceptions constant id'>Exceptions</span><span class='colon2 op'>::</span><span class='rubyid_Dump constant id'>Dump</span><span class='dot token'>.</span><span class='rubyid_new identifier id'>new</span><span class='lparen token'>(</span><span class='rubyid_rv identifier id'>rv</span><span class='rparen token'>)</span><span class='rparen token'>)</span> <span class='colon op'>:</span> <span class='rubyid_rv identifier id'>rv</span>
|
566
|
+
<span class='rubyid_end end kw'>end</span>
|
567
|
+
</pre>
|
567
568
|
</td>
|
568
569
|
</tr>
|
569
570
|
</table>
|
@@ -618,9 +619,10 @@
|
|
618
619
|
<td>
|
619
620
|
<pre class="code"><span class="info file"># File 'lib/lazier/object.rb', line 64</span>
|
620
621
|
|
621
|
-
<span class='kw'>def</span> <span class='
|
622
|
-
<span class='kw'>self</span><span class='
|
623
|
-
<span class='kw'>end</span
|
622
|
+
<span class='rubyid_def def kw'>def</span> <span class='rubyid_ensure_array identifier id'>ensure_array</span>
|
623
|
+
<span class='rubyid_self self kw'>self</span><span class='dot token'>.</span><span class='rubyid_is_a? fid id'>is_a?</span><span class='lparen token'>(</span><span class='colon3 op'>::</span><span class='rubyid_Array constant id'>Array</span><span class='rparen token'>)</span> <span class='question op'>?</span> <span class='rubyid_self self kw'>self</span> <span class='colon op'>:</span> <span class='lbrack token'>[</span><span class='rubyid_self self kw'>self</span><span class='rbrack token'>]</span>
|
624
|
+
<span class='rubyid_end end kw'>end</span>
|
625
|
+
</pre>
|
624
626
|
</td>
|
625
627
|
</tr>
|
626
628
|
</table>
|
@@ -679,13 +681,14 @@
|
|
679
681
|
<td>
|
680
682
|
<pre class="code"><span class="info file"># File 'lib/lazier/object.rb', line 71</span>
|
681
683
|
|
682
|
-
<span class='kw'>def</span> <span class='
|
683
|
-
<span class='kw'>if</span> <span class='kw'>self</span><span class='
|
684
|
-
<span class='kw'>self</span>
|
685
|
-
<span class='kw'>else</span>
|
686
|
-
<span class='kw'>self</span><span class='
|
687
|
-
<span class='kw'>end</span>
|
688
|
-
<span class='kw'>end</span
|
684
|
+
<span class='rubyid_def def kw'>def</span> <span class='rubyid_ensure_string identifier id'>ensure_string</span>
|
685
|
+
<span class='rubyid_if if kw'>if</span> <span class='rubyid_self self kw'>self</span><span class='dot token'>.</span><span class='rubyid_is_a? fid id'>is_a?</span><span class='lparen token'>(</span><span class='colon3 op'>::</span><span class='rubyid_String constant id'>String</span><span class='rparen token'>)</span> <span class='rubyid_then then kw'>then</span>
|
686
|
+
<span class='rubyid_self self kw'>self</span>
|
687
|
+
<span class='rubyid_else else kw'>else</span>
|
688
|
+
<span class='rubyid_self self kw'>self</span><span class='dot token'>.</span><span class='rubyid_present? fid id'>present?</span> <span class='integer val'>? </span><span class='rubyid_self self kw'>self</span><span class='dot token'>.</span><span class='rubyid_to_s identifier id'>to_s</span> <span class='colon op'>:</span> <span class='string val'>""</span>
|
689
|
+
<span class='rubyid_end end kw'>end</span>
|
690
|
+
<span class='rubyid_end end kw'>end</span>
|
691
|
+
</pre>
|
689
692
|
</td>
|
690
693
|
</tr>
|
691
694
|
</table>
|
@@ -790,14 +793,15 @@
|
|
790
793
|
<td>
|
791
794
|
<pre class="code"><span class="info file"># File 'lib/lazier/object.rb', line 147</span>
|
792
795
|
|
793
|
-
<span class='kw'>def</span> <span class='
|
794
|
-
<span class='
|
795
|
-
<span class='kw'>true</span> <span class='op'
|
796
|
-
<span class='kw'>false</span> <span class='op'
|
797
|
-
<span class='rbrace'>}</span>
|
796
|
+
<span class='rubyid_def def kw'>def</span> <span class='rubyid_format_boolean identifier id'>format_boolean</span><span class='lparen token'>(</span><span class='rubyid_true_name identifier id'>true_name</span> <span class='assign token'>=</span> <span class='rubyid_nil nil kw'>nil</span><span class='comma token'>,</span> <span class='rubyid_false_name identifier id'>false_name</span> <span class='assign token'>=</span> <span class='rubyid_nil nil kw'>nil</span><span class='rparen token'>)</span>
|
797
|
+
<span class='rubyid_names identifier id'>names</span> <span class='assign token'>=</span> <span class='lbrace token'>{</span>
|
798
|
+
<span class='rubyid_true true kw'>true</span> <span class='assign token'>=</span><span class='gt op'>></span> <span class='rubyid_true_name identifier id'>true_name</span> <span class='orop op'>||</span> <span class='colon3 op'>::</span><span class='rubyid_Lazier constant id'>Lazier</span><span class='dot token'>.</span><span class='rubyid_settings identifier id'>settings</span><span class='dot token'>.</span><span class='rubyid_boolean_names identifier id'>boolean_names</span><span class='lbrack token'>[</span><span class='rubyid_true true kw'>true</span><span class='rbrack token'>]</span><span class='comma token'>,</span>
|
799
|
+
<span class='rubyid_false false kw'>false</span> <span class='assign token'>=</span><span class='gt op'>></span> <span class='rubyid_false_name identifier id'>false_name</span> <span class='orop op'>||</span> <span class='colon3 op'>::</span><span class='rubyid_Lazier constant id'>Lazier</span><span class='dot token'>.</span><span class='rubyid_settings identifier id'>settings</span><span class='dot token'>.</span><span class='rubyid_boolean_names identifier id'>boolean_names</span><span class='lbrack token'>[</span><span class='rubyid_false false kw'>false</span><span class='rbrack token'>]</span>
|
800
|
+
<span class='rbrace token'>}</span>
|
798
801
|
|
799
|
-
<span class='
|
800
|
-
<span class='kw'>end</span
|
802
|
+
<span class='rubyid_names identifier id'>names</span><span class='lbrack token'>[</span><span class='rubyid_self self kw'>self</span><span class='dot token'>.</span><span class='rubyid_to_boolean identifier id'>to_boolean</span><span class='rbrack token'>]</span>
|
803
|
+
<span class='rubyid_end end kw'>end</span>
|
804
|
+
</pre>
|
801
805
|
</td>
|
802
806
|
</tr>
|
803
807
|
</table>
|
@@ -936,14 +940,15 @@
|
|
936
940
|
<td>
|
937
941
|
<pre class="code"><span class="info file"># File 'lib/lazier/object.rb', line 132</span>
|
938
942
|
|
939
|
-
<span class='kw'>def</span> <span class='
|
940
|
-
<span class='
|
941
|
-
<span class='
|
942
|
-
<span class='
|
943
|
-
<span class='
|
943
|
+
<span class='rubyid_def def kw'>def</span> <span class='rubyid_format_number identifier id'>format_number</span><span class='lparen token'>(</span><span class='rubyid_prec identifier id'>prec</span> <span class='assign token'>=</span> <span class='rubyid_nil nil kw'>nil</span><span class='comma token'>,</span> <span class='rubyid_decimal_separator identifier id'>decimal_separator</span> <span class='assign token'>=</span> <span class='rubyid_nil nil kw'>nil</span><span class='comma token'>,</span> <span class='rubyid_add_string identifier id'>add_string</span> <span class='assign token'>=</span> <span class='rubyid_nil nil kw'>nil</span><span class='comma token'>,</span> <span class='rubyid_k_separator identifier id'>k_separator</span> <span class='assign token'>=</span> <span class='rubyid_nil nil kw'>nil</span><span class='rparen token'>)</span>
|
944
|
+
<span class='rubyid_prec identifier id'>prec</span> <span class='assign token'>=</span> <span class='colon3 op'>::</span><span class='rubyid_Lazier constant id'>Lazier</span><span class='dot token'>.</span><span class='rubyid_settings identifier id'>settings</span><span class='dot token'>.</span><span class='rubyid_format_number identifier id'>format_number</span><span class='lbrack token'>[</span><span class='symbol val'>:prec</span><span class='rbrack token'>]</span> <span class='rubyid_if if_mod kw'>if</span> <span class='rubyid_prec identifier id'>prec</span><span class='dot token'>.</span><span class='rubyid_nil? fid id'>nil?</span>
|
945
|
+
<span class='rubyid_decimal_separator identifier id'>decimal_separator</span> <span class='assign token'>=</span> <span class='colon3 op'>::</span><span class='rubyid_Lazier constant id'>Lazier</span><span class='dot token'>.</span><span class='rubyid_settings identifier id'>settings</span><span class='dot token'>.</span><span class='rubyid_format_number identifier id'>format_number</span><span class='lbrack token'>[</span><span class='symbol val'>:decimal_separator</span><span class='rbrack token'>]</span> <span class='rubyid_if if_mod kw'>if</span> <span class='rubyid_decimal_separator identifier id'>decimal_separator</span><span class='dot token'>.</span><span class='rubyid_nil? fid id'>nil?</span>
|
946
|
+
<span class='rubyid_add_string identifier id'>add_string</span> <span class='assign token'>=</span> <span class='colon3 op'>::</span><span class='rubyid_Lazier constant id'>Lazier</span><span class='dot token'>.</span><span class='rubyid_settings identifier id'>settings</span><span class='dot token'>.</span><span class='rubyid_format_number identifier id'>format_number</span><span class='lbrack token'>[</span><span class='symbol val'>:add_string</span><span class='rbrack token'>]</span> <span class='rubyid_if if_mod kw'>if</span> <span class='rubyid_add_string identifier id'>add_string</span><span class='dot token'>.</span><span class='rubyid_nil? fid id'>nil?</span>
|
947
|
+
<span class='rubyid_k_separator identifier id'>k_separator</span> <span class='assign token'>=</span> <span class='colon3 op'>::</span><span class='rubyid_Lazier constant id'>Lazier</span><span class='dot token'>.</span><span class='rubyid_settings identifier id'>settings</span><span class='dot token'>.</span><span class='rubyid_format_number identifier id'>format_number</span><span class='lbrack token'>[</span><span class='symbol val'>:k_separator</span><span class='rbrack token'>]</span> <span class='rubyid_if if_mod kw'>if</span> <span class='rubyid_k_separator identifier id'>k_separator</span><span class='dot token'>.</span><span class='rubyid_nil? fid id'>nil?</span>
|
944
948
|
|
945
|
-
<span class='lparen'>(</span><span class='kw'>self</span><span class='
|
946
|
-
<span class='kw'>end</span
|
949
|
+
<span class='lparen token'>(</span><span class='rubyid_self self kw'>self</span><span class='dot token'>.</span><span class='rubyid_is_number? fid id'>is_number?</span> <span class='andop op'>&&</span> <span class='rubyid_prec identifier id'>prec</span> <span class='geq op'>>=</span> <span class='integer val'>0</span><span class='rparen token'>)</span> <span class='question op'>?</span> <span class='rubyid_number_to_currency identifier id'>number_to_currency</span><span class='lparen token'>(</span><span class='rubyid_self self kw'>self</span><span class='comma token'>,</span> <span class='lbrace token'>{</span><span class='symbol val'>:precision</span> <span class='assign token'>=</span><span class='gt op'>></span> <span class='rubyid_prec identifier id'>prec</span><span class='comma token'>,</span> <span class='symbol val'>:separator</span> <span class='assign token'>=</span><span class='gt op'>></span> <span class='rubyid_decimal_separator identifier id'>decimal_separator</span><span class='comma token'>,</span> <span class='symbol val'>:delimiter</span> <span class='assign token'>=</span><span class='gt op'>></span> <span class='rubyid_k_separator identifier id'>k_separator</span><span class='comma token'>,</span> <span class='symbol val'>:format</span> <span class='assign token'>=</span><span class='gt op'>></span> <span class='rubyid_add_string identifier id'>add_string</span><span class='dot token'>.</span><span class='rubyid_blank? fid id'>blank?</span> <span class='integer val'>? </span><span class='string val'>"%n"</span> <span class='colon op'>:</span> <span class='string val'>"%n %u"</span><span class='comma token'>,</span> <span class='symbol val'>:unit</span> <span class='assign token'>=</span><span class='gt op'>></span> <span class='rubyid_add_string identifier id'>add_string</span><span class='dot token'>.</span><span class='rubyid_blank? fid id'>blank?</span> <span class='integer val'>? </span><span class='string val'>""</span> <span class='colon op'>:</span> <span class='rubyid_add_string identifier id'>add_string</span><span class='dot token'>.</span><span class='rubyid_strip identifier id'>strip</span><span class='rbrace token'>}</span><span class='rparen token'>)</span> <span class='colon op'>:</span> <span class='rubyid_nil nil kw'>nil</span>
|
950
|
+
<span class='rubyid_end end kw'>end</span>
|
951
|
+
</pre>
|
947
952
|
</td>
|
948
953
|
</tr>
|
949
954
|
</table>
|
@@ -998,9 +1003,10 @@
|
|
998
1003
|
<td>
|
999
1004
|
<pre class="code"><span class="info file"># File 'lib/lazier/object.rb', line 57</span>
|
1000
1005
|
|
1001
|
-
<span class='kw'>def</span> <span class='
|
1002
|
-
<span class='kw'>self</span><span class='
|
1003
|
-
<span class='kw'>end</span
|
1006
|
+
<span class='rubyid_def def kw'>def</span> <span class='rubyid_is_boolean? fid id'>is_boolean?</span>
|
1007
|
+
<span class='rubyid_self self kw'>self</span><span class='dot token'>.</span><span class='rubyid_is_a? fid id'>is_a?</span><span class='lparen token'>(</span><span class='colon3 op'>::</span><span class='rubyid_TrueClass constant id'>TrueClass</span><span class='rparen token'>)</span> <span class='orop op'>||</span> <span class='rubyid_self self kw'>self</span><span class='dot token'>.</span><span class='rubyid_is_a? fid id'>is_a?</span><span class='lparen token'>(</span><span class='colon3 op'>::</span><span class='rubyid_FalseClass constant id'>FalseClass</span><span class='rparen token'>)</span> <span class='orop op'>||</span> <span class='rubyid_self self kw'>self</span><span class='dot token'>.</span><span class='rubyid_is_a? fid id'>is_a?</span><span class='lparen token'>(</span><span class='colon3 op'>::</span><span class='rubyid_NilClass constant id'>NilClass</span><span class='rparen token'>)</span> <span class='orop op'>||</span> <span class='lparen token'>(</span><span class='rubyid_self self kw'>self</span><span class='dot token'>.</span><span class='rubyid_ensure_string identifier id'>ensure_string</span><span class='dot token'>.</span><span class='rubyid_strip identifier id'>strip</span> <span class='match op'>=~</span> <span class='regexp val'>/^(1|0|true|false|yes|no|t|f|y|n)$/i</span><span class='rparen token'>)</span>
|
1008
|
+
<span class='rubyid_end end kw'>end</span>
|
1009
|
+
</pre>
|
1004
1010
|
</td>
|
1005
1011
|
</tr>
|
1006
1012
|
</table>
|
@@ -1055,9 +1061,10 @@
|
|
1055
1061
|
<td>
|
1056
1062
|
<pre class="code"><span class="info file"># File 'lib/lazier/object.rb', line 50</span>
|
1057
1063
|
|
1058
|
-
<span class='kw'>def</span> <span class='
|
1059
|
-
<span class='kw'>self</span><span class='
|
1060
|
-
<span class='kw'>end</span
|
1064
|
+
<span class='rubyid_def def kw'>def</span> <span class='rubyid_is_float? fid id'>is_float?</span>
|
1065
|
+
<span class='rubyid_self self kw'>self</span><span class='dot token'>.</span><span class='rubyid_is_a? fid id'>is_a?</span><span class='lparen token'>(</span><span class='colon3 op'>::</span><span class='rubyid_Float constant id'>Float</span><span class='rparen token'>)</span> <span class='orop op'>||</span> <span class='regexp val'>/^([+-]?)(\d+)([.,]\d+)?$/</span><span class='dot token'>.</span><span class='rubyid_match identifier id'>match</span><span class='lparen token'>(</span><span class='rubyid_self self kw'>self</span><span class='dot token'>.</span><span class='rubyid_normalize_number identifier id'>normalize_number</span><span class='rparen token'>)</span>
|
1066
|
+
<span class='rubyid_end end kw'>end</span>
|
1067
|
+
</pre>
|
1061
1068
|
</td>
|
1062
1069
|
</tr>
|
1063
1070
|
</table>
|
@@ -1112,9 +1119,10 @@
|
|
1112
1119
|
<td>
|
1113
1120
|
<pre class="code"><span class="info file"># File 'lib/lazier/object.rb', line 43</span>
|
1114
1121
|
|
1115
|
-
<span class='kw'>def</span> <span class='
|
1116
|
-
<span class='kw'>self</span><span class='
|
1117
|
-
<span class='kw'>end</span
|
1122
|
+
<span class='rubyid_def def kw'>def</span> <span class='rubyid_is_integer? fid id'>is_integer?</span>
|
1123
|
+
<span class='rubyid_self self kw'>self</span><span class='dot token'>.</span><span class='rubyid_is_a? fid id'>is_a?</span><span class='lparen token'>(</span><span class='colon3 op'>::</span><span class='rubyid_Integer constant id'>Integer</span><span class='rparen token'>)</span> <span class='orop op'>||</span> <span class='regexp val'>/^([+-]?)(\d+)$/</span><span class='dot token'>.</span><span class='rubyid_match identifier id'>match</span><span class='lparen token'>(</span><span class='rubyid_self self kw'>self</span><span class='dot token'>.</span><span class='rubyid_normalize_number identifier id'>normalize_number</span><span class='rparen token'>)</span>
|
1124
|
+
<span class='rubyid_end end kw'>end</span>
|
1125
|
+
</pre>
|
1118
1126
|
</td>
|
1119
1127
|
</tr>
|
1120
1128
|
</table>
|
@@ -1169,9 +1177,10 @@
|
|
1169
1177
|
<td>
|
1170
1178
|
<pre class="code"><span class="info file"># File 'lib/lazier/object.rb', line 36</span>
|
1171
1179
|
|
1172
|
-
<span class='kw'>def</span> <span class='
|
1173
|
-
<span class='kw'>self</span><span class='
|
1174
|
-
<span class='kw'>end</span
|
1180
|
+
<span class='rubyid_def def kw'>def</span> <span class='rubyid_is_number? fid id'>is_number?</span>
|
1181
|
+
<span class='rubyid_self self kw'>self</span><span class='dot token'>.</span><span class='rubyid_is_float? fid id'>is_float?</span>
|
1182
|
+
<span class='rubyid_end end kw'>end</span>
|
1183
|
+
</pre>
|
1175
1184
|
</td>
|
1176
1185
|
</tr>
|
1177
1186
|
</table>
|
@@ -1239,22 +1248,23 @@
|
|
1239
1248
|
<td>
|
1240
1249
|
<pre class="code"><span class="info file"># File 'lib/lazier/object.rb', line 16</span>
|
1241
1250
|
|
1242
|
-
<span class='kw'>def</span> <span class='
|
1243
|
-
<span class='
|
1244
|
-
|
1245
|
-
<span class='kw'>if</span> <span class='kw'>self</span> <span class='op'>==</span> <span class='kw'>true</span> <span class='kw'>then</span>
|
1246
|
-
<span class='
|
1247
|
-
<span class='kw'>elsif</span> <span class='op'>!</span><span class='kw'>self</span> <span class='kw'>then</span>
|
1248
|
-
<span class='
|
1249
|
-
<span class='kw'>else</span>
|
1250
|
-
<span class='
|
1251
|
-
<span class='
|
1252
|
-
<span class='
|
1253
|
-
<span class='
|
1254
|
-
<span class='kw'>end</span>
|
1255
|
-
|
1256
|
-
<span class='
|
1257
|
-
<span class='kw'>end</span
|
1251
|
+
<span class='rubyid_def def kw'>def</span> <span class='rubyid_normalize_number identifier id'>normalize_number</span>
|
1252
|
+
<span class='rubyid_rv identifier id'>rv</span> <span class='assign token'>=</span> <span class='string val'>""</span>
|
1253
|
+
|
1254
|
+
<span class='rubyid_if if kw'>if</span> <span class='rubyid_self self kw'>self</span> <span class='eq op'>==</span> <span class='rubyid_true true kw'>true</span> <span class='rubyid_then then kw'>then</span>
|
1255
|
+
<span class='rubyid_rv identifier id'>rv</span> <span class='assign token'>=</span> <span class='string val'>"1"</span>
|
1256
|
+
<span class='rubyid_elsif elsif kw'>elsif</span> <span class='notop op'>!</span><span class='rubyid_self self kw'>self</span> <span class='rubyid_then then kw'>then</span>
|
1257
|
+
<span class='rubyid_rv identifier id'>rv</span> <span class='assign token'>=</span> <span class='string val'>"0"</span>
|
1258
|
+
<span class='rubyid_else else kw'>else</span>
|
1259
|
+
<span class='rubyid_rv identifier id'>rv</span> <span class='assign token'>=</span> <span class='rubyid_self self kw'>self</span><span class='dot token'>.</span><span class='rubyid_ensure_string identifier id'>ensure_string</span><span class='dot token'>.</span><span class='rubyid_strip identifier id'>strip</span>
|
1260
|
+
<span class='rubyid_rv identifier id'>rv</span> <span class='assign token'>=</span> <span class='rubyid_rv identifier id'>rv</span><span class='dot token'>.</span><span class='rubyid_split identifier id'>split</span><span class='lparen token'>(</span><span class='regexp val'>/[\.,]/</span><span class='rparen token'>)</span>
|
1261
|
+
<span class='rubyid_rv identifier id'>rv</span><span class='lbrack token'>[</span><span class='integer val'>-1</span><span class='rbrack token'>]</span> <span class='assign token'>=</span> <span class='string val'>"."</span> <span class='plus op'>+</span> <span class='rubyid_rv identifier id'>rv</span><span class='lbrack token'>[</span><span class='integer val'>-1</span><span class='rbrack token'>]</span> <span class='rubyid_if if_mod kw'>if</span> <span class='rubyid_rv identifier id'>rv</span><span class='dot token'>.</span><span class='rubyid_length identifier id'>length</span> <span class='gt op'>></span> <span class='integer val'>1</span>
|
1262
|
+
<span class='rubyid_rv identifier id'>rv</span> <span class='assign token'>=</span> <span class='rubyid_rv identifier id'>rv</span><span class='dot token'>.</span><span class='rubyid_join identifier id'>join</span><span class='lparen token'>(</span><span class='string val'>""</span><span class='rparen token'>)</span>
|
1263
|
+
<span class='rubyid_end end kw'>end</span>
|
1264
|
+
|
1265
|
+
<span class='rubyid_rv identifier id'>rv</span>
|
1266
|
+
<span class='rubyid_end end kw'>end</span>
|
1267
|
+
</pre>
|
1258
1268
|
</td>
|
1259
1269
|
</tr>
|
1260
1270
|
</table>
|
@@ -1330,9 +1340,10 @@
|
|
1330
1340
|
<td>
|
1331
1341
|
<pre class="code"><span class="info file"># File 'lib/lazier/object.rb', line 120</span>
|
1332
1342
|
|
1333
|
-
<span class='kw'>def</span> <span class='
|
1334
|
-
<span class='lparen'>(</span><span class='kw'>self</span><span class='
|
1335
|
-
<span class='kw'>end</span
|
1343
|
+
<span class='rubyid_def def kw'>def</span> <span class='rubyid_round_to_precision identifier id'>round_to_precision</span><span class='lparen token'>(</span><span class='rubyid_prec identifier id'>prec</span> <span class='assign token'>=</span> <span class='integer val'>2</span><span class='rparen token'>)</span>
|
1344
|
+
<span class='lparen token'>(</span><span class='rubyid_self self kw'>self</span><span class='dot token'>.</span><span class='rubyid_is_number? fid id'>is_number?</span> <span class='andop op'>&&</span> <span class='rubyid_prec identifier id'>prec</span> <span class='geq op'>>=</span> <span class='integer val'>0</span><span class='rparen token'>)</span> <span class='question op'>?</span> <span class='rubyid_number_with_precision identifier id'>number_with_precision</span><span class='lparen token'>(</span><span class='rubyid_self self kw'>self</span><span class='comma token'>,</span> <span class='symbol val'>:precision</span> <span class='assign token'>=</span><span class='gt op'>></span> <span class='rubyid_prec identifier id'>prec</span><span class='rparen token'>)</span> <span class='colon op'>:</span> <span class='rubyid_nil nil kw'>nil</span>
|
1345
|
+
<span class='rubyid_end end kw'>end</span>
|
1346
|
+
</pre>
|
1336
1347
|
</td>
|
1337
1348
|
</tr>
|
1338
1349
|
</table>
|
@@ -1389,11 +1400,12 @@
|
|
1389
1400
|
<td>
|
1390
1401
|
<pre class="code"><span class="info file"># File 'lib/lazier/object.rb', line 110</span>
|
1391
1402
|
|
1392
|
-
<span class='kw'>def</span> <span class='
|
1393
|
-
<span class='
|
1394
|
-
<span class='
|
1395
|
-
<span class='lparen'>(</span><span class='
|
1396
|
-
<span class='kw'>end</span
|
1403
|
+
<span class='rubyid_def def kw'>def</span> <span class='rubyid_to_boolean identifier id'>to_boolean</span>
|
1404
|
+
<span class='rubyid_rv identifier id'>rv</span> <span class='assign token'>=</span> <span class='rubyid_self self kw'>self</span>
|
1405
|
+
<span class='rubyid_rv identifier id'>rv</span> <span class='assign token'>=</span> <span class='rubyid_rv identifier id'>rv</span><span class='dot token'>.</span><span class='rubyid_to_i identifier id'>to_i</span> <span class='rubyid_if if_mod kw'>if</span> <span class='rubyid_rv identifier id'>rv</span><span class='dot token'>.</span><span class='rubyid_is_a? fid id'>is_a?</span><span class='lparen token'>(</span><span class='colon3 op'>::</span><span class='rubyid_Float constant id'>Float</span><span class='rparen token'>)</span>
|
1406
|
+
<span class='lparen token'>(</span><span class='rubyid_rv identifier id'>rv</span><span class='dot token'>.</span><span class='rubyid_is_a? fid id'>is_a?</span><span class='lparen token'>(</span><span class='rubyid_TrueClass constant id'>TrueClass</span><span class='rparen token'>)</span> <span class='orop op'>||</span> <span class='regexp val'>/^(1|on|true|yes|t|y)$/i</span><span class='dot token'>.</span><span class='rubyid_match identifier id'>match</span><span class='lparen token'>(</span><span class='rubyid_rv identifier id'>rv</span><span class='dot token'>.</span><span class='rubyid_ensure_string identifier id'>ensure_string</span><span class='dot token'>.</span><span class='rubyid_strip identifier id'>strip</span><span class='rparen token'>)</span><span class='rparen token'>)</span> <span class='question op'>?</span> <span class='rubyid_true true kw'>true</span> <span class='colon op'>:</span> <span class='rubyid_false false kw'>false</span>
|
1407
|
+
<span class='rubyid_end end kw'>end</span>
|
1408
|
+
</pre>
|
1397
1409
|
</td>
|
1398
1410
|
</tr>
|
1399
1411
|
</table>
|
@@ -1475,15 +1487,16 @@
|
|
1475
1487
|
<td>
|
1476
1488
|
<pre class="code"><span class="info file"># File 'lib/lazier/object.rb', line 83</span>
|
1477
1489
|
|
1478
|
-
<span class='kw'>def</span> <span class='
|
1479
|
-
<span class='kw'>if</span> <span class='kw'>self</span><span class='
|
1480
|
-
<span class='kw'>self</span>
|
1481
|
-
<span class='kw'>elsif</span> <span class='kw'>self</span><span class='
|
1482
|
-
<span class='kw'>self</span><span class='
|
1483
|
-
<span class='kw'>else</span>
|
1484
|
-
<span class='kw'>self</span><span class='
|
1485
|
-
<span class='kw'>end</span>
|
1486
|
-
<span class='kw'>end</span
|
1490
|
+
<span class='rubyid_def def kw'>def</span> <span class='rubyid_to_float identifier id'>to_float</span><span class='lparen token'>(</span><span class='rubyid_default_value identifier id'>default_value</span> <span class='assign token'>=</span> <span class='integer val'>0</span><span class='integer val'>.0</span><span class='rparen token'>)</span>
|
1491
|
+
<span class='rubyid_if if kw'>if</span> <span class='rubyid_self self kw'>self</span><span class='dot token'>.</span><span class='rubyid_is_a? fid id'>is_a?</span><span class='lparen token'>(</span><span class='colon3 op'>::</span><span class='rubyid_Float constant id'>Float</span><span class='rparen token'>)</span>
|
1492
|
+
<span class='rubyid_self self kw'>self</span>
|
1493
|
+
<span class='rubyid_elsif elsif kw'>elsif</span> <span class='rubyid_self self kw'>self</span><span class='dot token'>.</span><span class='rubyid_is_a? fid id'>is_a?</span><span class='lparen token'>(</span><span class='colon3 op'>::</span><span class='rubyid_Integer constant id'>Integer</span><span class='rparen token'>)</span>
|
1494
|
+
<span class='rubyid_self self kw'>self</span><span class='dot token'>.</span><span class='rubyid_to_f identifier id'>to_f</span>
|
1495
|
+
<span class='rubyid_else else kw'>else</span>
|
1496
|
+
<span class='rubyid_self self kw'>self</span><span class='dot token'>.</span><span class='rubyid_is_float? fid id'>is_float?</span> <span class='integer val'>? </span><span class='colon2 op'>::</span><span class='rubyid_Kernel constant id'>Kernel</span><span class='dot token'>.</span><span class='rubyid_Float constant id'>Float</span><span class='lparen token'>(</span><span class='rubyid_self self kw'>self</span><span class='dot token'>.</span><span class='rubyid_normalize_number identifier id'>normalize_number</span><span class='rparen token'>)</span> <span class='colon op'>:</span> <span class='rubyid_default_value identifier id'>default_value</span>
|
1497
|
+
<span class='rubyid_end end kw'>end</span>
|
1498
|
+
<span class='rubyid_end end kw'>end</span>
|
1499
|
+
</pre>
|
1487
1500
|
</td>
|
1488
1501
|
</tr>
|
1489
1502
|
</table>
|
@@ -1565,15 +1578,16 @@
|
|
1565
1578
|
<td>
|
1566
1579
|
<pre class="code"><span class="info file"># File 'lib/lazier/object.rb', line 97</span>
|
1567
1580
|
|
1568
|
-
<span class='kw'>def</span> <span class='
|
1569
|
-
<span class='kw'>if</span> <span class='kw'>self</span><span class='
|
1570
|
-
<span class='kw'>self</span>
|
1571
|
-
<span class='kw'>elsif</span> <span class='kw'>self</span><span class='
|
1572
|
-
<span class='kw'>self</span><span class='
|
1573
|
-
<span class='kw'>else</span>
|
1574
|
-
<span class='kw'>self</span><span class='
|
1575
|
-
<span class='kw'>end</span>
|
1576
|
-
<span class='kw'>end</span
|
1581
|
+
<span class='rubyid_def def kw'>def</span> <span class='rubyid_to_integer identifier id'>to_integer</span><span class='lparen token'>(</span><span class='rubyid_default_value identifier id'>default_value</span> <span class='assign token'>=</span> <span class='integer val'>0</span><span class='rparen token'>)</span>
|
1582
|
+
<span class='rubyid_if if kw'>if</span> <span class='rubyid_self self kw'>self</span><span class='dot token'>.</span><span class='rubyid_is_a? fid id'>is_a?</span><span class='lparen token'>(</span><span class='colon3 op'>::</span><span class='rubyid_Integer constant id'>Integer</span><span class='rparen token'>)</span>
|
1583
|
+
<span class='rubyid_self self kw'>self</span>
|
1584
|
+
<span class='rubyid_elsif elsif kw'>elsif</span> <span class='rubyid_self self kw'>self</span><span class='dot token'>.</span><span class='rubyid_is_a? fid id'>is_a?</span><span class='lparen token'>(</span><span class='colon3 op'>::</span><span class='rubyid_Float constant id'>Float</span><span class='rparen token'>)</span>
|
1585
|
+
<span class='rubyid_self self kw'>self</span><span class='dot token'>.</span><span class='rubyid_to_i identifier id'>to_i</span>
|
1586
|
+
<span class='rubyid_else else kw'>else</span>
|
1587
|
+
<span class='rubyid_self self kw'>self</span><span class='dot token'>.</span><span class='rubyid_is_integer? fid id'>is_integer?</span> <span class='integer val'>? </span><span class='colon2 op'>::</span><span class='rubyid_Kernel constant id'>Kernel</span><span class='dot token'>.</span><span class='rubyid_Integer constant id'>Integer</span><span class='lparen token'>(</span><span class='rubyid_self self kw'>self</span><span class='dot token'>.</span><span class='rubyid_normalize_number identifier id'>normalize_number</span><span class='rparen token'>)</span> <span class='colon op'>:</span> <span class='rubyid_default_value identifier id'>default_value</span>
|
1588
|
+
<span class='rubyid_end end kw'>end</span>
|
1589
|
+
<span class='rubyid_end end kw'>end</span>
|
1590
|
+
</pre>
|
1577
1591
|
</td>
|
1578
1592
|
</tr>
|
1579
1593
|
</table>
|
@@ -1584,9 +1598,9 @@
|
|
1584
1598
|
</div>
|
1585
1599
|
|
1586
1600
|
<div id="footer">
|
1587
|
-
Generated on
|
1601
|
+
Generated on Wed Aug 22 16:33:56 2012 by
|
1588
1602
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
1589
|
-
0.8.2.1 (ruby-1.
|
1603
|
+
0.8.2.1 (ruby-1.8.7).
|
1590
1604
|
</div>
|
1591
1605
|
|
1592
1606
|
</body>
|