cowtech-extensions 2.5.0 → 2.5.1
Sign up to get free protection for your applications and to get access to all the features.
- data/doc/Cowtech.html +2 -2
- data/doc/Cowtech/Extensions.html +101 -88
- data/doc/Cowtech/Extensions/Boolean.html +10 -8
- data/doc/Cowtech/Extensions/DateTime.html +58 -52
- data/doc/Cowtech/Extensions/DateTime/ClassMethods.html +91 -79
- data/doc/Cowtech/Extensions/Exceptions.html +2 -2
- data/doc/Cowtech/Extensions/Exceptions/Dump.html +2 -2
- data/doc/Cowtech/Extensions/Hash.html +20 -18
- data/doc/Cowtech/Extensions/Math.html +2 -2
- data/doc/Cowtech/Extensions/Math/ClassMethods.html +24 -22
- data/doc/Cowtech/Extensions/Object.html +95 -81
- data/doc/Cowtech/Extensions/Pathname.html +11 -10
- data/doc/Cowtech/Extensions/Settings.html +80 -70
- data/doc/Cowtech/Extensions/String.html +26 -22
- data/doc/Cowtech/Extensions/TimeZone.html +61 -52
- data/doc/Cowtech/Extensions/TimeZone/ClassMethods.html +65 -59
- data/doc/Cowtech/Extensions/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/cowtech-extensions.rb +7 -1
- data/lib/cowtech-extensions/settings.rb +6 -6
- data/lib/cowtech-extensions/version.rb +8 -8
- data/spec/cowtech-extensions/settings_spec.rb +17 -0
- metadata +138 -120
@@ -116,9 +116,9 @@
|
|
116
116
|
</div>
|
117
117
|
|
118
118
|
<div id="footer">
|
119
|
-
Generated on
|
119
|
+
Generated on Fri Jul 20 10:23: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 Fri Jul 20 10:23:57 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>
|
@@ -278,19 +278,20 @@
|
|
278
278
|
<td>
|
279
279
|
<pre class="code"><span class="info file"># File 'lib/cowtech-extensions/hash.rb', line 19</span>
|
280
280
|
|
281
|
-
<span class='kw'>def</span> <span class='
|
282
|
-
|
283
|
-
|
284
|
-
|
285
|
-
|
286
|
-
|
287
|
-
|
288
|
-
|
289
|
-
|
290
|
-
|
291
|
-
|
292
|
-
|
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/cowtech-extensions/hash.rb', line 37</span>
|
373
374
|
|
374
|
-
<span class='kw'>def</span> <span class='
|
375
|
-
|
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 Fri Jul 20 10:23: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>
|
@@ -121,9 +121,9 @@
|
|
121
121
|
</div>
|
122
122
|
|
123
123
|
<div id="footer">
|
124
|
-
Generated on
|
124
|
+
Generated on Fri Jul 20 10:23: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/cowtech-extensions/math.rb', line 35</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/cowtech-extensions/math.rb', line 19</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 Fri Jul 20 10:23: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>
|
@@ -549,21 +549,22 @@
|
|
549
549
|
<td>
|
550
550
|
<pre class="code"><span class="info file"># File 'lib/cowtech-extensions/object.rb', line 148</span>
|
551
551
|
|
552
|
-
<span class='kw'>def</span> <span class='
|
553
|
-
|
554
|
-
|
555
|
-
|
556
|
-
|
557
|
-
|
558
|
-
|
559
|
-
|
560
|
-
|
561
|
-
|
562
|
-
|
563
|
-
|
564
|
-
|
565
|
-
|
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_Cowtech constant id'>Cowtech</span><span class='colon2 op'>::</span><span class='rubyid_Extensions constant id'>Extensions</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/cowtech-extensions/object.rb', line 55</span>
|
620
621
|
|
621
|
-
<span class='kw'>def</span> <span class='
|
622
|
-
|
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>
|
@@ -675,9 +677,10 @@
|
|
675
677
|
<td>
|
676
678
|
<pre class="code"><span class="info file"># File 'lib/cowtech-extensions/object.rb', line 62</span>
|
677
679
|
|
678
|
-
<span class='kw'>def</span> <span class='
|
679
|
-
|
680
|
-
<span class='kw'>end</span
|
680
|
+
<span class='rubyid_def def kw'>def</span> <span class='rubyid_ensure_string identifier id'>ensure_string</span>
|
681
|
+
<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>
|
682
|
+
<span class='rubyid_end end kw'>end</span>
|
683
|
+
</pre>
|
681
684
|
</td>
|
682
685
|
</tr>
|
683
686
|
</table>
|
@@ -782,14 +785,15 @@
|
|
782
785
|
<td>
|
783
786
|
<pre class="code"><span class="info file"># File 'lib/cowtech-extensions/object.rb', line 134</span>
|
784
787
|
|
785
|
-
<span class='kw'>def</span> <span class='
|
786
|
-
|
787
|
-
|
788
|
-
|
789
|
-
|
788
|
+
<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>
|
789
|
+
<span class='rubyid_names identifier id'>names</span> <span class='assign token'>=</span> <span class='lbrace token'>{</span>
|
790
|
+
<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_Cowtech constant id'>Cowtech</span><span class='colon2 op'>::</span><span class='rubyid_Extensions constant id'>Extensions</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>
|
791
|
+
<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_Cowtech constant id'>Cowtech</span><span class='colon2 op'>::</span><span class='rubyid_Extensions constant id'>Extensions</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>
|
792
|
+
<span class='rbrace token'>}</span>
|
790
793
|
|
791
|
-
|
792
|
-
<span class='kw'>end</span
|
794
|
+
<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>
|
795
|
+
<span class='rubyid_end end kw'>end</span>
|
796
|
+
</pre>
|
793
797
|
</td>
|
794
798
|
</tr>
|
795
799
|
</table>
|
@@ -928,14 +932,15 @@
|
|
928
932
|
<td>
|
929
933
|
<pre class="code"><span class="info file"># File 'lib/cowtech-extensions/object.rb', line 119</span>
|
930
934
|
|
931
|
-
<span class='kw'>def</span> <span class='
|
932
|
-
<span class='
|
933
|
-
<span class='
|
934
|
-
<span class='
|
935
|
-
<span class='
|
935
|
+
<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>
|
936
|
+
<span class='rubyid_prec identifier id'>prec</span> <span class='assign token'>=</span> <span class='colon3 op'>::</span><span class='rubyid_Cowtech constant id'>Cowtech</span><span class='colon2 op'>::</span><span class='rubyid_Extensions constant id'>Extensions</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>
|
937
|
+
<span class='rubyid_decimal_separator identifier id'>decimal_separator</span> <span class='assign token'>=</span> <span class='colon3 op'>::</span><span class='rubyid_Cowtech constant id'>Cowtech</span><span class='colon2 op'>::</span><span class='rubyid_Extensions constant id'>Extensions</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>
|
938
|
+
<span class='rubyid_add_string identifier id'>add_string</span> <span class='assign token'>=</span> <span class='colon3 op'>::</span><span class='rubyid_Cowtech constant id'>Cowtech</span><span class='colon2 op'>::</span><span class='rubyid_Extensions constant id'>Extensions</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>
|
939
|
+
<span class='rubyid_k_separator identifier id'>k_separator</span> <span class='assign token'>=</span> <span class='colon3 op'>::</span><span class='rubyid_Cowtech constant id'>Cowtech</span><span class='colon2 op'>::</span><span class='rubyid_Extensions constant id'>Extensions</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>
|
936
940
|
|
937
|
-
<span class='lparen'>(</span><span class='kw'>self</span><span class='
|
938
|
-
<span class='kw'>end</span
|
941
|
+
<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>
|
942
|
+
<span class='rubyid_end end kw'>end</span>
|
943
|
+
</pre>
|
939
944
|
</td>
|
940
945
|
</tr>
|
941
946
|
</table>
|
@@ -990,9 +995,10 @@
|
|
990
995
|
<td>
|
991
996
|
<pre class="code"><span class="info file"># File 'lib/cowtech-extensions/object.rb', line 48</span>
|
992
997
|
|
993
|
-
<span class='kw'>def</span> <span class='
|
994
|
-
|
995
|
-
<span class='kw'>end</span
|
998
|
+
<span class='rubyid_def def kw'>def</span> <span class='rubyid_is_boolean? fid id'>is_boolean?</span>
|
999
|
+
<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>
|
1000
|
+
<span class='rubyid_end end kw'>end</span>
|
1001
|
+
</pre>
|
996
1002
|
</td>
|
997
1003
|
</tr>
|
998
1004
|
</table>
|
@@ -1047,9 +1053,10 @@
|
|
1047
1053
|
<td>
|
1048
1054
|
<pre class="code"><span class="info file"># File 'lib/cowtech-extensions/object.rb', line 41</span>
|
1049
1055
|
|
1050
|
-
<span class='kw'>def</span> <span class='
|
1051
|
-
|
1052
|
-
<span class='kw'>end</span
|
1056
|
+
<span class='rubyid_def def kw'>def</span> <span class='rubyid_is_float? fid id'>is_float?</span>
|
1057
|
+
<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>
|
1058
|
+
<span class='rubyid_end end kw'>end</span>
|
1059
|
+
</pre>
|
1053
1060
|
</td>
|
1054
1061
|
</tr>
|
1055
1062
|
</table>
|
@@ -1104,9 +1111,10 @@
|
|
1104
1111
|
<td>
|
1105
1112
|
<pre class="code"><span class="info file"># File 'lib/cowtech-extensions/object.rb', line 34</span>
|
1106
1113
|
|
1107
|
-
<span class='kw'>def</span> <span class='
|
1108
|
-
|
1109
|
-
<span class='kw'>end</span
|
1114
|
+
<span class='rubyid_def def kw'>def</span> <span class='rubyid_is_integer? fid id'>is_integer?</span>
|
1115
|
+
<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>
|
1116
|
+
<span class='rubyid_end end kw'>end</span>
|
1117
|
+
</pre>
|
1110
1118
|
</td>
|
1111
1119
|
</tr>
|
1112
1120
|
</table>
|
@@ -1161,9 +1169,10 @@
|
|
1161
1169
|
<td>
|
1162
1170
|
<pre class="code"><span class="info file"># File 'lib/cowtech-extensions/object.rb', line 27</span>
|
1163
1171
|
|
1164
|
-
<span class='kw'>def</span> <span class='
|
1165
|
-
|
1166
|
-
<span class='kw'>end</span
|
1172
|
+
<span class='rubyid_def def kw'>def</span> <span class='rubyid_is_number? fid id'>is_number?</span>
|
1173
|
+
<span class='rubyid_self self kw'>self</span><span class='dot token'>.</span><span class='rubyid_is_float? fid id'>is_float?</span>
|
1174
|
+
<span class='rubyid_end end kw'>end</span>
|
1175
|
+
</pre>
|
1167
1176
|
</td>
|
1168
1177
|
</tr>
|
1169
1178
|
</table>
|
@@ -1221,12 +1230,13 @@
|
|
1221
1230
|
<td>
|
1222
1231
|
<pre class="code"><span class="info file"># File 'lib/cowtech-extensions/object.rb', line 17</span>
|
1223
1232
|
|
1224
|
-
<span class='kw'>def</span> <span class='
|
1225
|
-
<span class='
|
1226
|
-
<span class='
|
1227
|
-
<span class='
|
1228
|
-
<span class='
|
1229
|
-
<span class='kw'>end</span
|
1233
|
+
<span class='rubyid_def def kw'>def</span> <span class='rubyid_normalize_number identifier id'>normalize_number</span>
|
1234
|
+
<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>
|
1235
|
+
<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>
|
1236
|
+
<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>
|
1237
|
+
<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>
|
1238
|
+
<span class='rubyid_end end kw'>end</span>
|
1239
|
+
</pre>
|
1230
1240
|
</td>
|
1231
1241
|
</tr>
|
1232
1242
|
</table>
|
@@ -1302,9 +1312,10 @@
|
|
1302
1312
|
<td>
|
1303
1313
|
<pre class="code"><span class="info file"># File 'lib/cowtech-extensions/object.rb', line 107</span>
|
1304
1314
|
|
1305
|
-
<span class='kw'>def</span> <span class='
|
1306
|
-
|
1307
|
-
<span class='kw'>end</span
|
1315
|
+
<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>
|
1316
|
+
<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>
|
1317
|
+
<span class='rubyid_end end kw'>end</span>
|
1318
|
+
</pre>
|
1308
1319
|
</td>
|
1309
1320
|
</tr>
|
1310
1321
|
</table>
|
@@ -1361,11 +1372,12 @@
|
|
1361
1372
|
<td>
|
1362
1373
|
<pre class="code"><span class="info file"># File 'lib/cowtech-extensions/object.rb', line 97</span>
|
1363
1374
|
|
1364
|
-
<span class='kw'>def</span> <span class='
|
1365
|
-
|
1366
|
-
|
1367
|
-
|
1368
|
-
<span class='kw'>end</span
|
1375
|
+
<span class='rubyid_def def kw'>def</span> <span class='rubyid_to_boolean identifier id'>to_boolean</span>
|
1376
|
+
<span class='rubyid_rv identifier id'>rv</span> <span class='assign token'>=</span> <span class='rubyid_self self kw'>self</span>
|
1377
|
+
<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>
|
1378
|
+
<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>
|
1379
|
+
<span class='rubyid_end end kw'>end</span>
|
1380
|
+
</pre>
|
1369
1381
|
</td>
|
1370
1382
|
</tr>
|
1371
1383
|
</table>
|
@@ -1447,15 +1459,16 @@
|
|
1447
1459
|
<td>
|
1448
1460
|
<pre class="code"><span class="info file"># File 'lib/cowtech-extensions/object.rb', line 70</span>
|
1449
1461
|
|
1450
|
-
<span class='kw'>def</span> <span class='
|
1451
|
-
|
1452
|
-
|
1453
|
-
|
1454
|
-
|
1455
|
-
|
1456
|
-
|
1457
|
-
|
1458
|
-
<span class='kw'>end</span
|
1462
|
+
<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>
|
1463
|
+
<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>
|
1464
|
+
<span class='rubyid_self self kw'>self</span>
|
1465
|
+
<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>
|
1466
|
+
<span class='rubyid_self self kw'>self</span><span class='dot token'>.</span><span class='rubyid_to_f identifier id'>to_f</span>
|
1467
|
+
<span class='rubyid_else else kw'>else</span>
|
1468
|
+
<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>
|
1469
|
+
<span class='rubyid_end end kw'>end</span>
|
1470
|
+
<span class='rubyid_end end kw'>end</span>
|
1471
|
+
</pre>
|
1459
1472
|
</td>
|
1460
1473
|
</tr>
|
1461
1474
|
</table>
|
@@ -1537,15 +1550,16 @@
|
|
1537
1550
|
<td>
|
1538
1551
|
<pre class="code"><span class="info file"># File 'lib/cowtech-extensions/object.rb', line 84</span>
|
1539
1552
|
|
1540
|
-
<span class='kw'>def</span> <span class='
|
1541
|
-
<span class='kw'>if</span> <span class='kw'>self</span><span class='
|
1542
|
-
<span class='kw'>self</span>
|
1543
|
-
<span class='kw'>elsif</span> <span class='kw'>self</span><span class='
|
1544
|
-
<span class='kw'>self</span><span class='
|
1545
|
-
<span class='kw'>else</span>
|
1546
|
-
<span class='kw'>self</span><span class='
|
1547
|
-
<span class='kw'>end</span>
|
1548
|
-
<span class='kw'>end</span
|
1553
|
+
<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>
|
1554
|
+
<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>
|
1555
|
+
<span class='rubyid_self self kw'>self</span>
|
1556
|
+
<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>
|
1557
|
+
<span class='rubyid_self self kw'>self</span><span class='dot token'>.</span><span class='rubyid_to_i identifier id'>to_i</span>
|
1558
|
+
<span class='rubyid_else else kw'>else</span>
|
1559
|
+
<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>
|
1560
|
+
<span class='rubyid_end end kw'>end</span>
|
1561
|
+
<span class='rubyid_end end kw'>end</span>
|
1562
|
+
</pre>
|
1549
1563
|
</td>
|
1550
1564
|
</tr>
|
1551
1565
|
</table>
|
@@ -1556,9 +1570,9 @@
|
|
1556
1570
|
</div>
|
1557
1571
|
|
1558
1572
|
<div id="footer">
|
1559
|
-
Generated on
|
1573
|
+
Generated on Fri Jul 20 10:23:56 2012 by
|
1560
1574
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
1561
|
-
0.8.2.1 (ruby-1.
|
1575
|
+
0.8.2.1 (ruby-1.8.7).
|
1562
1576
|
</div>
|
1563
1577
|
|
1564
1578
|
</body>
|
@@ -159,9 +159,9 @@
|
|
159
159
|
<div class="discussion">
|
160
160
|
<p>Returns all the components that are included in this path.</p>
|
161
161
|
|
162
|
-
<pre class="code ruby"><code><span class='
|
163
|
-
<span class='comment'># => ["usr", "bin", "ruby"]
|
164
|
-
</
|
162
|
+
<pre class="code ruby"><code><span class='rubyid_Pathname constant id'>Pathname</span><span class='dot token'>.</span><span class='rubyid_new identifier id'>new</span><span class='lparen token'>(</span><span class='string val'>"/usr/bin/ruby"</span><span class='rparen token'>)</span><span class='dot token'>.</span><span class='rubyid_components identifier id'>components</span>
|
163
|
+
<span class='comment val'># => ["usr", "bin", "ruby"]</span>
|
164
|
+
</code></pre>
|
165
165
|
|
166
166
|
|
167
167
|
</div>
|
@@ -201,11 +201,12 @@
|
|
201
201
|
<td>
|
202
202
|
<pre class="code"><span class="info file"># File 'lib/cowtech-extensions/pathname.rb', line 21</span>
|
203
203
|
|
204
|
-
<span class='kw'>def</span> <span class='
|
205
|
-
|
206
|
-
|
207
|
-
|
208
|
-
<span class='kw'>end</span
|
204
|
+
<span class='rubyid_def def kw'>def</span> <span class='rubyid_components identifier id'>components</span>
|
205
|
+
<span class='rubyid_rv identifier id'>rv</span> <span class='assign token'>=</span> <span class='lbrack token'>[</span><span class='rbrack token'>]</span>
|
206
|
+
<span class='rubyid_self self kw'>self</span><span class='dot token'>.</span><span class='rubyid_each_filename identifier id'>each_filename</span> <span class='lbrace token'>{</span> <span class='bitor op'>|</span><span class='rubyid_p identifier id'>p</span><span class='bitor op'>|</span> <span class='rubyid_rv identifier id'>rv</span> <span class='lshft op'><<</span> <span class='rubyid_p identifier id'>p</span> <span class='rbrace token'>}</span>
|
207
|
+
<span class='rubyid_rv identifier id'>rv</span>
|
208
|
+
<span class='rubyid_end end kw'>end</span>
|
209
|
+
</pre>
|
209
210
|
</td>
|
210
211
|
</tr>
|
211
212
|
</table>
|
@@ -216,9 +217,9 @@
|
|
216
217
|
</div>
|
217
218
|
|
218
219
|
<div id="footer">
|
219
|
-
Generated on
|
220
|
+
Generated on Fri Jul 20 10:23:56 2012 by
|
220
221
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
221
|
-
0.8.2.1 (ruby-1.
|
222
|
+
0.8.2.1 (ruby-1.8.7).
|
222
223
|
</div>
|
223
224
|
|
224
225
|
</body>
|