cowtech-extensions 2.7.1 → 2.7.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (37) hide show
  1. data/.gitignore +1 -0
  2. data/.travis.yml +4 -2
  3. data/README.md +4 -1
  4. data/doc/Cowtech.html +2 -2
  5. data/doc/Cowtech/Extensions.html +96 -93
  6. data/doc/Cowtech/Extensions/Boolean.html +10 -8
  7. data/doc/Cowtech/Extensions/DateTime.html +58 -52
  8. data/doc/Cowtech/Extensions/DateTime/ClassMethods.html +91 -79
  9. data/doc/Cowtech/Extensions/Exceptions.html +2 -2
  10. data/doc/Cowtech/Extensions/Exceptions/Dump.html +2 -2
  11. data/doc/Cowtech/Extensions/Hash.html +20 -18
  12. data/doc/Cowtech/Extensions/Math.html +2 -2
  13. data/doc/Cowtech/Extensions/Math/ClassMethods.html +24 -22
  14. data/doc/Cowtech/Extensions/Object.html +95 -81
  15. data/doc/Cowtech/Extensions/Pathname.html +11 -10
  16. data/doc/Cowtech/Extensions/Settings.html +80 -70
  17. data/doc/Cowtech/Extensions/String.html +26 -22
  18. data/doc/Cowtech/Extensions/TimeZone.html +98 -86
  19. data/doc/Cowtech/Extensions/TimeZone/ClassMethods.html +79 -72
  20. data/doc/Cowtech/Extensions/Version.html +11 -7
  21. data/doc/_index.html +2 -2
  22. data/doc/file.README.html +9 -6
  23. data/doc/index.html +9 -6
  24. data/doc/top-level-namespace.html +2 -2
  25. data/lib/cowtech-extensions.rb +2 -1
  26. data/lib/cowtech-extensions/version.rb +2 -2
  27. data/spec/cowtech-extensions/boolean_spec.rb +9 -4
  28. data/spec/cowtech-extensions/datetime_spec.rb +106 -100
  29. data/spec/cowtech-extensions/hash_spec.rb +4 -4
  30. data/spec/cowtech-extensions/math_spec.rb +8 -8
  31. data/spec/cowtech-extensions/object_spec.rb +115 -103
  32. data/spec/cowtech-extensions/pathname_spec.rb +3 -1
  33. data/spec/cowtech-extensions/settings_spec.rb +30 -30
  34. data/spec/cowtech-extensions/string_spec.rb +13 -7
  35. data/spec/cowtech-extensions_spec.rb +21 -11
  36. data/spec/spec_helper.rb +7 -1
  37. metadata +4 -4
data/.gitignore CHANGED
@@ -3,3 +3,4 @@ pkg/
3
3
  .idea/
4
4
  Gemfile.lock
5
5
  .yardoc
6
+ tester.rb
data/.travis.yml CHANGED
@@ -1,6 +1,8 @@
1
+ language: ruby
1
2
  rvm:
2
3
  - 1.8.7
3
4
  - 1.9.2
4
5
  - 1.9.3
5
- - jruby
6
- - rbx-18mode
6
+ script: bundle exec rake spec:coverage
7
+ notifications:
8
+ email: false
data/README.md CHANGED
@@ -1,4 +1,7 @@
1
- # cowtech-lib
1
+ # cowtech-extensions
2
+
3
+ [![Build Status](https://secure.travis-ci.org/ShogunPanda/cowtech-extensions.png?branch=master)](http://travis-ci.org/ShogunPanda/cowtech-extensions)
4
+ [![Dependency Status](https://gemnasium.com/ShogunPanda/cowtech-extensions.png?travis)](https://gemnasium.com/ShogunPanda/cowtech-extensions)
2
5
 
3
6
  Several Ruby object enhancements
4
7
  http://github.com/ShogunPanda/cowtech-extensions
data/doc/Cowtech.html CHANGED
@@ -119,9 +119,9 @@ Licensed under the MIT license, which can be found at <a href="http://www.openso
119
119
  </div>
120
120
 
121
121
  <div id="footer">
122
- Generated on Tue Jul 24 12:12:52 2012 by
122
+ Generated on Sat Jul 28 11:24:53 2012 by
123
123
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
124
- 0.8.2.1 (ruby-1.9.2).
124
+ 0.8.2.1 (ruby-1.8.7).
125
125
  </div>
126
126
 
127
127
  </body>
@@ -243,16 +243,17 @@
243
243
  <pre class="lines">
244
244
 
245
245
 
246
- 31
247
246
  32
248
- 33</pre>
247
+ 33
248
+ 34</pre>
249
249
  </td>
250
250
  <td>
251
- <pre class="code"><span class="info file"># File 'lib/cowtech-extensions.rb', line 31</span>
251
+ <pre class="code"><span class="info file"># File 'lib/cowtech-extensions.rb', line 32</span>
252
252
 
253
- <span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_is_ruby_18?'>is_ruby_18?</span>
254
- <span class='const'>RUBY_VERSION</span> <span class='op'>=~</span> <span class='tstring'><span class='regexp_beg'>/</span><span class='tstring_content'>^1\.8</span><span class='regexp_end'>/</span></span>
255
- <span class='kw'>end</span></pre>
253
+ <span class='rubyid_def def kw'>def</span> <span class='rubyid_self self kw'>self</span><span class='dot token'>.</span><span class='rubyid_is_ruby_18? fid id'>is_ruby_18?</span>
254
+ <span class='rubyid_RUBY_VERSION constant id'>RUBY_VERSION</span> <span class='match op'>=~</span> <span class='regexp val'>/^1\.8/</span>
255
+ <span class='rubyid_end end kw'>end</span>
256
+ </pre>
256
257
  </td>
257
258
  </tr>
258
259
  </table>
@@ -326,7 +327,6 @@
326
327
  <pre class="lines">
327
328
 
328
329
 
329
- 53
330
330
  54
331
331
  55
332
332
  56
@@ -400,86 +400,88 @@
400
400
  124
401
401
  125
402
402
  126
403
- 127</pre>
403
+ 127
404
+ 128</pre>
404
405
  </td>
405
406
  <td>
406
- <pre class="code"><span class="info file"># File 'lib/cowtech-extensions.rb', line 53</span>
407
-
408
- <span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_load!'>load!</span><span class='lparen'>(</span><span class='op'>*</span><span class='id identifier rubyid_what'>what</span><span class='rparen'>)</span>
409
- <span class='id identifier rubyid_what'>what</span> <span class='op'>=</span> <span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>object</span><span class='tstring_end'>&quot;</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>boolean</span><span class='tstring_end'>&quot;</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>string</span><span class='tstring_end'>&quot;</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>hash</span><span class='tstring_end'>&quot;</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>datetime</span><span class='tstring_end'>&quot;</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>math</span><span class='tstring_end'>&quot;</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>pathname</span><span class='tstring_end'>&quot;</span></span><span class='rbracket'>]</span> <span class='kw'>if</span> <span class='id identifier rubyid_what'>what</span><span class='period'>.</span><span class='id identifier rubyid_count'>count</span> <span class='op'>==</span> <span class='int'>0</span>
410
- <span class='id identifier rubyid_what'>what</span><span class='period'>.</span><span class='id identifier rubyid_collect!'>collect!</span> <span class='lbrace'>{</span> <span class='op'>|</span><span class='id identifier rubyid_w'>w</span><span class='op'>|</span> <span class='id identifier rubyid_w'>w</span><span class='period'>.</span><span class='id identifier rubyid_to_s'>to_s</span> <span class='rbrace'>}</span>
411
-
412
- <span class='comment'># Dependency resolving
413
- </span> <span class='id identifier rubyid_what'>what</span> <span class='op'>&lt;&lt;</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>object</span><span class='tstring_end'>&quot;</span></span> <span class='kw'>if</span> <span class='id identifier rubyid_what'>what</span><span class='period'>.</span><span class='id identifier rubyid_include?'>include?</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>datetime</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span>
414
- <span class='id identifier rubyid_what'>what</span> <span class='op'>&lt;&lt;</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>object</span><span class='tstring_end'>&quot;</span></span> <span class='kw'>if</span> <span class='id identifier rubyid_what'>what</span><span class='period'>.</span><span class='id identifier rubyid_include?'>include?</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>math</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span>
415
- <span class='id identifier rubyid_what'>what</span><span class='period'>.</span><span class='id identifier rubyid_compact'>compact</span><span class='period'>.</span><span class='id identifier rubyid_uniq!'>uniq!</span>
416
-
417
- <span class='kw'>if</span> <span class='id identifier rubyid_what'>what</span><span class='period'>.</span><span class='id identifier rubyid_include?'>include?</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>object</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span> <span class='kw'>then</span>
418
- <span class='op'>::</span><span class='const'>Object</span><span class='period'>.</span><span class='id identifier rubyid_class_eval'>class_eval</span> <span class='kw'>do</span>
419
- <span class='id identifier rubyid_include'>include</span> <span class='op'>::</span><span class='const'>Cowtech</span><span class='op'>::</span><span class='const'>Extensions</span><span class='op'>::</span><span class='const'>Object</span>
420
- <span class='kw'>end</span>
421
- <span class='kw'>end</span>
422
-
423
- <span class='kw'>if</span> <span class='id identifier rubyid_what'>what</span><span class='period'>.</span><span class='id identifier rubyid_include?'>include?</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>boolean</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span> <span class='kw'>then</span>
424
- <span class='op'>::</span><span class='const'>TrueClass</span><span class='period'>.</span><span class='id identifier rubyid_class_eval'>class_eval</span> <span class='kw'>do</span>
425
- <span class='id identifier rubyid_include'>include</span> <span class='op'>::</span><span class='const'>Cowtech</span><span class='op'>::</span><span class='const'>Extensions</span><span class='op'>::</span><span class='const'>Object</span>
426
- <span class='id identifier rubyid_include'>include</span> <span class='op'>::</span><span class='const'>Cowtech</span><span class='op'>::</span><span class='const'>Extensions</span><span class='op'>::</span><span class='const'>Boolean</span>
427
- <span class='kw'>end</span>
428
-
429
- <span class='op'>::</span><span class='const'>FalseClass</span><span class='period'>.</span><span class='id identifier rubyid_class_eval'>class_eval</span> <span class='kw'>do</span>
430
- <span class='id identifier rubyid_include'>include</span> <span class='op'>::</span><span class='const'>Cowtech</span><span class='op'>::</span><span class='const'>Extensions</span><span class='op'>::</span><span class='const'>Object</span>
431
- <span class='id identifier rubyid_include'>include</span> <span class='op'>::</span><span class='const'>Cowtech</span><span class='op'>::</span><span class='const'>Extensions</span><span class='op'>::</span><span class='const'>Boolean</span>
432
- <span class='kw'>end</span>
433
- <span class='kw'>end</span>
434
-
435
- <span class='kw'>if</span> <span class='id identifier rubyid_what'>what</span><span class='period'>.</span><span class='id identifier rubyid_include?'>include?</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>string</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span> <span class='kw'>then</span>
436
- <span class='op'>::</span><span class='const'>String</span><span class='period'>.</span><span class='id identifier rubyid_class_eval'>class_eval</span> <span class='kw'>do</span>
437
- <span class='id identifier rubyid_include'>include</span> <span class='op'>::</span><span class='const'>Cowtech</span><span class='op'>::</span><span class='const'>Extensions</span><span class='op'>::</span><span class='const'>String</span>
438
- <span class='kw'>end</span>
439
- <span class='kw'>end</span>
440
-
441
- <span class='kw'>if</span> <span class='id identifier rubyid_what'>what</span><span class='period'>.</span><span class='id identifier rubyid_include?'>include?</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>hash</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span> <span class='kw'>then</span>
442
- <span class='op'>::</span><span class='const'>Hash</span><span class='period'>.</span><span class='id identifier rubyid_class_eval'>class_eval</span> <span class='kw'>do</span>
443
- <span class='id identifier rubyid_include'>include</span> <span class='op'>::</span><span class='const'>Cowtech</span><span class='op'>::</span><span class='const'>Extensions</span><span class='op'>::</span><span class='const'>Hash</span>
444
- <span class='kw'>end</span>
445
- <span class='kw'>end</span>
446
-
447
- <span class='kw'>if</span> <span class='id identifier rubyid_what'>what</span><span class='period'>.</span><span class='id identifier rubyid_include?'>include?</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>datetime</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span> <span class='kw'>then</span>
448
- <span class='op'>::</span><span class='const'>Time</span><span class='period'>.</span><span class='id identifier rubyid_class_eval'>class_eval</span> <span class='kw'>do</span>
449
- <span class='id identifier rubyid_include'>include</span> <span class='op'>::</span><span class='const'>Cowtech</span><span class='op'>::</span><span class='const'>Extensions</span><span class='op'>::</span><span class='const'>DateTime</span>
450
- <span class='kw'>end</span>
451
-
452
- <span class='op'>::</span><span class='const'>Date</span><span class='period'>.</span><span class='id identifier rubyid_class_eval'>class_eval</span> <span class='kw'>do</span>
453
- <span class='id identifier rubyid_include'>include</span> <span class='op'>::</span><span class='const'>Cowtech</span><span class='op'>::</span><span class='const'>Extensions</span><span class='op'>::</span><span class='const'>DateTime</span>
454
- <span class='kw'>end</span>
455
-
456
- <span class='op'>::</span><span class='const'>DateTime</span><span class='period'>.</span><span class='id identifier rubyid_class_eval'>class_eval</span> <span class='kw'>do</span>
457
- <span class='id identifier rubyid_include'>include</span> <span class='op'>::</span><span class='const'>Cowtech</span><span class='op'>::</span><span class='const'>Extensions</span><span class='op'>::</span><span class='const'>DateTime</span>
458
- <span class='kw'>end</span>
459
-
460
- <span class='op'>::</span><span class='const'>ActiveSupport</span><span class='op'>::</span><span class='const'>TimeZone</span><span class='period'>.</span><span class='id identifier rubyid_class_eval'>class_eval</span> <span class='kw'>do</span>
461
- <span class='id identifier rubyid_include'>include</span> <span class='op'>::</span><span class='const'>Cowtech</span><span class='op'>::</span><span class='const'>Extensions</span><span class='op'>::</span><span class='const'>TimeZone</span>
462
- <span class='kw'>end</span>
463
- <span class='kw'>end</span>
464
-
465
- <span class='kw'>if</span> <span class='id identifier rubyid_what'>what</span><span class='period'>.</span><span class='id identifier rubyid_include?'>include?</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>math</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span> <span class='kw'>then</span>
466
- <span class='op'>::</span><span class='const'>Math</span><span class='period'>.</span><span class='id identifier rubyid_class_eval'>class_eval</span> <span class='kw'>do</span>
467
- <span class='id identifier rubyid_include'>include</span> <span class='op'>::</span><span class='const'>Cowtech</span><span class='op'>::</span><span class='const'>Extensions</span><span class='op'>::</span><span class='const'>Math</span>
468
- <span class='kw'>end</span>
469
- <span class='kw'>end</span>
470
-
471
- <span class='kw'>if</span> <span class='id identifier rubyid_what'>what</span><span class='period'>.</span><span class='id identifier rubyid_include?'>include?</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>pathname</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span> <span class='kw'>then</span>
472
- <span class='id identifier rubyid_require'>require</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>pathname</span><span class='tstring_end'>&quot;</span></span>
473
-
474
- <span class='op'>::</span><span class='const'>Pathname</span><span class='period'>.</span><span class='id identifier rubyid_class_eval'>class_eval</span> <span class='kw'>do</span>
475
- <span class='id identifier rubyid_include'>include</span> <span class='op'>::</span><span class='const'>Cowtech</span><span class='op'>::</span><span class='const'>Extensions</span><span class='op'>::</span><span class='const'>Pathname</span>
476
- <span class='kw'>end</span>
477
- <span class='kw'>end</span>
478
-
479
- <span class='kw'>yield</span> <span class='kw'>if</span> <span class='id identifier rubyid_block_given?'>block_given?</span>
480
-
481
- <span class='op'>::</span><span class='const'>Cowtech</span><span class='op'>::</span><span class='const'>Extensions</span><span class='op'>::</span><span class='const'>Settings</span><span class='period'>.</span><span class='id identifier rubyid_instance'>instance</span>
482
- <span class='kw'>end</span></pre>
407
+ <pre class="code"><span class="info file"># File 'lib/cowtech-extensions.rb', line 54</span>
408
+
409
+ <span class='rubyid_def def kw'>def</span> <span class='rubyid_self self kw'>self</span><span class='dot token'>.</span><span class='rubyid_load! fid id'>load!</span><span class='lparen token'>(</span><span class='mult op'>*</span><span class='rubyid_what identifier id'>what</span><span class='rparen token'>)</span>
410
+ <span class='rubyid_what identifier id'>what</span> <span class='assign token'>=</span> <span class='lbrack token'>[</span><span class='string val'>&quot;object&quot;</span><span class='comma token'>,</span> <span class='string val'>&quot;boolean&quot;</span><span class='comma token'>,</span> <span class='string val'>&quot;string&quot;</span><span class='comma token'>,</span> <span class='string val'>&quot;hash&quot;</span><span class='comma token'>,</span> <span class='string val'>&quot;datetime&quot;</span><span class='comma token'>,</span> <span class='string val'>&quot;math&quot;</span><span class='comma token'>,</span> <span class='string val'>&quot;pathname&quot;</span><span class='rbrack token'>]</span> <span class='rubyid_if if_mod kw'>if</span> <span class='rubyid_what identifier id'>what</span><span class='dot token'>.</span><span class='rubyid_count identifier id'>count</span> <span class='eq op'>==</span> <span class='integer val'>0</span>
411
+ <span class='rubyid_what identifier id'>what</span><span class='dot token'>.</span><span class='rubyid_collect! fid id'>collect!</span> <span class='lbrace token'>{</span> <span class='bitor op'>|</span><span class='rubyid_w identifier id'>w</span><span class='bitor op'>|</span> <span class='rubyid_w identifier id'>w</span><span class='dot token'>.</span><span class='rubyid_to_s identifier id'>to_s</span> <span class='rbrace token'>}</span>
412
+
413
+ <span class='comment val'># Dependency resolving</span>
414
+ <span class='rubyid_what identifier id'>what</span> <span class='lshft op'>&lt;&lt;</span> <span class='string val'>&quot;object&quot;</span> <span class='rubyid_if if_mod kw'>if</span> <span class='rubyid_what identifier id'>what</span><span class='dot token'>.</span><span class='rubyid_include? fid id'>include?</span><span class='lparen token'>(</span><span class='string val'>&quot;datetime&quot;</span><span class='rparen token'>)</span>
415
+ <span class='rubyid_what identifier id'>what</span> <span class='lshft op'>&lt;&lt;</span> <span class='string val'>&quot;object&quot;</span> <span class='rubyid_if if_mod kw'>if</span> <span class='rubyid_what identifier id'>what</span><span class='dot token'>.</span><span class='rubyid_include? fid id'>include?</span><span class='lparen token'>(</span><span class='string val'>&quot;math&quot;</span><span class='rparen token'>)</span>
416
+ <span class='rubyid_what identifier id'>what</span><span class='dot token'>.</span><span class='rubyid_compact identifier id'>compact</span><span class='dot token'>.</span><span class='rubyid_uniq! fid id'>uniq!</span>
417
+
418
+ <span class='rubyid_if if kw'>if</span> <span class='rubyid_what identifier id'>what</span><span class='dot token'>.</span><span class='rubyid_include? fid id'>include?</span><span class='lparen token'>(</span><span class='string val'>&quot;object&quot;</span><span class='rparen token'>)</span> <span class='rubyid_then then kw'>then</span>
419
+ <span class='colon3 op'>::</span><span class='rubyid_Object constant id'>Object</span><span class='dot token'>.</span><span class='rubyid_class_eval identifier id'>class_eval</span> <span class='rubyid_do do kw'>do</span>
420
+ <span class='rubyid_include identifier id'>include</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_Object constant id'>Object</span>
421
+ <span class='rubyid_end end kw'>end</span>
422
+ <span class='rubyid_end end kw'>end</span>
423
+
424
+ <span class='rubyid_if if kw'>if</span> <span class='rubyid_what identifier id'>what</span><span class='dot token'>.</span><span class='rubyid_include? fid id'>include?</span><span class='lparen token'>(</span><span class='string val'>&quot;boolean&quot;</span><span class='rparen token'>)</span> <span class='rubyid_then then kw'>then</span>
425
+ <span class='colon3 op'>::</span><span class='rubyid_TrueClass constant id'>TrueClass</span><span class='dot token'>.</span><span class='rubyid_class_eval identifier id'>class_eval</span> <span class='rubyid_do do kw'>do</span>
426
+ <span class='rubyid_include identifier id'>include</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_Object constant id'>Object</span>
427
+ <span class='rubyid_include identifier id'>include</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_Boolean constant id'>Boolean</span>
428
+ <span class='rubyid_end end kw'>end</span>
429
+
430
+ <span class='colon3 op'>::</span><span class='rubyid_FalseClass constant id'>FalseClass</span><span class='dot token'>.</span><span class='rubyid_class_eval identifier id'>class_eval</span> <span class='rubyid_do do kw'>do</span>
431
+ <span class='rubyid_include identifier id'>include</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_Object constant id'>Object</span>
432
+ <span class='rubyid_include identifier id'>include</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_Boolean constant id'>Boolean</span>
433
+ <span class='rubyid_end end kw'>end</span>
434
+ <span class='rubyid_end end kw'>end</span>
435
+
436
+ <span class='rubyid_if if kw'>if</span> <span class='rubyid_what identifier id'>what</span><span class='dot token'>.</span><span class='rubyid_include? fid id'>include?</span><span class='lparen token'>(</span><span class='string val'>&quot;string&quot;</span><span class='rparen token'>)</span> <span class='rubyid_then then kw'>then</span>
437
+ <span class='colon3 op'>::</span><span class='rubyid_String constant id'>String</span><span class='dot token'>.</span><span class='rubyid_class_eval identifier id'>class_eval</span> <span class='rubyid_do do kw'>do</span>
438
+ <span class='rubyid_include identifier id'>include</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_String constant id'>String</span>
439
+ <span class='rubyid_end end kw'>end</span>
440
+ <span class='rubyid_end end kw'>end</span>
441
+
442
+ <span class='rubyid_if if kw'>if</span> <span class='rubyid_what identifier id'>what</span><span class='dot token'>.</span><span class='rubyid_include? fid id'>include?</span><span class='lparen token'>(</span><span class='string val'>&quot;hash&quot;</span><span class='rparen token'>)</span> <span class='rubyid_then then kw'>then</span>
443
+ <span class='colon3 op'>::</span><span class='rubyid_Hash constant id'>Hash</span><span class='dot token'>.</span><span class='rubyid_class_eval identifier id'>class_eval</span> <span class='rubyid_do do kw'>do</span>
444
+ <span class='rubyid_include identifier id'>include</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_Hash constant id'>Hash</span>
445
+ <span class='rubyid_end end kw'>end</span>
446
+ <span class='rubyid_end end kw'>end</span>
447
+
448
+ <span class='rubyid_if if kw'>if</span> <span class='rubyid_what identifier id'>what</span><span class='dot token'>.</span><span class='rubyid_include? fid id'>include?</span><span class='lparen token'>(</span><span class='string val'>&quot;datetime&quot;</span><span class='rparen token'>)</span> <span class='rubyid_then then kw'>then</span>
449
+ <span class='colon3 op'>::</span><span class='rubyid_Time constant id'>Time</span><span class='dot token'>.</span><span class='rubyid_class_eval identifier id'>class_eval</span> <span class='rubyid_do do kw'>do</span>
450
+ <span class='rubyid_include identifier id'>include</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_DateTime constant id'>DateTime</span>
451
+ <span class='rubyid_end end kw'>end</span>
452
+
453
+ <span class='colon3 op'>::</span><span class='rubyid_Date constant id'>Date</span><span class='dot token'>.</span><span class='rubyid_class_eval identifier id'>class_eval</span> <span class='rubyid_do do kw'>do</span>
454
+ <span class='rubyid_include identifier id'>include</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_DateTime constant id'>DateTime</span>
455
+ <span class='rubyid_end end kw'>end</span>
456
+
457
+ <span class='colon3 op'>::</span><span class='rubyid_DateTime constant id'>DateTime</span><span class='dot token'>.</span><span class='rubyid_class_eval identifier id'>class_eval</span> <span class='rubyid_do do kw'>do</span>
458
+ <span class='rubyid_include identifier id'>include</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_DateTime constant id'>DateTime</span>
459
+ <span class='rubyid_end end kw'>end</span>
460
+
461
+ <span class='colon3 op'>::</span><span class='rubyid_ActiveSupport constant id'>ActiveSupport</span><span class='colon2 op'>::</span><span class='rubyid_TimeZone constant id'>TimeZone</span><span class='dot token'>.</span><span class='rubyid_class_eval identifier id'>class_eval</span> <span class='rubyid_do do kw'>do</span>
462
+ <span class='rubyid_include identifier id'>include</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_TimeZone constant id'>TimeZone</span>
463
+ <span class='rubyid_end end kw'>end</span>
464
+ <span class='rubyid_end end kw'>end</span>
465
+
466
+ <span class='rubyid_if if kw'>if</span> <span class='rubyid_what identifier id'>what</span><span class='dot token'>.</span><span class='rubyid_include? fid id'>include?</span><span class='lparen token'>(</span><span class='string val'>&quot;math&quot;</span><span class='rparen token'>)</span> <span class='rubyid_then then kw'>then</span>
467
+ <span class='colon3 op'>::</span><span class='rubyid_Math constant id'>Math</span><span class='dot token'>.</span><span class='rubyid_class_eval identifier id'>class_eval</span> <span class='rubyid_do do kw'>do</span>
468
+ <span class='rubyid_include identifier id'>include</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_Math constant id'>Math</span>
469
+ <span class='rubyid_end end kw'>end</span>
470
+ <span class='rubyid_end end kw'>end</span>
471
+
472
+ <span class='rubyid_if if kw'>if</span> <span class='rubyid_what identifier id'>what</span><span class='dot token'>.</span><span class='rubyid_include? fid id'>include?</span><span class='lparen token'>(</span><span class='string val'>&quot;pathname&quot;</span><span class='rparen token'>)</span> <span class='rubyid_then then kw'>then</span>
473
+ <span class='rubyid_require identifier id'>require</span> <span class='string val'>&quot;pathname&quot;</span>
474
+
475
+ <span class='colon3 op'>::</span><span class='rubyid_Pathname constant id'>Pathname</span><span class='dot token'>.</span><span class='rubyid_class_eval identifier id'>class_eval</span> <span class='rubyid_do do kw'>do</span>
476
+ <span class='rubyid_include identifier id'>include</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_Pathname constant id'>Pathname</span>
477
+ <span class='rubyid_end end kw'>end</span>
478
+ <span class='rubyid_end end kw'>end</span>
479
+
480
+ <span class='rubyid_yield yield kw'>yield</span> <span class='rubyid_if if_mod kw'>if</span> <span class='rubyid_block_given? fid id'>block_given?</span>
481
+
482
+ <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_Settings constant id'>Settings</span><span class='dot token'>.</span><span class='rubyid_instance identifier id'>instance</span>
483
+ <span class='rubyid_end end kw'>end</span>
484
+ </pre>
483
485
  </td>
484
486
  </tr>
485
487
  </table>
@@ -527,16 +529,17 @@
527
529
  <pre class="lines">
528
530
 
529
531
 
530
- 38
531
532
  39
532
- 40</pre>
533
+ 40
534
+ 41</pre>
533
535
  </td>
534
536
  <td>
535
- <pre class="code"><span class="info file"># File 'lib/cowtech-extensions.rb', line 38</span>
537
+ <pre class="code"><span class="info file"># File 'lib/cowtech-extensions.rb', line 39</span>
536
538
 
537
- <span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_settings'>settings</span>
538
- <span class='op'>::</span><span class='const'>Cowtech</span><span class='op'>::</span><span class='const'>Extensions</span><span class='op'>::</span><span class='const'>Settings</span><span class='period'>.</span><span class='id identifier rubyid_instance'>instance</span>
539
- <span class='kw'>end</span></pre>
539
+ <span class='rubyid_def def kw'>def</span> <span class='rubyid_self self kw'>self</span><span class='dot token'>.</span><span class='rubyid_settings identifier id'>settings</span>
540
+ <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_Settings constant id'>Settings</span><span class='dot token'>.</span><span class='rubyid_instance identifier id'>instance</span>
541
+ <span class='rubyid_end end kw'>end</span>
542
+ </pre>
540
543
  </td>
541
544
  </tr>
542
545
  </table>
@@ -547,9 +550,9 @@
547
550
  </div>
548
551
 
549
552
  <div id="footer">
550
- Generated on Tue Jul 24 12:12:52 2012 by
553
+ Generated on Sat Jul 28 11:24:53 2012 by
551
554
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
552
- 0.8.2.1 (ruby-1.9.2).
555
+ 0.8.2.1 (ruby-1.8.7).
553
556
  </div>
554
557
 
555
558
  </body>
@@ -218,9 +218,10 @@
218
218
  <td>
219
219
  <pre class="code"><span class="info file"># File 'lib/cowtech-extensions/boolean.rb', line 16</span>
220
220
 
221
- <span class='kw'>def</span> <span class='id identifier rubyid_to_i'>to_i</span>
222
- <span class='lparen'>(</span><span class='kw'>self</span> <span class='op'>==</span> <span class='kw'>true</span><span class='rparen'>)</span> <span class='op'>?</span> <span class='int'>1</span> <span class='op'>:</span> <span class='int'>0</span>
223
- <span class='kw'>end</span></pre>
221
+ <span class='rubyid_def def kw'>def</span> <span class='rubyid_to_i identifier id'>to_i</span>
222
+ <span class='lparen token'>(</span><span class='rubyid_self self kw'>self</span> <span class='eq op'>==</span> <span class='rubyid_true true kw'>true</span><span class='rparen token'>)</span> <span class='question op'>?</span> <span class='integer val'>1</span> <span class='colon op'>:</span> <span class='integer val'>0</span>
223
+ <span class='rubyid_end end kw'>end</span>
224
+ </pre>
224
225
  </td>
225
226
  </tr>
226
227
  </table>
@@ -275,9 +276,10 @@
275
276
  <td>
276
277
  <pre class="code"><span class="info file"># File 'lib/cowtech-extensions/boolean.rb', line 23</span>
277
278
 
278
- <span class='kw'>def</span> <span class='id identifier rubyid_value'>value</span>
279
- <span class='kw'>self</span>
280
- <span class='kw'>end</span></pre>
279
+ <span class='rubyid_def def kw'>def</span> <span class='rubyid_value identifier id'>value</span>
280
+ <span class='rubyid_self self kw'>self</span>
281
+ <span class='rubyid_end end kw'>end</span>
282
+ </pre>
281
283
  </td>
282
284
  </tr>
283
285
  </table>
@@ -288,9 +290,9 @@
288
290
  </div>
289
291
 
290
292
  <div id="footer">
291
- Generated on Tue Jul 24 12:12:52 2012 by
293
+ Generated on Sat Jul 28 11:24:54 2012 by
292
294
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
293
- 0.8.2.1 (ruby-1.9.2).
295
+ 0.8.2.1 (ruby-1.8.7).
294
296
  </div>
295
297
 
296
298
  </body>
@@ -284,9 +284,9 @@
284
284
  <div class="discussion">
285
285
  <p>Returns the number of months passed between the beginning of the base year and the current date.</p>
286
286
 
287
- <pre class="code ruby"><code><span class='const'>DateTime</span><span class='period'>.</span><span class='id identifier rubyid_civil'>civil</span><span class='lparen'>(</span><span class='int'>2012</span><span class='comma'>,</span> <span class='int'>6</span><span class='comma'>,</span> <span class='int'>1</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_in_months'>in_months</span><span class='lparen'>(</span><span class='int'>2011</span><span class='rparen'>)</span>
288
- <span class='comment'># =&gt; 18
289
- </span></code></pre>
287
+ <pre class="code ruby"><code><span class='rubyid_DateTime constant id'>DateTime</span><span class='dot token'>.</span><span class='rubyid_civil identifier id'>civil</span><span class='lparen token'>(</span><span class='integer val'>2012</span><span class='comma token'>,</span> <span class='integer val'>6</span><span class='comma token'>,</span> <span class='integer val'>1</span><span class='rparen token'>)</span><span class='dot token'>.</span><span class='rubyid_in_months identifier id'>in_months</span><span class='lparen token'>(</span><span class='integer val'>2011</span><span class='rparen token'>)</span>
288
+ <span class='comment val'># =&gt; 18</span>
289
+ </code></pre>
290
290
 
291
291
 
292
292
  </div>
@@ -346,10 +346,11 @@
346
346
  <td>
347
347
  <pre class="code"><span class="info file"># File 'lib/cowtech-extensions/datetime.rb', line 194</span>
348
348
 
349
- <span class='kw'>def</span> <span class='id identifier rubyid_in_months'>in_months</span><span class='lparen'>(</span><span class='id identifier rubyid_base'>base</span> <span class='op'>=</span> <span class='kw'>nil</span><span class='rparen'>)</span>
350
- <span class='id identifier rubyid_base'>base</span> <span class='op'>||=</span> <span class='op'>::</span><span class='const'>Date</span><span class='period'>.</span><span class='id identifier rubyid_today'>today</span><span class='period'>.</span><span class='id identifier rubyid_year'>year</span>
351
- <span class='lparen'>(</span><span class='lparen'>(</span><span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_year'>year</span><span class='rparen'>)</span> <span class='op'>-</span> <span class='id identifier rubyid_base'>base</span><span class='rparen'>)</span> <span class='op'>*</span> <span class='int'>12</span> <span class='op'>+</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_month'>month</span>
352
- <span class='kw'>end</span></pre>
349
+ <span class='rubyid_def def kw'>def</span> <span class='rubyid_in_months identifier id'>in_months</span><span class='lparen token'>(</span><span class='rubyid_base identifier id'>base</span> <span class='assign token'>=</span> <span class='rubyid_nil nil kw'>nil</span><span class='rparen token'>)</span>
350
+ <span class='rubyid_base identifier id'>base</span> <span class='opasgn op'>||=</span> <span class='colon3 op'>::</span><span class='rubyid_Date constant id'>Date</span><span class='dot token'>.</span><span class='rubyid_today identifier id'>today</span><span class='dot token'>.</span><span class='rubyid_year identifier id'>year</span>
351
+ <span class='lparen token'>(</span><span class='lparen token'>(</span><span class='rubyid_self self kw'>self</span><span class='dot token'>.</span><span class='rubyid_year identifier id'>year</span><span class='rparen token'>)</span> <span class='minus op'>-</span> <span class='rubyid_base identifier id'>base</span><span class='rparen token'>)</span> <span class='mult op'>*</span> <span class='integer val'>12</span> <span class='plus op'>+</span> <span class='rubyid_self self kw'>self</span><span class='dot token'>.</span><span class='rubyid_month identifier id'>month</span>
352
+ <span class='rubyid_end end kw'>end</span>
353
+ </pre>
353
354
  </td>
354
355
  </tr>
355
356
  </table>
@@ -432,9 +433,10 @@
432
433
  <td>
433
434
  <pre class="code"><span class="info file"># File 'lib/cowtech-extensions/datetime.rb', line 255</span>
434
435
 
435
- <span class='kw'>def</span> <span class='id identifier rubyid_local_lstrftime'>local_lstrftime</span><span class='lparen'>(</span><span class='id identifier rubyid_format'>format</span> <span class='op'>=</span> <span class='kw'>nil</span><span class='rparen'>)</span>
436
- <span class='lparen'>(</span><span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_respond_to?'>respond_to?</span><span class='lparen'>(</span><span class='symbol'>:in_time_zone</span><span class='rparen'>)</span> <span class='op'>?</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_in_time_zone'>in_time_zone</span> <span class='op'>:</span> <span class='kw'>self</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_lstrftime'>lstrftime</span><span class='lparen'>(</span><span class='id identifier rubyid_format'>format</span><span class='rparen'>)</span>
437
- <span class='kw'>end</span></pre>
436
+ <span class='rubyid_def def kw'>def</span> <span class='rubyid_local_lstrftime identifier id'>local_lstrftime</span><span class='lparen token'>(</span><span class='rubyid_format identifier id'>format</span> <span class='assign token'>=</span> <span class='rubyid_nil nil kw'>nil</span><span class='rparen token'>)</span>
437
+ <span class='lparen token'>(</span><span class='rubyid_self self kw'>self</span><span class='dot token'>.</span><span class='rubyid_respond_to? fid id'>respond_to?</span><span class='lparen token'>(</span><span class='symbol val'>:in_time_zone</span><span class='rparen token'>)</span> <span class='question op'>?</span> <span class='rubyid_self self kw'>self</span><span class='dot token'>.</span><span class='rubyid_in_time_zone identifier id'>in_time_zone</span> <span class='colon op'>:</span> <span class='rubyid_self self kw'>self</span><span class='rparen token'>)</span><span class='dot token'>.</span><span class='rubyid_lstrftime identifier id'>lstrftime</span><span class='lparen token'>(</span><span class='rubyid_format identifier id'>format</span><span class='rparen token'>)</span>
438
+ <span class='rubyid_end end kw'>end</span>
439
+ </pre>
438
440
  </td>
439
441
  </tr>
440
442
  </table>
@@ -510,9 +512,10 @@
510
512
  <td>
511
513
  <pre class="code"><span class="info file"># File 'lib/cowtech-extensions/datetime.rb', line 246</span>
512
514
 
513
- <span class='kw'>def</span> <span class='id identifier rubyid_local_strftime'>local_strftime</span><span class='lparen'>(</span><span class='id identifier rubyid_format'>format</span> <span class='op'>=</span> <span class='kw'>nil</span><span class='rparen'>)</span>
514
- <span class='lparen'>(</span><span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_respond_to?'>respond_to?</span><span class='lparen'>(</span><span class='symbol'>:in_time_zone</span><span class='rparen'>)</span> <span class='op'>?</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_in_time_zone'>in_time_zone</span> <span class='op'>:</span> <span class='kw'>self</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_strftime'>strftime</span><span class='lparen'>(</span><span class='op'>::</span><span class='const'>DateTime</span><span class='period'>.</span><span class='id identifier rubyid_custom_format'>custom_format</span><span class='lparen'>(</span><span class='id identifier rubyid_format'>format</span><span class='rparen'>)</span><span class='rparen'>)</span>
515
- <span class='kw'>end</span></pre>
515
+ <span class='rubyid_def def kw'>def</span> <span class='rubyid_local_strftime identifier id'>local_strftime</span><span class='lparen token'>(</span><span class='rubyid_format identifier id'>format</span> <span class='assign token'>=</span> <span class='rubyid_nil nil kw'>nil</span><span class='rparen token'>)</span>
516
+ <span class='lparen token'>(</span><span class='rubyid_self self kw'>self</span><span class='dot token'>.</span><span class='rubyid_respond_to? fid id'>respond_to?</span><span class='lparen token'>(</span><span class='symbol val'>:in_time_zone</span><span class='rparen token'>)</span> <span class='question op'>?</span> <span class='rubyid_self self kw'>self</span><span class='dot token'>.</span><span class='rubyid_in_time_zone identifier id'>in_time_zone</span> <span class='colon op'>:</span> <span class='rubyid_self self kw'>self</span><span class='rparen token'>)</span><span class='dot token'>.</span><span class='rubyid_strftime identifier id'>strftime</span><span class='lparen token'>(</span><span class='colon3 op'>::</span><span class='rubyid_DateTime constant id'>DateTime</span><span class='dot token'>.</span><span class='rubyid_custom_format identifier id'>custom_format</span><span class='lparen token'>(</span><span class='rubyid_format identifier id'>format</span><span class='rparen token'>)</span><span class='rparen token'>)</span>
517
+ <span class='rubyid_end end kw'>end</span>
518
+ </pre>
516
519
  </td>
517
520
  </tr>
518
521
  </table>
@@ -622,36 +625,37 @@
622
625
  <td>
623
626
  <pre class="code"><span class="info file"># File 'lib/cowtech-extensions/datetime.rb', line 211</span>
624
627
 
625
- <span class='kw'>def</span> <span class='id identifier rubyid_lstrftime'>lstrftime</span><span class='lparen'>(</span><span class='id identifier rubyid_format'>format</span> <span class='op'>=</span> <span class='kw'>nil</span><span class='rparen'>)</span>
626
- <span class='id identifier rubyid_rv'>rv</span> <span class='op'>=</span> <span class='kw'>nil</span>
627
- <span class='id identifier rubyid_names'>names</span> <span class='op'>=</span> <span class='op'>::</span><span class='const'>Cowtech</span><span class='op'>::</span><span class='const'>Extensions</span><span class='period'>.</span><span class='id identifier rubyid_settings'>settings</span><span class='period'>.</span><span class='id identifier rubyid_date_names'>date_names</span>
628
-
629
- <span class='id identifier rubyid_final_format'>final_format</span> <span class='op'>=</span> <span class='op'>::</span><span class='const'>DateTime</span><span class='period'>.</span><span class='id identifier rubyid_custom_format'>custom_format</span><span class='lparen'>(</span><span class='id identifier rubyid_format'>format</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_ensure_string'>ensure_string</span><span class='period'>.</span><span class='id identifier rubyid_gsub'>gsub</span><span class='lparen'>(</span><span class='tstring'><span class='regexp_beg'>/</span><span class='tstring_content'>(%{1,2}:?[abz])</span><span class='regexp_end'>/i</span></span><span class='rparen'>)</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_match'>match</span><span class='op'>|</span>
630
- <span class='id identifier rubyid_mrv'>mrv</span> <span class='op'>=</span> <span class='id identifier rubyid_match'>match</span>
631
-
632
- <span class='comment'># Handling of %z is to fix ruby 1.8 bug in OSX: http://bugs.ruby-lang.org/issues/2396
633
- </span> <span class='kw'>if</span> <span class='id identifier rubyid_match'>match</span> <span class='op'>!~</span> <span class='tstring'><span class='regexp_beg'>/</span><span class='tstring_content'>^%%</span><span class='regexp_end'>/</span></span> <span class='kw'>then</span>
634
- <span class='kw'>case</span> <span class='id identifier rubyid_match'>match</span>
635
- <span class='kw'>when</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>%a</span><span class='tstring_end'>&quot;</span></span>
636
- <span class='id identifier rubyid_mrv'>mrv</span> <span class='op'>=</span> <span class='id identifier rubyid_names'>names</span><span class='lbracket'>[</span><span class='symbol'>:short_days</span><span class='rbracket'>]</span><span class='lbracket'>[</span><span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_wday'>wday</span><span class='rbracket'>]</span>
637
- <span class='kw'>when</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>%A</span><span class='tstring_end'>&quot;</span></span>
638
- <span class='id identifier rubyid_mrv'>mrv</span> <span class='op'>=</span> <span class='id identifier rubyid_names'>names</span><span class='lbracket'>[</span><span class='symbol'>:long_days</span><span class='rbracket'>]</span><span class='lbracket'>[</span><span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_wday'>wday</span><span class='rbracket'>]</span>
639
- <span class='kw'>when</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>%b</span><span class='tstring_end'>&quot;</span></span>
640
- <span class='id identifier rubyid_mrv'>mrv</span> <span class='op'>=</span> <span class='id identifier rubyid_names'>names</span><span class='lbracket'>[</span><span class='symbol'>:short_months</span><span class='rbracket'>]</span><span class='lbracket'>[</span><span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_month'>month</span> <span class='op'>-</span> <span class='int'>1</span><span class='rbracket'>]</span>
641
- <span class='kw'>when</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>%B</span><span class='tstring_end'>&quot;</span></span>
642
- <span class='id identifier rubyid_mrv'>mrv</span> <span class='op'>=</span> <span class='id identifier rubyid_names'>names</span><span class='lbracket'>[</span><span class='symbol'>:long_months</span><span class='rbracket'>]</span><span class='lbracket'>[</span><span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_month'>month</span> <span class='op'>-</span> <span class='int'>1</span><span class='rbracket'>]</span>
643
- <span class='kw'>when</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>%z</span><span class='tstring_end'>&quot;</span></span>
644
- <span class='id identifier rubyid_mrv'>mrv</span> <span class='op'>=</span> <span class='op'>::</span><span class='const'>Cowtech</span><span class='op'>::</span><span class='const'>Extensions</span><span class='period'>.</span><span class='id identifier rubyid_is_ruby_18?'>is_ruby_18?</span> <span class='op'>?</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_formatted_offset'>formatted_offset</span><span class='lparen'>(</span><span class='kw'>false</span><span class='rparen'>)</span> <span class='op'>:</span> <span class='kw'>nil</span>
645
- <span class='kw'>when</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>%:z</span><span class='tstring_end'>&quot;</span></span>
646
- <span class='id identifier rubyid_mrv'>mrv</span> <span class='op'>=</span> <span class='op'>::</span><span class='const'>Cowtech</span><span class='op'>::</span><span class='const'>Extensions</span><span class='period'>.</span><span class='id identifier rubyid_is_ruby_18?'>is_ruby_18?</span> <span class='op'>?</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_formatted_offset'>formatted_offset</span><span class='lparen'>(</span><span class='kw'>true</span><span class='rparen'>)</span> <span class='op'>:</span> <span class='kw'>nil</span>
647
- <span class='kw'>end</span>
648
- <span class='kw'>end</span>
649
-
650
- <span class='id identifier rubyid_mrv'>mrv</span> <span class='op'>?</span> <span class='id identifier rubyid_mrv'>mrv</span><span class='period'>.</span><span class='id identifier rubyid_sub'>sub</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>%</span><span class='tstring_end'>&quot;</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>%%</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span> <span class='op'>:</span> <span class='id identifier rubyid_match'>match</span>
651
- <span class='kw'>end</span>
652
-
653
- <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_strftime'>strftime</span><span class='lparen'>(</span><span class='id identifier rubyid_final_format'>final_format</span><span class='rparen'>)</span>
654
- <span class='kw'>end</span></pre>
628
+ <span class='rubyid_def def kw'>def</span> <span class='rubyid_lstrftime identifier id'>lstrftime</span><span class='lparen token'>(</span><span class='rubyid_format identifier id'>format</span> <span class='assign token'>=</span> <span class='rubyid_nil nil kw'>nil</span><span class='rparen token'>)</span>
629
+ <span class='rubyid_rv identifier id'>rv</span> <span class='assign token'>=</span> <span class='rubyid_nil nil kw'>nil</span>
630
+ <span class='rubyid_names identifier id'>names</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_date_names identifier id'>date_names</span>
631
+
632
+ <span class='rubyid_final_format identifier id'>final_format</span> <span class='assign token'>=</span> <span class='colon3 op'>::</span><span class='rubyid_DateTime constant id'>DateTime</span><span class='dot token'>.</span><span class='rubyid_custom_format identifier id'>custom_format</span><span class='lparen token'>(</span><span class='rubyid_format identifier id'>format</span><span class='rparen token'>)</span><span class='dot token'>.</span><span class='rubyid_ensure_string identifier id'>ensure_string</span><span class='dot token'>.</span><span class='rubyid_gsub identifier id'>gsub</span><span class='lparen token'>(</span><span class='regexp val'>/(%{1,2}:?[abz])/i</span><span class='rparen token'>)</span> <span class='rubyid_do do kw'>do</span> <span class='bitor op'>|</span><span class='rubyid_match identifier id'>match</span><span class='bitor op'>|</span>
633
+ <span class='rubyid_mrv identifier id'>mrv</span> <span class='assign token'>=</span> <span class='rubyid_match identifier id'>match</span>
634
+
635
+ <span class='comment val'># Handling of %z is to fix ruby 1.8 bug in OSX: http://bugs.ruby-lang.org/issues/2396</span>
636
+ <span class='rubyid_if if kw'>if</span> <span class='rubyid_match identifier id'>match</span> <span class='nmatch op'>!~</span> <span class='regexp val'>/^%%/</span> <span class='rubyid_then then kw'>then</span>
637
+ <span class='rubyid_case case kw'>case</span> <span class='rubyid_match identifier id'>match</span>
638
+ <span class='rubyid_when when kw'>when</span> <span class='string val'>&quot;%a&quot;</span>
639
+ <span class='rubyid_mrv identifier id'>mrv</span> <span class='assign token'>=</span> <span class='rubyid_names identifier id'>names</span><span class='lbrack token'>[</span><span class='symbol val'>:short_days</span><span class='rbrack token'>]</span><span class='lbrack token'>[</span><span class='rubyid_self self kw'>self</span><span class='dot token'>.</span><span class='rubyid_wday identifier id'>wday</span><span class='rbrack token'>]</span>
640
+ <span class='rubyid_when when kw'>when</span> <span class='string val'>&quot;%A&quot;</span>
641
+ <span class='rubyid_mrv identifier id'>mrv</span> <span class='assign token'>=</span> <span class='rubyid_names identifier id'>names</span><span class='lbrack token'>[</span><span class='symbol val'>:long_days</span><span class='rbrack token'>]</span><span class='lbrack token'>[</span><span class='rubyid_self self kw'>self</span><span class='dot token'>.</span><span class='rubyid_wday identifier id'>wday</span><span class='rbrack token'>]</span>
642
+ <span class='rubyid_when when kw'>when</span> <span class='string val'>&quot;%b&quot;</span>
643
+ <span class='rubyid_mrv identifier id'>mrv</span> <span class='assign token'>=</span> <span class='rubyid_names identifier id'>names</span><span class='lbrack token'>[</span><span class='symbol val'>:short_months</span><span class='rbrack token'>]</span><span class='lbrack token'>[</span><span class='rubyid_self self kw'>self</span><span class='dot token'>.</span><span class='rubyid_month identifier id'>month</span> <span class='minus op'>-</span> <span class='integer val'>1</span><span class='rbrack token'>]</span>
644
+ <span class='rubyid_when when kw'>when</span> <span class='string val'>&quot;%B&quot;</span>
645
+ <span class='rubyid_mrv identifier id'>mrv</span> <span class='assign token'>=</span> <span class='rubyid_names identifier id'>names</span><span class='lbrack token'>[</span><span class='symbol val'>:long_months</span><span class='rbrack token'>]</span><span class='lbrack token'>[</span><span class='rubyid_self self kw'>self</span><span class='dot token'>.</span><span class='rubyid_month identifier id'>month</span> <span class='minus op'>-</span> <span class='integer val'>1</span><span class='rbrack token'>]</span>
646
+ <span class='rubyid_when when kw'>when</span> <span class='string val'>&quot;%z&quot;</span>
647
+ <span class='rubyid_mrv identifier id'>mrv</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_is_ruby_18? fid id'>is_ruby_18?</span> <span class='integer val'>? </span><span class='rubyid_self self kw'>self</span><span class='dot token'>.</span><span class='rubyid_formatted_offset identifier id'>formatted_offset</span><span class='lparen token'>(</span><span class='rubyid_false false kw'>false</span><span class='rparen token'>)</span> <span class='colon op'>:</span> <span class='rubyid_nil nil kw'>nil</span>
648
+ <span class='rubyid_when when kw'>when</span> <span class='string val'>&quot;%:z&quot;</span>
649
+ <span class='rubyid_mrv identifier id'>mrv</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_is_ruby_18? fid id'>is_ruby_18?</span> <span class='integer val'>? </span><span class='rubyid_self self kw'>self</span><span class='dot token'>.</span><span class='rubyid_formatted_offset identifier id'>formatted_offset</span><span class='lparen token'>(</span><span class='rubyid_true true kw'>true</span><span class='rparen token'>)</span> <span class='colon op'>:</span> <span class='rubyid_nil nil kw'>nil</span>
650
+ <span class='rubyid_end end kw'>end</span>
651
+ <span class='rubyid_end end kw'>end</span>
652
+
653
+ <span class='rubyid_mrv identifier id'>mrv</span> <span class='integer val'>? </span><span class='rubyid_mrv identifier id'>mrv</span><span class='dot token'>.</span><span class='rubyid_sub identifier id'>sub</span><span class='lparen token'>(</span><span class='string val'>&quot;%&quot;</span><span class='comma token'>,</span> <span class='string val'>&quot;%%&quot;</span><span class='rparen token'>)</span> <span class='colon op'>:</span> <span class='rubyid_match identifier id'>match</span>
654
+ <span class='rubyid_end end kw'>end</span>
655
+
656
+ <span class='rubyid_self self kw'>self</span><span class='dot token'>.</span><span class='rubyid_strftime identifier id'>strftime</span><span class='lparen token'>(</span><span class='rubyid_final_format identifier id'>final_format</span><span class='rparen token'>)</span>
657
+ <span class='rubyid_end end kw'>end</span>
658
+ </pre>
655
659
  </td>
656
660
  </tr>
657
661
  </table>
@@ -706,9 +710,10 @@
706
710
  <td>
707
711
  <pre class="code"><span class="info file"># File 'lib/cowtech-extensions/datetime.rb', line 202</span>
708
712
 
709
- <span class='kw'>def</span> <span class='id identifier rubyid_padded_month'>padded_month</span>
710
- <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_month'>month</span><span class='period'>.</span><span class='id identifier rubyid_to_s'>to_s</span><span class='period'>.</span><span class='id identifier rubyid_rjust'>rjust</span><span class='lparen'>(</span><span class='int'>2</span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>0</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span>
711
- <span class='kw'>end</span></pre>
713
+ <span class='rubyid_def def kw'>def</span> <span class='rubyid_padded_month identifier id'>padded_month</span>
714
+ <span class='rubyid_self self kw'>self</span><span class='dot token'>.</span><span class='rubyid_month identifier id'>month</span><span class='dot token'>.</span><span class='rubyid_to_s identifier id'>to_s</span><span class='dot token'>.</span><span class='rubyid_rjust identifier id'>rjust</span><span class='lparen token'>(</span><span class='integer val'>2</span><span class='comma token'>,</span> <span class='string val'>&quot;0&quot;</span><span class='rparen token'>)</span>
715
+ <span class='rubyid_end end kw'>end</span>
716
+ </pre>
712
717
  </td>
713
718
  </tr>
714
719
  </table>
@@ -764,10 +769,11 @@
764
769
  <td>
765
770
  <pre class="code"><span class="info file"># File 'lib/cowtech-extensions/datetime.rb', line 180</span>
766
771
 
767
- <span class='kw'>def</span> <span class='id identifier rubyid_utc_time'>utc_time</span>
768
- <span class='id identifier rubyid_ua'>ua</span> <span class='op'>=</span> <span class='lparen'>(</span><span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_respond_to?'>respond_to?</span><span class='lparen'>(</span><span class='symbol'>:utc</span><span class='rparen'>)</span> <span class='op'>?</span> <span class='kw'>self</span> <span class='op'>:</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_to_datetime'>to_datetime</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_utc'>utc</span>
769
- <span class='op'>::</span><span class='const'>Time</span><span class='period'>.</span><span class='id identifier rubyid_utc'>utc</span><span class='lparen'>(</span><span class='id identifier rubyid_ua'>ua</span><span class='period'>.</span><span class='id identifier rubyid_year'>year</span><span class='comma'>,</span> <span class='id identifier rubyid_ua'>ua</span><span class='period'>.</span><span class='id identifier rubyid_month'>month</span><span class='comma'>,</span> <span class='id identifier rubyid_ua'>ua</span><span class='period'>.</span><span class='id identifier rubyid_day'>day</span><span class='comma'>,</span> <span class='id identifier rubyid_ua'>ua</span><span class='period'>.</span><span class='id identifier rubyid_hour'>hour</span><span class='comma'>,</span> <span class='id identifier rubyid_ua'>ua</span><span class='period'>.</span><span class='id identifier rubyid_min'>min</span><span class='comma'>,</span> <span class='id identifier rubyid_ua'>ua</span><span class='period'>.</span><span class='id identifier rubyid_sec'>sec</span><span class='rparen'>)</span>
770
- <span class='kw'>end</span></pre>
772
+ <span class='rubyid_def def kw'>def</span> <span class='rubyid_utc_time identifier id'>utc_time</span>
773
+ <span class='rubyid_ua identifier id'>ua</span> <span class='assign token'>=</span> <span class='lparen token'>(</span><span class='rubyid_self self kw'>self</span><span class='dot token'>.</span><span class='rubyid_respond_to? fid id'>respond_to?</span><span class='lparen token'>(</span><span class='symbol val'>:utc</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='rubyid_self self kw'>self</span><span class='dot token'>.</span><span class='rubyid_to_datetime identifier id'>to_datetime</span><span class='rparen token'>)</span><span class='dot token'>.</span><span class='rubyid_utc identifier id'>utc</span>
774
+ <span class='colon3 op'>::</span><span class='rubyid_Time constant id'>Time</span><span class='dot token'>.</span><span class='rubyid_utc identifier id'>utc</span><span class='lparen token'>(</span><span class='rubyid_ua identifier id'>ua</span><span class='dot token'>.</span><span class='rubyid_year identifier id'>year</span><span class='comma token'>,</span> <span class='rubyid_ua identifier id'>ua</span><span class='dot token'>.</span><span class='rubyid_month identifier id'>month</span><span class='comma token'>,</span> <span class='rubyid_ua identifier id'>ua</span><span class='dot token'>.</span><span class='rubyid_day identifier id'>day</span><span class='comma token'>,</span> <span class='rubyid_ua identifier id'>ua</span><span class='dot token'>.</span><span class='rubyid_hour identifier id'>hour</span><span class='comma token'>,</span> <span class='rubyid_ua identifier id'>ua</span><span class='dot token'>.</span><span class='rubyid_min identifier id'>min</span><span class='comma token'>,</span> <span class='rubyid_ua identifier id'>ua</span><span class='dot token'>.</span><span class='rubyid_sec identifier id'>sec</span><span class='rparen token'>)</span>
775
+ <span class='rubyid_end end kw'>end</span>
776
+ </pre>
771
777
  </td>
772
778
  </tr>
773
779
  </table>
@@ -778,9 +784,9 @@
778
784
  </div>
779
785
 
780
786
  <div id="footer">
781
- Generated on Tue Jul 24 12:12:52 2012 by
787
+ Generated on Sat Jul 28 11:24:54 2012 by
782
788
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
783
- 0.8.2.1 (ruby-1.9.2).
789
+ 0.8.2.1 (ruby-1.8.7).
784
790
  </div>
785
791
 
786
792
  </body>