lazier 1.0.4 → 1.0.5
Sign up to get free protection for your applications and to get access to all the features.
- data/README.md +1 -0
- data/doc/Lazier.html +83 -86
- data/doc/Lazier/Boolean.html +8 -10
- data/doc/Lazier/DateTime.html +52 -58
- data/doc/Lazier/DateTime/ClassMethods.html +79 -91
- data/doc/Lazier/Exceptions.html +2 -2
- data/doc/Lazier/Exceptions/Dump.html +2 -2
- data/doc/Lazier/Hash.html +18 -20
- data/doc/Lazier/Math.html +2 -2
- data/doc/Lazier/Math/ClassMethods.html +22 -24
- data/doc/Lazier/Object.html +95 -109
- data/doc/Lazier/Pathname.html +10 -11
- data/doc/Lazier/Settings.html +70 -80
- data/doc/Lazier/String.html +22 -26
- data/doc/Lazier/TimeZone.html +90 -102
- data/doc/Lazier/TimeZone/ClassMethods.html +72 -79
- data/doc/Lazier/Version.html +6 -10
- data/doc/_index.html +2 -2
- data/doc/file.README.html +7 -6
- data/doc/index.html +7 -6
- data/doc/top-level-namespace.html +2 -2
- data/lazier.gemspec +2 -2
- data/lib/lazier/version.rb +1 -1
- data/spec/lazier_spec.rb +6 -0
- metadata +8 -8
data/doc/Lazier/Pathname.html
CHANGED
@@ -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
|
164
|
-
</code></pre>
|
162
|
+
<pre class="code ruby"><code><span class='const'>Pathname</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>/usr/bin/ruby</span><span class='tstring_end'>"</span></span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_components'>components</span>
|
163
|
+
<span class='comment'># => ["usr", "bin", "ruby"]
|
164
|
+
</span></code></pre>
|
165
165
|
|
166
166
|
|
167
167
|
</div>
|
@@ -201,12 +201,11 @@
|
|
201
201
|
<td>
|
202
202
|
<pre class="code"><span class="info file"># File 'lib/lazier/pathname.rb', line 20</span>
|
203
203
|
|
204
|
-
<span class='
|
205
|
-
<span class='
|
206
|
-
<span class='
|
207
|
-
<span class='
|
208
|
-
<span class='
|
209
|
-
</pre>
|
204
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_components'>components</span>
|
205
|
+
<span class='id identifier rubyid_rv'>rv</span> <span class='op'>=</span> <span class='lbracket'>[</span><span class='rbracket'>]</span>
|
206
|
+
<span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_each_filename'>each_filename</span> <span class='lbrace'>{</span> <span class='op'>|</span><span class='id identifier rubyid_p'>p</span><span class='op'>|</span> <span class='id identifier rubyid_rv'>rv</span> <span class='op'><<</span> <span class='id identifier rubyid_p'>p</span> <span class='rbrace'>}</span>
|
207
|
+
<span class='id identifier rubyid_rv'>rv</span>
|
208
|
+
<span class='kw'>end</span></pre>
|
210
209
|
</td>
|
211
210
|
</tr>
|
212
211
|
</table>
|
@@ -217,9 +216,9 @@
|
|
217
216
|
</div>
|
218
217
|
|
219
218
|
<div id="footer">
|
220
|
-
Generated on
|
219
|
+
Generated on Fri Oct 19 09:08:32 2012 by
|
221
220
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
222
|
-
0.8.2.1 (ruby-1.
|
221
|
+
0.8.2.1 (ruby-1.9.2).
|
223
222
|
</div>
|
224
223
|
|
225
224
|
</body>
|
data/doc/Lazier/Settings.html
CHANGED
@@ -431,13 +431,12 @@
|
|
431
431
|
<td>
|
432
432
|
<pre class="code"><span class="info file"># File 'lib/lazier/settings.rb', line 30</span>
|
433
433
|
|
434
|
-
<span class='
|
435
|
-
<span class='
|
436
|
-
<span class='
|
437
|
-
<span class='
|
438
|
-
<span class='
|
439
|
-
<span class='
|
440
|
-
</pre>
|
434
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span>
|
435
|
+
<span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_setup_format_number'>setup_format_number</span>
|
436
|
+
<span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_setup_boolean_names'>setup_boolean_names</span>
|
437
|
+
<span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_setup_date_formats'>setup_date_formats</span>
|
438
|
+
<span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_setup_date_names'>setup_date_names</span>
|
439
|
+
<span class='kw'>end</span></pre>
|
441
440
|
</td>
|
442
441
|
</tr>
|
443
442
|
</table>
|
@@ -482,10 +481,9 @@
|
|
482
481
|
<td>
|
483
482
|
<pre class="code"><span class="info file"># File 'lib/lazier/settings.rb', line 14</span>
|
484
483
|
|
485
|
-
<span class='
|
486
|
-
<span class='
|
487
|
-
<span class='
|
488
|
-
</pre>
|
484
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_boolean_names'>boolean_names</span>
|
485
|
+
<span class='ivar'>@boolean_names</span>
|
486
|
+
<span class='kw'>end</span></pre>
|
489
487
|
</td>
|
490
488
|
</tr>
|
491
489
|
</table>
|
@@ -525,10 +523,9 @@
|
|
525
523
|
<td>
|
526
524
|
<pre class="code"><span class="info file"># File 'lib/lazier/settings.rb', line 20</span>
|
527
525
|
|
528
|
-
<span class='
|
529
|
-
<span class='
|
530
|
-
<span class='
|
531
|
-
</pre>
|
526
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_date_formats'>date_formats</span>
|
527
|
+
<span class='ivar'>@date_formats</span>
|
528
|
+
<span class='kw'>end</span></pre>
|
532
529
|
</td>
|
533
530
|
</tr>
|
534
531
|
</table>
|
@@ -568,10 +565,9 @@
|
|
568
565
|
<td>
|
569
566
|
<pre class="code"><span class="info file"># File 'lib/lazier/settings.rb', line 17</span>
|
570
567
|
|
571
|
-
<span class='
|
572
|
-
<span class='
|
573
|
-
<span class='
|
574
|
-
</pre>
|
568
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_date_names'>date_names</span>
|
569
|
+
<span class='ivar'>@date_names</span>
|
570
|
+
<span class='kw'>end</span></pre>
|
575
571
|
</td>
|
576
572
|
</tr>
|
577
573
|
</table>
|
@@ -611,10 +607,9 @@
|
|
611
607
|
<td>
|
612
608
|
<pre class="code"><span class="info file"># File 'lib/lazier/settings.rb', line 11</span>
|
613
609
|
|
614
|
-
<span class='
|
615
|
-
<span class='
|
616
|
-
<span class='
|
617
|
-
</pre>
|
610
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_format_number'>format_number</span>
|
611
|
+
<span class='ivar'>@format_number</span>
|
612
|
+
<span class='kw'>end</span></pre>
|
618
613
|
</td>
|
619
614
|
</tr>
|
620
615
|
</table>
|
@@ -676,10 +671,9 @@
|
|
676
671
|
<td>
|
677
672
|
<pre class="code"><span class="info file"># File 'lib/lazier/settings.rb', line 25</span>
|
678
673
|
|
679
|
-
<span class='
|
680
|
-
<span class='
|
681
|
-
<span class='
|
682
|
-
</pre>
|
674
|
+
<span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_instance'>instance</span>
|
675
|
+
<span class='ivar'>@instance</span> <span class='op'>||=</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span>
|
676
|
+
<span class='kw'>end</span></pre>
|
683
677
|
</td>
|
684
678
|
</tr>
|
685
679
|
</table>
|
@@ -787,12 +781,11 @@
|
|
787
781
|
<td>
|
788
782
|
<pre class="code"><span class="info file"># File 'lib/lazier/settings.rb', line 60</span>
|
789
783
|
|
790
|
-
<span class='
|
791
|
-
<span class='
|
792
|
-
<span class='
|
793
|
-
<span class='
|
794
|
-
<span class='
|
795
|
-
</pre>
|
784
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_setup_boolean_names'>setup_boolean_names</span><span class='lparen'>(</span><span class='id identifier rubyid_true_name'>true_name</span> <span class='op'>=</span> <span class='kw'>nil</span><span class='comma'>,</span> <span class='id identifier rubyid_false_name'>false_name</span> <span class='op'>=</span> <span class='kw'>nil</span><span class='rparen'>)</span>
|
785
|
+
<span class='id identifier rubyid_true_name'>true_name</span> <span class='op'>||=</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>Yes</span><span class='tstring_end'>"</span></span>
|
786
|
+
<span class='id identifier rubyid_false_name'>false_name</span> <span class='op'>||=</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>No</span><span class='tstring_end'>"</span></span>
|
787
|
+
<span class='ivar'>@boolean_names</span> <span class='op'>=</span> <span class='lbrace'>{</span><span class='kw'>true</span> <span class='op'>=></span> <span class='id identifier rubyid_true_name'>true_name</span><span class='comma'>,</span> <span class='kw'>false</span> <span class='op'>=></span> <span class='id identifier rubyid_false_name'>false_name</span><span class='rbrace'>}</span>
|
788
|
+
<span class='kw'>end</span></pre>
|
796
789
|
</td>
|
797
790
|
</tr>
|
798
791
|
</table>
|
@@ -910,28 +903,27 @@
|
|
910
903
|
<td>
|
911
904
|
<pre class="code"><span class="info file"># File 'lib/lazier/settings.rb', line 72</span>
|
912
905
|
|
913
|
-
<span class='
|
914
|
-
<span class='
|
915
|
-
<span class='symbol
|
916
|
-
<span class='symbol
|
917
|
-
<span class='symbol
|
918
|
-
<span class='symbol
|
919
|
-
<span class='rbrace
|
920
|
-
|
921
|
-
<span class='
|
922
|
-
<span class='
|
923
|
-
<span class='
|
924
|
-
<span class='
|
925
|
-
<span class='
|
926
|
-
<span class='
|
927
|
-
<span class='
|
928
|
-
|
929
|
-
<span class='
|
930
|
-
<span class='
|
931
|
-
|
932
|
-
<span class='
|
933
|
-
<span class='
|
934
|
-
</pre>
|
906
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_setup_date_formats'>setup_date_formats</span><span class='lparen'>(</span><span class='id identifier rubyid_formats'>formats</span> <span class='op'>=</span> <span class='kw'>nil</span><span class='comma'>,</span> <span class='id identifier rubyid_replace'>replace</span> <span class='op'>=</span> <span class='kw'>false</span><span class='rparen'>)</span>
|
907
|
+
<span class='id identifier rubyid_formats'>formats</span> <span class='op'>=</span> <span class='lbrace'>{</span>
|
908
|
+
<span class='symbol'>:ct_date</span> <span class='op'>=></span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>%Y-%m-%d</span><span class='tstring_end'>"</span></span><span class='comma'>,</span>
|
909
|
+
<span class='symbol'>:ct_time</span> <span class='op'>=></span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>%H:%M:%S</span><span class='tstring_end'>"</span></span><span class='comma'>,</span>
|
910
|
+
<span class='symbol'>:ct_date_time</span> <span class='op'>=></span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>%F %T</span><span class='tstring_end'>"</span></span><span class='comma'>,</span>
|
911
|
+
<span class='symbol'>:ct_iso_8601</span> <span class='op'>=></span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>%FT%T%z</span><span class='tstring_end'>"</span></span>
|
912
|
+
<span class='rbrace'>}</span> <span class='kw'>if</span> <span class='id identifier rubyid_formats'>formats</span><span class='period'>.</span><span class='id identifier rubyid_blank?'>blank?</span>
|
913
|
+
|
914
|
+
<span class='kw'>if</span> <span class='id identifier rubyid_formats'>formats</span><span class='period'>.</span><span class='id identifier rubyid_is_a?'>is_a?</span><span class='lparen'>(</span><span class='op'>::</span><span class='const'>Hash</span><span class='rparen'>)</span> <span class='kw'>then</span>
|
915
|
+
<span class='kw'>if</span> <span class='op'>!</span><span class='id identifier rubyid_replace'>replace</span> <span class='kw'>then</span>
|
916
|
+
<span class='ivar'>@date_formats</span> <span class='op'>||=</span> <span class='lbrace'>{</span><span class='rbrace'>}</span>
|
917
|
+
<span class='ivar'>@date_formats</span><span class='period'>.</span><span class='id identifier rubyid_merge!'>merge!</span><span class='lparen'>(</span><span class='id identifier rubyid_formats'>formats</span><span class='rparen'>)</span>
|
918
|
+
<span class='kw'>else</span>
|
919
|
+
<span class='ivar'>@date_formats</span> <span class='op'>=</span> <span class='id identifier rubyid_formats'>formats</span>
|
920
|
+
<span class='kw'>end</span>
|
921
|
+
|
922
|
+
<span class='ivar'>@date_formats</span><span class='period'>.</span><span class='id identifier rubyid_each_pair'>each_pair</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_k'>k</span><span class='comma'>,</span> <span class='id identifier rubyid_v'>v</span><span class='op'>|</span> <span class='op'>::</span><span class='const'>Time</span><span class='op'>::</span><span class='const'>DATE_FORMATS</span><span class='lbracket'>[</span><span class='id identifier rubyid_k'>k</span><span class='rbracket'>]</span> <span class='op'>=</span> <span class='id identifier rubyid_v'>v</span> <span class='kw'>end</span>
|
923
|
+
<span class='kw'>end</span>
|
924
|
+
|
925
|
+
<span class='ivar'>@date_formats</span>
|
926
|
+
<span class='kw'>end</span></pre>
|
935
927
|
</td>
|
936
928
|
</tr>
|
937
929
|
</table>
|
@@ -1079,20 +1071,19 @@
|
|
1079
1071
|
<td>
|
1080
1072
|
<pre class="code"><span class="info file"># File 'lib/lazier/settings.rb', line 104</span>
|
1081
1073
|
|
1082
|
-
<span class='
|
1083
|
-
<span class='
|
1084
|
-
<span class='
|
1085
|
-
<span class='
|
1086
|
-
<span class='
|
1087
|
-
|
1088
|
-
<span class='
|
1089
|
-
<span class='symbol
|
1090
|
-
<span class='symbol
|
1091
|
-
<span class='symbol
|
1092
|
-
<span class='symbol
|
1093
|
-
<span class='rbrace
|
1094
|
-
<span class='
|
1095
|
-
</pre>
|
1074
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_setup_date_names'>setup_date_names</span><span class='lparen'>(</span><span class='id identifier rubyid_long_months'>long_months</span> <span class='op'>=</span> <span class='kw'>nil</span><span class='comma'>,</span> <span class='id identifier rubyid_short_months'>short_months</span> <span class='op'>=</span> <span class='kw'>nil</span><span class='comma'>,</span> <span class='id identifier rubyid_long_days'>long_days</span> <span class='op'>=</span> <span class='kw'>nil</span><span class='comma'>,</span> <span class='id identifier rubyid_short_days'>short_days</span> <span class='op'>=</span> <span class='kw'>nil</span><span class='rparen'>)</span>
|
1075
|
+
<span class='id identifier rubyid_long_months'>long_months</span> <span class='op'>=</span> <span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>January</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>February</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>March</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>April</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>May</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>June</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>July</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>August</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>September</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>October</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>November</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>December</span><span class='tstring_end'>"</span></span><span class='rbracket'>]</span> <span class='kw'>if</span> <span class='id identifier rubyid_long_months'>long_months</span><span class='period'>.</span><span class='id identifier rubyid_blank?'>blank?</span>
|
1076
|
+
<span class='id identifier rubyid_short_months'>short_months</span> <span class='op'>=</span> <span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>Jan</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>Feb</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>Mar</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>Apr</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>May</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>Jun</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>Jul</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>Aug</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>Sep</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>Oct</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>Nov</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>Dec</span><span class='tstring_end'>"</span></span><span class='rbracket'>]</span> <span class='kw'>if</span> <span class='id identifier rubyid_short_months'>short_months</span><span class='period'>.</span><span class='id identifier rubyid_blank?'>blank?</span>
|
1077
|
+
<span class='id identifier rubyid_long_days'>long_days</span> <span class='op'>=</span> <span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>Sunday</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>Monday</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>Tuesday</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>Wednesday</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>Thursday</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>Friday</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>Saturday</span><span class='tstring_end'>"</span></span><span class='rbracket'>]</span> <span class='kw'>if</span> <span class='id identifier rubyid_long_days'>long_days</span><span class='period'>.</span><span class='id identifier rubyid_blank?'>blank?</span>
|
1078
|
+
<span class='id identifier rubyid_short_days'>short_days</span> <span class='op'>=</span> <span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>Sun</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>Mon</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>Tue</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>Wed</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>Thu</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>Fri</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>Sat</span><span class='tstring_end'>"</span></span><span class='rbracket'>]</span> <span class='kw'>if</span> <span class='id identifier rubyid_short_days'>short_days</span><span class='period'>.</span><span class='id identifier rubyid_blank?'>blank?</span>
|
1079
|
+
|
1080
|
+
<span class='ivar'>@date_names</span> <span class='op'>=</span> <span class='lbrace'>{</span>
|
1081
|
+
<span class='symbol'>:long_months</span> <span class='op'>=></span> <span class='id identifier rubyid_long_months'>long_months</span><span class='comma'>,</span>
|
1082
|
+
<span class='symbol'>:short_months</span> <span class='op'>=></span> <span class='id identifier rubyid_short_months'>short_months</span><span class='comma'>,</span>
|
1083
|
+
<span class='symbol'>:long_days</span> <span class='op'>=></span> <span class='id identifier rubyid_long_days'>long_days</span><span class='comma'>,</span>
|
1084
|
+
<span class='symbol'>:short_days</span> <span class='op'>=></span> <span class='id identifier rubyid_short_days'>short_days</span>
|
1085
|
+
<span class='rbrace'>}</span>
|
1086
|
+
<span class='kw'>end</span></pre>
|
1096
1087
|
</td>
|
1097
1088
|
</tr>
|
1098
1089
|
</table>
|
@@ -1231,15 +1222,14 @@
|
|
1231
1222
|
<td>
|
1232
1223
|
<pre class="code"><span class="info file"># File 'lib/lazier/settings.rb', line 45</span>
|
1233
1224
|
|
1234
|
-
<span class='
|
1235
|
-
<span class='
|
1236
|
-
<span class='symbol
|
1237
|
-
<span class='symbol
|
1238
|
-
<span class='symbol
|
1239
|
-
<span class='symbol
|
1240
|
-
<span class='rbrace
|
1241
|
-
<span class='
|
1242
|
-
</pre>
|
1225
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_setup_format_number'>setup_format_number</span><span class='lparen'>(</span><span class='id identifier rubyid_prec'>prec</span> <span class='op'>=</span> <span class='int'>2</span><span class='comma'>,</span> <span class='id identifier rubyid_decimal_separator'>decimal_separator</span> <span class='op'>=</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>.</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='id identifier rubyid_add_string'>add_string</span> <span class='op'>=</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='id identifier rubyid_k_separator'>k_separator</span> <span class='op'>=</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>,</span><span class='tstring_end'>"</span></span><span class='rparen'>)</span>
|
1226
|
+
<span class='ivar'>@format_number</span> <span class='op'>=</span> <span class='lbrace'>{</span>
|
1227
|
+
<span class='symbol'>:prec</span> <span class='op'>=></span> <span class='id identifier rubyid_prec'>prec</span><span class='comma'>,</span>
|
1228
|
+
<span class='symbol'>:decimal_separator</span> <span class='op'>=></span> <span class='id identifier rubyid_decimal_separator'>decimal_separator</span><span class='comma'>,</span>
|
1229
|
+
<span class='symbol'>:add_string</span> <span class='op'>=></span> <span class='id identifier rubyid_add_string'>add_string</span><span class='comma'>,</span>
|
1230
|
+
<span class='symbol'>:k_separator</span> <span class='op'>=></span> <span class='id identifier rubyid_k_separator'>k_separator</span>
|
1231
|
+
<span class='rbrace'>}</span>
|
1232
|
+
<span class='kw'>end</span></pre>
|
1243
1233
|
</td>
|
1244
1234
|
</tr>
|
1245
1235
|
</table>
|
@@ -1250,9 +1240,9 @@
|
|
1250
1240
|
</div>
|
1251
1241
|
|
1252
1242
|
<div id="footer">
|
1253
|
-
Generated on
|
1243
|
+
Generated on Fri Oct 19 09:08:32 2012 by
|
1254
1244
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
1255
|
-
0.8.2.1 (ruby-1.
|
1245
|
+
0.8.2.1 (ruby-1.9.2).
|
1256
1246
|
</div>
|
1257
1247
|
|
1258
1248
|
</body>
|
data/doc/Lazier/String.html
CHANGED
@@ -228,9 +228,9 @@
|
|
228
228
|
<div class="discussion">
|
229
229
|
<p>Removes accents from the string, normalizing to the normal letter.</p>
|
230
230
|
|
231
|
-
<pre class="code ruby"><code><span class='
|
232
|
-
<span class='comment
|
233
|
-
</code></pre>
|
231
|
+
<pre class="code ruby"><code><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>èòàù</span><span class='tstring_end'>"</span></span><span class='period'>.</span><span class='id identifier rubyid_remove_accents'>remove_accents</span>
|
232
|
+
<span class='comment'># => "eoau"
|
233
|
+
</span></code></pre>
|
234
234
|
|
235
235
|
|
236
236
|
</div>
|
@@ -270,12 +270,11 @@
|
|
270
270
|
<td>
|
271
271
|
<pre class="code"><span class="info file"># File 'lib/lazier/string.rb', line 20</span>
|
272
272
|
|
273
|
-
<span class='
|
274
|
-
<span class='
|
275
|
-
<span class='
|
276
|
-
<span class='rbrace
|
277
|
-
<span class='
|
278
|
-
</pre>
|
273
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_remove_accents'>remove_accents</span>
|
274
|
+
<span class='id identifier rubyid_silence_warnings'>silence_warnings</span> <span class='lbrace'>{</span>
|
275
|
+
<span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_mb_chars'>mb_chars</span><span class='period'>.</span><span class='id identifier rubyid_normalize'>normalize</span><span class='lparen'>(</span><span class='symbol'>:kd</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_gsub'>gsub</span><span class='lparen'>(</span><span class='tstring'><span class='regexp_beg'>/</span><span class='tstring_content'>[^\x00-\x7F]</span><span class='regexp_end'>/n</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_end'>"</span></span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_to_s'>to_s</span>
|
276
|
+
<span class='rbrace'>}</span>
|
277
|
+
<span class='kw'>end</span></pre>
|
279
278
|
</td>
|
280
279
|
</tr>
|
281
280
|
</table>
|
@@ -330,10 +329,9 @@
|
|
330
329
|
<td>
|
331
330
|
<pre class="code"><span class="info file"># File 'lib/lazier/string.rb', line 43</span>
|
332
331
|
|
333
|
-
<span class='
|
334
|
-
<span class='
|
335
|
-
<span class='
|
336
|
-
</pre>
|
332
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_replace_ampersands'>replace_ampersands</span>
|
333
|
+
<span class='kw'>self</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'>&amp;(\S+);</span><span class='regexp_end'>/</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>&\\1;</span><span class='tstring_end'>"</span></span><span class='rparen'>)</span>
|
334
|
+
<span class='kw'>end</span></pre>
|
337
335
|
</td>
|
338
336
|
</tr>
|
339
337
|
</table>
|
@@ -354,9 +352,9 @@
|
|
354
352
|
|
355
353
|
<p>The string is downcased and spaces are substituted with <code>-</code>.</p>
|
356
354
|
|
357
|
-
<pre class="code ruby"><code><span class='
|
358
|
-
<span class='comment
|
359
|
-
</code></pre>
|
355
|
+
<pre class="code ruby"><code><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>ABC cde</span><span class='tstring_end'>"</span></span><span class='period'>.</span><span class='id identifier rubyid_untitleize'>untitleize</span>
|
356
|
+
<span class='comment'># => "abc-cde"
|
357
|
+
</span></code></pre>
|
360
358
|
|
361
359
|
|
362
360
|
</div>
|
@@ -394,10 +392,9 @@
|
|
394
392
|
<td>
|
395
393
|
<pre class="code"><span class="info file"># File 'lib/lazier/string.rb', line 36</span>
|
396
394
|
|
397
|
-
<span class='
|
398
|
-
<span class='
|
399
|
-
<span class='
|
400
|
-
</pre>
|
395
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_untitleize'>untitleize</span>
|
396
|
+
<span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_downcase'>downcase</span><span class='period'>.</span><span class='id identifier rubyid_gsub'>gsub</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'> </span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>-</span><span class='tstring_end'>"</span></span><span class='rparen'>)</span>
|
397
|
+
<span class='kw'>end</span></pre>
|
401
398
|
</td>
|
402
399
|
</tr>
|
403
400
|
</table>
|
@@ -452,10 +449,9 @@
|
|
452
449
|
<td>
|
453
450
|
<pre class="code"><span class="info file"># File 'lib/lazier/string.rb', line 50</span>
|
454
451
|
|
455
|
-
<span class='
|
456
|
-
<span class='
|
457
|
-
<span class='
|
458
|
-
</pre>
|
452
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_value'>value</span>
|
453
|
+
<span class='kw'>self</span>
|
454
|
+
<span class='kw'>end</span></pre>
|
459
455
|
</td>
|
460
456
|
</tr>
|
461
457
|
</table>
|
@@ -466,9 +462,9 @@
|
|
466
462
|
</div>
|
467
463
|
|
468
464
|
<div id="footer">
|
469
|
-
Generated on
|
465
|
+
Generated on Fri Oct 19 09:08:32 2012 by
|
470
466
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
471
|
-
0.8.2.1 (ruby-1.
|
467
|
+
0.8.2.1 (ruby-1.9.2).
|
472
468
|
</div>
|
473
469
|
|
474
470
|
</body>
|
data/doc/Lazier/TimeZone.html
CHANGED
@@ -500,31 +500,30 @@
|
|
500
500
|
<td>
|
501
501
|
<pre class="code"><span class="info file"># File 'lib/lazier/datetime.rb', line 388</span>
|
502
502
|
|
503
|
-
<span class='
|
504
|
-
<span class='
|
505
|
-
<span class='
|
506
|
-
<span class='
|
507
|
-
|
508
|
-
<span class='
|
509
|
-
<span class='comment
|
510
|
-
<span class='
|
511
|
-
|
512
|
-
<span class='
|
513
|
-
<span class='
|
514
|
-
<span class='
|
515
|
-
<span class='
|
516
|
-
<span class='
|
517
|
-
<span class='
|
518
|
-
<span class='
|
519
|
-
<span class='
|
520
|
-
<span class='
|
521
|
-
|
522
|
-
<span class='
|
523
|
-
<span class='
|
524
|
-
|
525
|
-
<span class='
|
526
|
-
<span class='
|
527
|
-
</pre>
|
503
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_aliases'>aliases</span><span class='lparen'>(</span><span class='id identifier rubyid_dst_label'>dst_label</span> <span class='op'>=</span> <span class='kw'>nil</span><span class='rparen'>)</span>
|
504
|
+
<span class='id identifier rubyid_reference'>reference</span> <span class='op'>=</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_name'>name</span>
|
505
|
+
<span class='id identifier rubyid_reference'>reference</span> <span class='op'>=</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_class'>class</span><span class='op'>::</span><span class='const'>MAPPING</span><span class='lbracket'>[</span><span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_name'>name</span><span class='rbracket'>]</span> <span class='kw'>if</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_class'>class</span><span class='op'>::</span><span class='const'>MAPPING</span><span class='period'>.</span><span class='id identifier rubyid_has_key?'>has_key?</span><span class='lparen'>(</span><span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_name'>name</span><span class='rparen'>)</span> <span class='comment'># We are an alias
|
506
|
+
</span> <span class='id identifier rubyid_reference'>reference</span> <span class='op'>=</span> <span class='id identifier rubyid_reference'>reference</span><span class='period'>.</span><span class='id identifier rubyid_gsub'>gsub</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>_</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'> </span><span class='tstring_end'>"</span></span><span class='rparen'>)</span>
|
507
|
+
|
508
|
+
<span class='kw'>if</span> <span class='ivar'>@aliases</span><span class='period'>.</span><span class='id identifier rubyid_blank?'>blank?</span> <span class='kw'>then</span>
|
509
|
+
<span class='comment'># First we search for aliases by name
|
510
|
+
</span> <span class='ivar'>@aliases</span> <span class='op'>=</span> <span class='lbracket'>[</span><span class='id identifier rubyid_reference'>reference</span><span class='rbracket'>]</span>
|
511
|
+
|
512
|
+
<span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_class'>class</span><span class='op'>::</span><span class='const'>MAPPING</span><span class='period'>.</span><span class='id identifier rubyid_each'>each</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_name'>name</span><span class='comma'>,</span> <span class='id identifier rubyid_zone'>zone</span><span class='op'>|</span>
|
513
|
+
<span class='kw'>if</span> <span class='id identifier rubyid_zone'>zone</span><span class='period'>.</span><span class='id identifier rubyid_gsub'>gsub</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>_</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'> </span><span class='tstring_end'>"</span></span><span class='rparen'>)</span> <span class='op'>==</span> <span class='id identifier rubyid_reference'>reference</span> <span class='kw'>then</span>
|
514
|
+
<span class='kw'>if</span> <span class='id identifier rubyid_name'>name</span> <span class='op'>==</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>International Date Line West</span><span class='tstring_end'>"</span></span> <span class='op'>||</span> <span class='id identifier rubyid_name'>name</span> <span class='op'>==</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>UTC</span><span class='tstring_end'>"</span></span> <span class='op'>||</span> <span class='id identifier rubyid_name'>name</span><span class='period'>.</span><span class='id identifier rubyid_include?'>include?</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>(US & Canada)</span><span class='tstring_end'>"</span></span><span class='rparen'>)</span>
|
515
|
+
<span class='ivar'>@aliases</span> <span class='op'><<</span> <span class='id identifier rubyid_name'>name</span>
|
516
|
+
<span class='kw'>else</span>
|
517
|
+
<span class='ivar'>@aliases</span> <span class='op'><<</span> <span class='id identifier rubyid_reference'>reference</span><span class='period'>.</span><span class='id identifier rubyid_gsub'>gsub</span><span class='lparen'>(</span><span class='tstring'><span class='regexp_beg'>/</span><span class='tstring_content'>\/.*</span><span class='regexp_end'>/</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>/</span><span class='tstring_end'>"</span></span> <span class='op'>+</span> <span class='id identifier rubyid_name'>name</span><span class='rparen'>)</span>
|
518
|
+
<span class='kw'>end</span>
|
519
|
+
<span class='kw'>end</span>
|
520
|
+
<span class='kw'>end</span>
|
521
|
+
|
522
|
+
<span class='ivar'>@aliases</span> <span class='op'>=</span> <span class='ivar'>@aliases</span><span class='period'>.</span><span class='id identifier rubyid_uniq'>uniq</span><span class='period'>.</span><span class='id identifier rubyid_compact'>compact</span><span class='period'>.</span><span class='id identifier rubyid_sort'>sort</span>
|
523
|
+
<span class='kw'>end</span>
|
524
|
+
|
525
|
+
<span class='ivar'>@aliases</span>
|
526
|
+
<span class='kw'>end</span></pre>
|
528
527
|
</td>
|
529
528
|
</tr>
|
530
529
|
</table>
|
@@ -622,15 +621,14 @@
|
|
622
621
|
<td>
|
623
622
|
<pre class="code"><span class="info file"># File 'lib/lazier/datetime.rb', line 418</span>
|
624
623
|
|
625
|
-
<span class='
|
626
|
-
<span class='
|
624
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_current_offset'>current_offset</span><span class='lparen'>(</span><span class='id identifier rubyid_rational'>rational</span> <span class='op'>=</span> <span class='kw'>false</span><span class='comma'>,</span> <span class='id identifier rubyid_date'>date</span> <span class='op'>=</span> <span class='kw'>nil</span><span class='rparen'>)</span>
|
625
|
+
<span class='id identifier rubyid_date'>date</span> <span class='op'>||=</span> <span class='op'>::</span><span class='const'>DateTime</span><span class='period'>.</span><span class='id identifier rubyid_now'>now</span>
|
627
626
|
|
628
|
-
<span class='
|
627
|
+
<span class='id identifier rubyid_dst_period'>dst_period</span> <span class='op'>=</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_dst_period'>dst_period</span>
|
629
628
|
|
630
|
-
<span class='
|
631
|
-
<span class='
|
632
|
-
<span class='
|
633
|
-
</pre>
|
629
|
+
<span class='id identifier rubyid_rv'>rv</span> <span class='op'>=</span> <span class='lparen'>(</span><span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_period_for_utc'>period_for_utc</span><span class='lparen'>(</span><span class='id identifier rubyid_date'>date</span><span class='period'>.</span><span class='id identifier rubyid_utc'>utc</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_dst?'>dst?</span> <span class='op'>?</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_dst_offset'>dst_offset</span> <span class='op'>:</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_offset'>offset</span><span class='rparen'>)</span>
|
630
|
+
<span class='id identifier rubyid_rational'>rational</span> <span class='op'>?</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_class'>class</span><span class='period'>.</span><span class='id identifier rubyid_rationalize_offset'>rationalize_offset</span><span class='lparen'>(</span><span class='id identifier rubyid_rv'>rv</span><span class='rparen'>)</span> <span class='op'>:</span> <span class='id identifier rubyid_rv'>rv</span>
|
631
|
+
<span class='kw'>end</span></pre>
|
634
632
|
</td>
|
635
633
|
</tr>
|
636
634
|
</table>
|
@@ -725,12 +723,11 @@
|
|
725
723
|
<td>
|
726
724
|
<pre class="code"><span class="info file"># File 'lib/lazier/datetime.rb', line 468</span>
|
727
725
|
|
728
|
-
<span class='
|
729
|
-
<span class='
|
730
|
-
<span class='
|
731
|
-
<span class='
|
732
|
-
<span class='
|
733
|
-
</pre>
|
726
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_dst_correction'>dst_correction</span><span class='lparen'>(</span><span class='id identifier rubyid_rational'>rational</span> <span class='op'>=</span> <span class='kw'>false</span><span class='comma'>,</span> <span class='id identifier rubyid_year'>year</span> <span class='op'>=</span> <span class='kw'>nil</span><span class='rparen'>)</span>
|
727
|
+
<span class='id identifier rubyid_period'>period</span> <span class='op'>=</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_dst_period'>dst_period</span><span class='lparen'>(</span><span class='id identifier rubyid_year'>year</span><span class='rparen'>)</span>
|
728
|
+
<span class='id identifier rubyid_rv'>rv</span> <span class='op'>=</span> <span class='id identifier rubyid_period'>period</span> <span class='op'>?</span> <span class='id identifier rubyid_period'>period</span><span class='period'>.</span><span class='id identifier rubyid_std_offset'>std_offset</span> <span class='op'>:</span> <span class='int'>0</span>
|
729
|
+
<span class='id identifier rubyid_rational'>rational</span> <span class='op'>?</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_class'>class</span><span class='period'>.</span><span class='id identifier rubyid_rationalize_offset'>rationalize_offset</span><span class='lparen'>(</span><span class='id identifier rubyid_rv'>rv</span><span class='rparen'>)</span> <span class='op'>:</span> <span class='id identifier rubyid_rv'>rv</span>
|
730
|
+
<span class='kw'>end</span></pre>
|
734
731
|
</td>
|
735
732
|
</tr>
|
736
733
|
</table>
|
@@ -843,13 +840,12 @@
|
|
843
840
|
<td>
|
844
841
|
<pre class="code"><span class="info file"># File 'lib/lazier/datetime.rb', line 491</span>
|
845
842
|
|
846
|
-
<span class='
|
847
|
-
<span class='
|
848
|
-
<span class='
|
843
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_dst_name'>dst_name</span><span class='lparen'>(</span><span class='id identifier rubyid_dst_label'>dst_label</span> <span class='op'>=</span> <span class='kw'>nil</span><span class='comma'>,</span> <span class='id identifier rubyid_year'>year</span> <span class='op'>=</span> <span class='kw'>nil</span><span class='comma'>,</span> <span class='id identifier rubyid_name'>name</span> <span class='op'>=</span> <span class='kw'>nil</span><span class='rparen'>)</span>
|
844
|
+
<span class='id identifier rubyid_dst_label'>dst_label</span> <span class='op'>||=</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>(DST)</span><span class='tstring_end'>"</span></span>
|
845
|
+
<span class='id identifier rubyid_name'>name</span> <span class='op'>||=</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_name'>name</span>
|
849
846
|
|
850
|
-
<span class='
|
851
|
-
<span class='
|
852
|
-
</pre>
|
847
|
+
<span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_uses_dst?'>uses_dst?</span><span class='lparen'>(</span><span class='id identifier rubyid_year'>year</span><span class='rparen'>)</span> <span class='op'>?</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_name'>name</span><span class='rbrace'>}</span><span class='tstring_content'> </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_dst_label'>dst_label</span><span class='rbrace'>}</span><span class='tstring_end'>"</span></span> <span class='op'>:</span> <span class='kw'>nil</span>
|
848
|
+
<span class='kw'>end</span></pre>
|
853
849
|
</td>
|
854
850
|
</tr>
|
855
851
|
</table>
|
@@ -944,12 +940,11 @@
|
|
944
940
|
<td>
|
945
941
|
<pre class="code"><span class="info file"># File 'lib/lazier/datetime.rb', line 479</span>
|
946
942
|
|
947
|
-
<span class='
|
948
|
-
<span class='
|
949
|
-
<span class='
|
950
|
-
<span class='
|
951
|
-
<span class='
|
952
|
-
</pre>
|
943
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_dst_offset'>dst_offset</span><span class='lparen'>(</span><span class='id identifier rubyid_rational'>rational</span> <span class='op'>=</span> <span class='kw'>false</span><span class='comma'>,</span> <span class='id identifier rubyid_year'>year</span> <span class='op'>=</span> <span class='kw'>nil</span><span class='rparen'>)</span>
|
944
|
+
<span class='id identifier rubyid_period'>period</span> <span class='op'>=</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_dst_period'>dst_period</span><span class='lparen'>(</span><span class='id identifier rubyid_year'>year</span><span class='rparen'>)</span>
|
945
|
+
<span class='id identifier rubyid_rv'>rv</span> <span class='op'>=</span> <span class='id identifier rubyid_period'>period</span> <span class='op'>?</span> <span class='id identifier rubyid_period'>period</span><span class='period'>.</span><span class='id identifier rubyid_utc_total_offset'>utc_total_offset</span> <span class='op'>:</span> <span class='int'>0</span>
|
946
|
+
<span class='id identifier rubyid_rational'>rational</span> <span class='op'>?</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_class'>class</span><span class='period'>.</span><span class='id identifier rubyid_rationalize_offset'>rationalize_offset</span><span class='lparen'>(</span><span class='id identifier rubyid_rv'>rv</span><span class='rparen'>)</span> <span class='op'>:</span> <span class='id identifier rubyid_rv'>rv</span>
|
947
|
+
<span class='kw'>end</span></pre>
|
953
948
|
</td>
|
954
949
|
</tr>
|
955
950
|
</table>
|
@@ -1032,17 +1027,16 @@
|
|
1032
1027
|
<td>
|
1033
1028
|
<pre class="code"><span class="info file"># File 'lib/lazier/datetime.rb', line 440</span>
|
1034
1029
|
|
1035
|
-
<span class='
|
1036
|
-
<span class='
|
1030
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_dst_period'>dst_period</span><span class='lparen'>(</span><span class='id identifier rubyid_year'>year</span> <span class='op'>=</span> <span class='kw'>nil</span><span class='rparen'>)</span>
|
1031
|
+
<span class='id identifier rubyid_year'>year</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>
|
1037
1032
|
|
1038
|
-
<span class='
|
1039
|
-
<span class='
|
1040
|
-
|
1041
|
-
<span class='
|
1042
|
-
<span class='
|
1043
|
-
<span class='
|
1044
|
-
<span class='
|
1045
|
-
</pre>
|
1033
|
+
<span class='id identifier rubyid_nothern_summer'>nothern_summer</span> <span class='op'>=</span> <span class='op'>::</span><span class='const'>DateTime</span><span class='period'>.</span><span class='id identifier rubyid_civil'>civil</span><span class='lparen'>(</span><span class='id identifier rubyid_year'>year</span><span class='comma'>,</span> <span class='int'>7</span><span class='comma'>,</span> <span class='int'>15</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_utc'>utc</span> <span class='comment'># This is a representation of a summer period in the Northern Hemisphere.
|
1034
|
+
</span> <span class='id identifier rubyid_southern_summer'>southern_summer</span> <span class='op'>=</span> <span class='op'>::</span><span class='const'>DateTime</span><span class='period'>.</span><span class='id identifier rubyid_civil'>civil</span><span class='lparen'>(</span><span class='id identifier rubyid_year'>year</span><span class='comma'>,</span> <span class='int'>1</span><span class='comma'>,</span> <span class='int'>15</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_utc'>utc</span> <span class='comment'># This is a representation of a summer period in the Northern Hemisphere.
|
1035
|
+
</span>
|
1036
|
+
<span class='id identifier rubyid_period'>period</span> <span class='op'>=</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_period_for_utc'>period_for_utc</span><span class='lparen'>(</span><span class='id identifier rubyid_nothern_summer'>nothern_summer</span><span class='rparen'>)</span>
|
1037
|
+
<span class='id identifier rubyid_period'>period</span> <span class='op'>=</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_period_for_utc'>period_for_utc</span><span class='lparen'>(</span><span class='id identifier rubyid_southern_summer'>southern_summer</span><span class='rparen'>)</span> <span class='kw'>if</span> <span class='op'>!</span><span class='id identifier rubyid_period'>period</span><span class='period'>.</span><span class='id identifier rubyid_dst?'>dst?</span>
|
1038
|
+
<span class='id identifier rubyid_period'>period</span><span class='period'>.</span><span class='id identifier rubyid_dst?'>dst?</span> <span class='op'>?</span> <span class='id identifier rubyid_period'>period</span> <span class='op'>:</span> <span class='kw'>nil</span>
|
1039
|
+
<span class='kw'>end</span></pre>
|
1046
1040
|
</td>
|
1047
1041
|
</tr>
|
1048
1042
|
</table>
|
@@ -1119,11 +1113,10 @@
|
|
1119
1113
|
<td>
|
1120
1114
|
<pre class="code"><span class="info file"># File 'lib/lazier/datetime.rb', line 431</span>
|
1121
1115
|
|
1122
|
-
<span class='
|
1123
|
-
<span class='
|
1124
|
-
<span class='
|
1125
|
-
<span class='
|
1126
|
-
</pre>
|
1116
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_offset'>offset</span><span class='lparen'>(</span><span class='id identifier rubyid_rational'>rational</span> <span class='op'>=</span> <span class='kw'>false</span><span class='rparen'>)</span>
|
1117
|
+
<span class='id identifier rubyid_rv'>rv</span> <span class='op'>=</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_utc_offset'>utc_offset</span>
|
1118
|
+
<span class='id identifier rubyid_rational'>rational</span> <span class='op'>?</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_class'>class</span><span class='period'>.</span><span class='id identifier rubyid_rationalize_offset'>rationalize_offset</span><span class='lparen'>(</span><span class='id identifier rubyid_rv'>rv</span><span class='rparen'>)</span> <span class='op'>:</span> <span class='id identifier rubyid_rv'>rv</span>
|
1119
|
+
<span class='kw'>end</span></pre>
|
1127
1120
|
</td>
|
1128
1121
|
</tr>
|
1129
1122
|
</table>
|
@@ -1217,11 +1210,10 @@
|
|
1217
1210
|
<td>
|
1218
1211
|
<pre class="code"><span class="info file"># File 'lib/lazier/datetime.rb', line 503</span>
|
1219
1212
|
|
1220
|
-
<span class='
|
1221
|
-
<span class='
|
1222
|
-
<span class='
|
1223
|
-
<span class='
|
1224
|
-
</pre>
|
1213
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_to_str'>to_str</span><span class='lparen'>(</span><span class='id identifier rubyid_name'>name</span> <span class='op'>=</span> <span class='kw'>nil</span><span class='comma'>,</span> <span class='id identifier rubyid_colon'>colon</span> <span class='op'>=</span> <span class='kw'>true</span><span class='rparen'>)</span>
|
1214
|
+
<span class='id identifier rubyid_name'>name</span> <span class='op'>||=</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_aliases'>aliases</span><span class='period'>.</span><span class='id identifier rubyid_first'>first</span>
|
1215
|
+
<span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>(GMT</span><span class='embexpr_beg'>#{</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='id identifier rubyid_colon'>colon</span><span class='rparen'>)</span><span class='rbrace'>}</span><span class='tstring_content'>) </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_name'>name</span><span class='rbrace'>}</span><span class='tstring_end'>"</span></span>
|
1216
|
+
<span class='kw'>end</span></pre>
|
1225
1217
|
</td>
|
1226
1218
|
</tr>
|
1227
1219
|
</table>
|
@@ -1314,10 +1306,9 @@
|
|
1314
1306
|
<td>
|
1315
1307
|
<pre class="code"><span class="info file"># File 'lib/lazier/datetime.rb', line 532</span>
|
1316
1308
|
|
1317
|
-
<span class='
|
1318
|
-
<span class='
|
1319
|
-
<span class='
|
1320
|
-
</pre>
|
1309
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_to_str_parameterized'>to_str_parameterized</span><span class='lparen'>(</span><span class='id identifier rubyid_with_offset'>with_offset</span> <span class='op'>=</span> <span class='kw'>true</span><span class='comma'>,</span> <span class='id identifier rubyid_name'>name</span> <span class='op'>=</span> <span class='kw'>nil</span><span class='rparen'>)</span>
|
1310
|
+
<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_parameterize_zone'>parameterize_zone</span><span class='lparen'>(</span><span class='id identifier rubyid_name'>name</span> <span class='op'>||</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_to_str'>to_str</span><span class='comma'>,</span> <span class='id identifier rubyid_with_offset'>with_offset</span><span class='rparen'>)</span>
|
1311
|
+
<span class='kw'>end</span></pre>
|
1321
1312
|
</td>
|
1322
1313
|
</tr>
|
1323
1314
|
</table>
|
@@ -1436,19 +1427,18 @@
|
|
1436
1427
|
<td>
|
1437
1428
|
<pre class="code"><span class="info file"># File 'lib/lazier/datetime.rb', line 514</span>
|
1438
1429
|
|
1439
|
-
<span class='
|
1440
|
-
<span class='
|
1441
|
-
<span class='
|
1442
|
-
|
1443
|
-
<span class='
|
1444
|
-
<span class='
|
1445
|
-
<span class='
|
1446
|
-
<span class='
|
1447
|
-
<span class='
|
1448
|
-
<span class='
|
1449
|
-
<span class='
|
1450
|
-
<span class='
|
1451
|
-
</pre>
|
1430
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_to_str_with_dst'>to_str_with_dst</span><span class='lparen'>(</span><span class='id identifier rubyid_dst_label'>dst_label</span> <span class='op'>=</span> <span class='kw'>nil</span><span class='comma'>,</span> <span class='id identifier rubyid_year'>year</span> <span class='op'>=</span> <span class='kw'>nil</span><span class='comma'>,</span> <span class='id identifier rubyid_name'>name</span> <span class='op'>=</span> <span class='kw'>nil</span><span class='rparen'>)</span>
|
1431
|
+
<span class='id identifier rubyid_dst_label'>dst_label</span> <span class='op'>||=</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>(DST)</span><span class='tstring_end'>"</span></span>
|
1432
|
+
<span class='id identifier rubyid_name'>name</span> <span class='op'>||=</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_aliases'>aliases</span><span class='period'>.</span><span class='id identifier rubyid_first'>first</span>
|
1433
|
+
|
1434
|
+
<span class='kw'>if</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_uses_dst?'>uses_dst?</span><span class='lparen'>(</span><span class='id identifier rubyid_year'>year</span><span class='rparen'>)</span> <span class='kw'>then</span>
|
1435
|
+
<span class='id identifier rubyid_period'>period</span> <span class='op'>=</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_dst_period'>dst_period</span><span class='lparen'>(</span><span class='id identifier rubyid_year'>year</span><span class='rparen'>)</span>
|
1436
|
+
<span class='id identifier rubyid_offset'>offset</span> <span class='op'>=</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_class'>class</span><span class='period'>.</span><span class='id identifier rubyid_seconds_to_utc_offset'>seconds_to_utc_offset</span><span class='lparen'>(</span><span class='id identifier rubyid_period'>period</span><span class='period'>.</span><span class='id identifier rubyid_utc_total_offset'>utc_total_offset</span><span class='rparen'>)</span>
|
1437
|
+
<span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>(GMT</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_offset'>offset</span><span class='rbrace'>}</span><span class='tstring_content'>) </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_name'>name</span><span class='rbrace'>}</span><span class='tstring_content'> </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_dst_label'>dst_label</span><span class='rbrace'>}</span><span class='tstring_end'>"</span></span>
|
1438
|
+
<span class='kw'>else</span>
|
1439
|
+
<span class='kw'>nil</span>
|
1440
|
+
<span class='kw'>end</span>
|
1441
|
+
<span class='kw'>end</span></pre>
|
1452
1442
|
</td>
|
1453
1443
|
</tr>
|
1454
1444
|
</table>
|
@@ -1576,11 +1566,10 @@
|
|
1576
1566
|
<td>
|
1577
1567
|
<pre class="code"><span class="info file"># File 'lib/lazier/datetime.rb', line 543</span>
|
1578
1568
|
|
1579
|
-
<span class='
|
1580
|
-
<span class='
|
1581
|
-
<span class='
|
1582
|
-
<span class='
|
1583
|
-
</pre>
|
1569
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_to_str_with_dst_parameterized'>to_str_with_dst_parameterized</span><span class='lparen'>(</span><span class='id identifier rubyid_dst_label'>dst_label</span> <span class='op'>=</span> <span class='kw'>nil</span><span class='comma'>,</span> <span class='id identifier rubyid_with_offset'>with_offset</span> <span class='op'>=</span> <span class='kw'>true</span><span class='comma'>,</span> <span class='id identifier rubyid_year'>year</span> <span class='op'>=</span> <span class='kw'>nil</span><span class='comma'>,</span> <span class='id identifier rubyid_name'>name</span> <span class='op'>=</span> <span class='kw'>nil</span><span class='rparen'>)</span>
|
1570
|
+
<span class='id identifier rubyid_rv'>rv</span> <span class='op'>=</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_to_str_with_dst'>to_str_with_dst</span><span class='lparen'>(</span><span class='id identifier rubyid_dst_label'>dst_label</span><span class='comma'>,</span> <span class='id identifier rubyid_year'>year</span><span class='comma'>,</span> <span class='id identifier rubyid_name'>name</span><span class='rparen'>)</span>
|
1571
|
+
<span class='id identifier rubyid_rv'>rv</span> <span class='op'>?</span> <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_parameterize_zone'>parameterize_zone</span><span class='lparen'>(</span><span class='id identifier rubyid_rv'>rv</span><span class='rparen'>)</span> <span class='op'>:</span> <span class='kw'>nil</span>
|
1572
|
+
<span class='kw'>end</span></pre>
|
1584
1573
|
</td>
|
1585
1574
|
</tr>
|
1586
1575
|
</table>
|
@@ -1660,14 +1649,13 @@
|
|
1660
1649
|
<td>
|
1661
1650
|
<pre class="code"><span class="info file"># File 'lib/lazier/datetime.rb', line 455</span>
|
1662
1651
|
|
1663
|
-
<span class='
|
1664
|
-
<span class='
|
1665
|
-
<span class='
|
1666
|
-
<span class='
|
1667
|
-
<span class='
|
1668
|
-
<span class='
|
1669
|
-
<span class='
|
1670
|
-
</pre>
|
1652
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_uses_dst?'>uses_dst?</span><span class='lparen'>(</span><span class='id identifier rubyid_reference'>reference</span> <span class='op'>=</span> <span class='kw'>nil</span><span class='rparen'>)</span>
|
1653
|
+
<span class='kw'>if</span> <span class='id identifier rubyid_reference'>reference</span><span class='period'>.</span><span class='id identifier rubyid_respond_to?'>respond_to?</span><span class='lparen'>(</span><span class='symbol'>:year</span><span class='rparen'>)</span> <span class='op'>&&</span> <span class='id identifier rubyid_reference'>reference</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='kw'>then</span> <span class='comment'># This is a date like object
|
1654
|
+
</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_dst_period'>dst_period</span><span class='lparen'>(</span><span class='id identifier rubyid_reference'>reference</span><span class='period'>.</span><span class='id identifier rubyid_year'>year</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_present?'>present?</span> <span class='op'>&&</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_period_for_utc'>period_for_utc</span><span class='lparen'>(</span><span class='id identifier rubyid_reference'>reference</span><span class='period'>.</span><span class='id identifier rubyid_utc'>utc</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_dst?'>dst?</span>
|
1655
|
+
<span class='kw'>else</span>
|
1656
|
+
<span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_dst_period'>dst_period</span><span class='lparen'>(</span><span class='id identifier rubyid_reference'>reference</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_present?'>present?</span>
|
1657
|
+
<span class='kw'>end</span>
|
1658
|
+
<span class='kw'>end</span></pre>
|
1671
1659
|
</td>
|
1672
1660
|
</tr>
|
1673
1661
|
</table>
|
@@ -1678,9 +1666,9 @@
|
|
1678
1666
|
</div>
|
1679
1667
|
|
1680
1668
|
<div id="footer">
|
1681
|
-
Generated on
|
1669
|
+
Generated on Fri Oct 19 09:08:32 2012 by
|
1682
1670
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
1683
|
-
0.8.2.1 (ruby-1.
|
1671
|
+
0.8.2.1 (ruby-1.9.2).
|
1684
1672
|
</div>
|
1685
1673
|
|
1686
1674
|
</body>
|