lazier 1.0.6 → 1.0.7
Sign up to get free protection for your applications and to get access to all the features.
- data/Gemfile +1 -1
- data/README.md +1 -1
- data/Rakefile +1 -1
- data/doc/Lazier.html +87 -84
- data/doc/Lazier/Boolean.html +10 -8
- data/doc/Lazier/DateTime.html +58 -52
- data/doc/Lazier/DateTime/ClassMethods.html +91 -79
- data/doc/Lazier/Exceptions.html +2 -2
- data/doc/Lazier/Exceptions/Dump.html +2 -2
- data/doc/Lazier/Hash.html +20 -18
- data/doc/Lazier/Math.html +2 -2
- data/doc/Lazier/Math/ClassMethods.html +24 -22
- data/doc/Lazier/Object.html +109 -95
- data/doc/Lazier/Pathname.html +11 -10
- data/doc/Lazier/Settings.html +80 -70
- data/doc/Lazier/String.html +26 -22
- data/doc/Lazier/TimeZone.html +258 -166
- data/doc/Lazier/TimeZone/ClassMethods.html +79 -72
- data/doc/Lazier/Version.html +10 -6
- data/doc/_index.html +2 -2
- data/doc/file.README.html +6 -6
- data/doc/index.html +6 -6
- data/doc/method_list.html +90 -82
- data/doc/top-level-namespace.html +2 -2
- data/lazier.gemspec +1 -1
- data/lib/lazier.rb +1 -1
- data/lib/lazier/boolean.rb +1 -1
- data/lib/lazier/datetime.rb +17 -4
- data/lib/lazier/exceptions.rb +1 -1
- data/lib/lazier/hash.rb +1 -1
- data/lib/lazier/math.rb +1 -1
- data/lib/lazier/object.rb +1 -1
- data/lib/lazier/pathname.rb +1 -1
- data/lib/lazier/settings.rb +1 -1
- data/lib/lazier/string.rb +1 -1
- data/lib/lazier/version.rb +2 -2
- data/spec/coverage_helper.rb +1 -1
- data/spec/lazier/boolean_spec.rb +1 -1
- data/spec/lazier/datetime_spec.rb +11 -1
- data/spec/lazier/hash_spec.rb +1 -1
- data/spec/lazier/math_spec.rb +1 -1
- data/spec/lazier/object_spec.rb +1 -1
- data/spec/lazier/pathname_spec.rb +1 -1
- data/spec/lazier/settings_spec.rb +1 -1
- data/spec/lazier/string_spec.rb +1 -1
- data/spec/lazier_spec.rb +1 -1
- data/spec/spec_helper.rb +1 -1
- metadata +155 -146
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'># => ["usr", "bin", "ruby"]
|
164
|
-
</
|
162
|
+
<pre class="code ruby"><code><span class='rubyid_Pathname constant id'>Pathname</span><span class='dot token'>.</span><span class='rubyid_new identifier id'>new</span><span class='lparen token'>(</span><span class='string val'>"/usr/bin/ruby"</span><span class='rparen token'>)</span><span class='dot token'>.</span><span class='rubyid_components identifier id'>components</span>
|
163
|
+
<span class='comment val'># => ["usr", "bin", "ruby"]</span>
|
164
|
+
</code></pre>
|
165
165
|
|
166
166
|
|
167
167
|
</div>
|
@@ -201,11 +201,12 @@
|
|
201
201
|
<td>
|
202
202
|
<pre class="code"><span class="info file"># File 'lib/lazier/pathname.rb', line 20</span>
|
203
203
|
|
204
|
-
<span class='kw'>def</span> <span class='
|
205
|
-
<span class='
|
206
|
-
<span class='kw'>self</span><span class='
|
207
|
-
<span class='
|
208
|
-
<span class='kw'>end</span
|
204
|
+
<span class='rubyid_def def kw'>def</span> <span class='rubyid_components identifier id'>components</span>
|
205
|
+
<span class='rubyid_rv identifier id'>rv</span> <span class='assign token'>=</span> <span class='lbrack token'>[</span><span class='rbrack token'>]</span>
|
206
|
+
<span class='rubyid_self self kw'>self</span><span class='dot token'>.</span><span class='rubyid_each_filename identifier id'>each_filename</span> <span class='lbrace token'>{</span> <span class='bitor op'>|</span><span class='rubyid_p identifier id'>p</span><span class='bitor op'>|</span> <span class='rubyid_rv identifier id'>rv</span> <span class='lshft op'><<</span> <span class='rubyid_p identifier id'>p</span> <span class='rbrace token'>}</span>
|
207
|
+
<span class='rubyid_rv identifier id'>rv</span>
|
208
|
+
<span class='rubyid_end end kw'>end</span>
|
209
|
+
</pre>
|
209
210
|
</td>
|
210
211
|
</tr>
|
211
212
|
</table>
|
@@ -216,9 +217,9 @@
|
|
216
217
|
</div>
|
217
218
|
|
218
219
|
<div id="footer">
|
219
|
-
Generated on
|
220
|
+
Generated on Wed Jan 16 10:02:57 2013 by
|
220
221
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
221
|
-
0.8.2.1 (ruby-1.
|
222
|
+
0.8.2.1 (ruby-1.8.7).
|
222
223
|
</div>
|
223
224
|
|
224
225
|
</body>
|
data/doc/Lazier/Settings.html
CHANGED
@@ -431,12 +431,13 @@
|
|
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='kw'>def</span> <span class='
|
435
|
-
<span class='kw'>self</span><span class='
|
436
|
-
<span class='kw'>self</span><span class='
|
437
|
-
<span class='kw'>self</span><span class='
|
438
|
-
<span class='kw'>self</span><span class='
|
439
|
-
<span class='kw'>end</span
|
434
|
+
<span class='rubyid_def def kw'>def</span> <span class='rubyid_initialize identifier id'>initialize</span>
|
435
|
+
<span class='rubyid_self self kw'>self</span><span class='dot token'>.</span><span class='rubyid_setup_format_number identifier id'>setup_format_number</span>
|
436
|
+
<span class='rubyid_self self kw'>self</span><span class='dot token'>.</span><span class='rubyid_setup_boolean_names identifier id'>setup_boolean_names</span>
|
437
|
+
<span class='rubyid_self self kw'>self</span><span class='dot token'>.</span><span class='rubyid_setup_date_formats identifier id'>setup_date_formats</span>
|
438
|
+
<span class='rubyid_self self kw'>self</span><span class='dot token'>.</span><span class='rubyid_setup_date_names identifier id'>setup_date_names</span>
|
439
|
+
<span class='rubyid_end end kw'>end</span>
|
440
|
+
</pre>
|
440
441
|
</td>
|
441
442
|
</tr>
|
442
443
|
</table>
|
@@ -481,9 +482,10 @@
|
|
481
482
|
<td>
|
482
483
|
<pre class="code"><span class="info file"># File 'lib/lazier/settings.rb', line 14</span>
|
483
484
|
|
484
|
-
<span class='kw'>def</span> <span class='
|
485
|
-
<span class='ivar'>@boolean_names</span>
|
486
|
-
<span class='kw'>end</span
|
485
|
+
<span class='rubyid_def def kw'>def</span> <span class='rubyid_boolean_names identifier id'>boolean_names</span>
|
486
|
+
<span class='rubyid_@boolean_names ivar id'>@boolean_names</span>
|
487
|
+
<span class='rubyid_end end kw'>end</span>
|
488
|
+
</pre>
|
487
489
|
</td>
|
488
490
|
</tr>
|
489
491
|
</table>
|
@@ -523,9 +525,10 @@
|
|
523
525
|
<td>
|
524
526
|
<pre class="code"><span class="info file"># File 'lib/lazier/settings.rb', line 20</span>
|
525
527
|
|
526
|
-
<span class='kw'>def</span> <span class='
|
527
|
-
<span class='ivar'>@date_formats</span>
|
528
|
-
<span class='kw'>end</span
|
528
|
+
<span class='rubyid_def def kw'>def</span> <span class='rubyid_date_formats identifier id'>date_formats</span>
|
529
|
+
<span class='rubyid_@date_formats ivar id'>@date_formats</span>
|
530
|
+
<span class='rubyid_end end kw'>end</span>
|
531
|
+
</pre>
|
529
532
|
</td>
|
530
533
|
</tr>
|
531
534
|
</table>
|
@@ -565,9 +568,10 @@
|
|
565
568
|
<td>
|
566
569
|
<pre class="code"><span class="info file"># File 'lib/lazier/settings.rb', line 17</span>
|
567
570
|
|
568
|
-
<span class='kw'>def</span> <span class='
|
569
|
-
<span class='ivar'>@date_names</span>
|
570
|
-
<span class='kw'>end</span
|
571
|
+
<span class='rubyid_def def kw'>def</span> <span class='rubyid_date_names identifier id'>date_names</span>
|
572
|
+
<span class='rubyid_@date_names ivar id'>@date_names</span>
|
573
|
+
<span class='rubyid_end end kw'>end</span>
|
574
|
+
</pre>
|
571
575
|
</td>
|
572
576
|
</tr>
|
573
577
|
</table>
|
@@ -607,9 +611,10 @@
|
|
607
611
|
<td>
|
608
612
|
<pre class="code"><span class="info file"># File 'lib/lazier/settings.rb', line 11</span>
|
609
613
|
|
610
|
-
<span class='kw'>def</span> <span class='
|
611
|
-
<span class='ivar'>@format_number</span>
|
612
|
-
<span class='kw'>end</span
|
614
|
+
<span class='rubyid_def def kw'>def</span> <span class='rubyid_format_number identifier id'>format_number</span>
|
615
|
+
<span class='rubyid_@format_number ivar id'>@format_number</span>
|
616
|
+
<span class='rubyid_end end kw'>end</span>
|
617
|
+
</pre>
|
613
618
|
</td>
|
614
619
|
</tr>
|
615
620
|
</table>
|
@@ -671,9 +676,10 @@
|
|
671
676
|
<td>
|
672
677
|
<pre class="code"><span class="info file"># File 'lib/lazier/settings.rb', line 25</span>
|
673
678
|
|
674
|
-
<span class='kw'>def</span> <span class='kw'>self</span><span class='
|
675
|
-
<span class='ivar'>@instance</span> <span class='op'>||=</span> <span class='kw'>self</span><span class='
|
676
|
-
<span class='kw'>end</span
|
679
|
+
<span class='rubyid_def def kw'>def</span> <span class='rubyid_self self kw'>self</span><span class='dot token'>.</span><span class='rubyid_instance identifier id'>instance</span>
|
680
|
+
<span class='rubyid_@instance ivar id'>@instance</span> <span class='opasgn op'>||=</span> <span class='rubyid_self self kw'>self</span><span class='dot token'>.</span><span class='rubyid_new identifier id'>new</span>
|
681
|
+
<span class='rubyid_end end kw'>end</span>
|
682
|
+
</pre>
|
677
683
|
</td>
|
678
684
|
</tr>
|
679
685
|
</table>
|
@@ -781,11 +787,12 @@
|
|
781
787
|
<td>
|
782
788
|
<pre class="code"><span class="info file"># File 'lib/lazier/settings.rb', line 60</span>
|
783
789
|
|
784
|
-
<span class='kw'>def</span> <span class='
|
785
|
-
<span class='
|
786
|
-
<span class='
|
787
|
-
<span class='ivar'>@boolean_names</span> <span class='
|
788
|
-
<span class='kw'>end</span
|
790
|
+
<span class='rubyid_def def kw'>def</span> <span class='rubyid_setup_boolean_names identifier id'>setup_boolean_names</span><span class='lparen token'>(</span><span class='rubyid_true_name identifier id'>true_name</span> <span class='assign token'>=</span> <span class='rubyid_nil nil kw'>nil</span><span class='comma token'>,</span> <span class='rubyid_false_name identifier id'>false_name</span> <span class='assign token'>=</span> <span class='rubyid_nil nil kw'>nil</span><span class='rparen token'>)</span>
|
791
|
+
<span class='rubyid_true_name identifier id'>true_name</span> <span class='opasgn op'>||=</span> <span class='string val'>"Yes"</span>
|
792
|
+
<span class='rubyid_false_name identifier id'>false_name</span> <span class='opasgn op'>||=</span> <span class='string val'>"No"</span>
|
793
|
+
<span class='rubyid_@boolean_names ivar id'>@boolean_names</span> <span class='assign token'>=</span> <span class='lbrace token'>{</span><span class='rubyid_true true kw'>true</span> <span class='assign token'>=</span><span class='gt op'>></span> <span class='rubyid_true_name identifier id'>true_name</span><span class='comma token'>,</span> <span class='rubyid_false false kw'>false</span> <span class='assign token'>=</span><span class='gt op'>></span> <span class='rubyid_false_name identifier id'>false_name</span><span class='rbrace token'>}</span>
|
794
|
+
<span class='rubyid_end end kw'>end</span>
|
795
|
+
</pre>
|
789
796
|
</td>
|
790
797
|
</tr>
|
791
798
|
</table>
|
@@ -903,27 +910,28 @@
|
|
903
910
|
<td>
|
904
911
|
<pre class="code"><span class="info file"># File 'lib/lazier/settings.rb', line 72</span>
|
905
912
|
|
906
|
-
<span class='kw'>def</span> <span class='
|
907
|
-
<span class='
|
908
|
-
<span class='symbol'>:ct_date</span> <span class='
|
909
|
-
<span class='symbol'>:ct_time</span> <span class='
|
910
|
-
<span class='symbol'>:ct_date_time</span> <span class='
|
911
|
-
<span class='symbol'>:ct_iso_8601</span> <span class='
|
912
|
-
<span class='rbrace'>}</span> <span class='kw'>if</span> <span class='
|
913
|
-
|
914
|
-
<span class='kw'>if</span> <span class='
|
915
|
-
<span class='kw'>if</span> <span class='op'>!</span><span class='
|
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='
|
918
|
-
<span class='kw'>else</span>
|
919
|
-
<span class='ivar'>@date_formats</span> <span class='
|
920
|
-
<span class='kw'>end</span>
|
921
|
-
|
922
|
-
<span class='ivar'>@date_formats</span><span class='
|
923
|
-
<span class='kw'>end</span>
|
924
|
-
|
925
|
-
<span class='ivar'>@date_formats</span>
|
926
|
-
<span class='kw'>end</span
|
913
|
+
<span class='rubyid_def def kw'>def</span> <span class='rubyid_setup_date_formats identifier id'>setup_date_formats</span><span class='lparen token'>(</span><span class='rubyid_formats identifier id'>formats</span> <span class='assign token'>=</span> <span class='rubyid_nil nil kw'>nil</span><span class='comma token'>,</span> <span class='rubyid_replace identifier id'>replace</span> <span class='assign token'>=</span> <span class='rubyid_false false kw'>false</span><span class='rparen token'>)</span>
|
914
|
+
<span class='rubyid_formats identifier id'>formats</span> <span class='assign token'>=</span> <span class='lbrace token'>{</span>
|
915
|
+
<span class='symbol val'>:ct_date</span> <span class='assign token'>=</span><span class='gt op'>></span> <span class='string val'>"%Y-%m-%d"</span><span class='comma token'>,</span>
|
916
|
+
<span class='symbol val'>:ct_time</span> <span class='assign token'>=</span><span class='gt op'>></span> <span class='string val'>"%H:%M:%S"</span><span class='comma token'>,</span>
|
917
|
+
<span class='symbol val'>:ct_date_time</span> <span class='assign token'>=</span><span class='gt op'>></span> <span class='string val'>"%F %T"</span><span class='comma token'>,</span>
|
918
|
+
<span class='symbol val'>:ct_iso_8601</span> <span class='assign token'>=</span><span class='gt op'>></span> <span class='string val'>"%FT%T%z"</span>
|
919
|
+
<span class='rbrace token'>}</span> <span class='rubyid_if if_mod kw'>if</span> <span class='rubyid_formats identifier id'>formats</span><span class='dot token'>.</span><span class='rubyid_blank? fid id'>blank?</span>
|
920
|
+
|
921
|
+
<span class='rubyid_if if kw'>if</span> <span class='rubyid_formats identifier id'>formats</span><span class='dot token'>.</span><span class='rubyid_is_a? fid id'>is_a?</span><span class='lparen token'>(</span><span class='colon3 op'>::</span><span class='rubyid_Hash constant id'>Hash</span><span class='rparen token'>)</span> <span class='rubyid_then then kw'>then</span>
|
922
|
+
<span class='rubyid_if if kw'>if</span> <span class='notop op'>!</span><span class='rubyid_replace identifier id'>replace</span> <span class='rubyid_then then kw'>then</span>
|
923
|
+
<span class='rubyid_@date_formats ivar id'>@date_formats</span> <span class='opasgn op'>||=</span> <span class='lbrace token'>{</span><span class='rbrace token'>}</span>
|
924
|
+
<span class='rubyid_@date_formats ivar id'>@date_formats</span><span class='dot token'>.</span><span class='rubyid_merge! fid id'>merge!</span><span class='lparen token'>(</span><span class='rubyid_formats identifier id'>formats</span><span class='rparen token'>)</span>
|
925
|
+
<span class='rubyid_else else kw'>else</span>
|
926
|
+
<span class='rubyid_@date_formats ivar id'>@date_formats</span> <span class='assign token'>=</span> <span class='rubyid_formats identifier id'>formats</span>
|
927
|
+
<span class='rubyid_end end kw'>end</span>
|
928
|
+
|
929
|
+
<span class='rubyid_@date_formats ivar id'>@date_formats</span><span class='dot token'>.</span><span class='rubyid_each_pair identifier id'>each_pair</span> <span class='rubyid_do do kw'>do</span> <span class='bitor op'>|</span><span class='rubyid_k identifier id'>k</span><span class='comma token'>,</span> <span class='rubyid_v identifier id'>v</span><span class='bitor op'>|</span> <span class='colon3 op'>::</span><span class='rubyid_Time constant id'>Time</span><span class='colon2 op'>::</span><span class='rubyid_DATE_FORMATS constant id'>DATE_FORMATS</span><span class='lbrack token'>[</span><span class='rubyid_k identifier id'>k</span><span class='rbrack token'>]</span> <span class='assign token'>=</span> <span class='rubyid_v identifier id'>v</span> <span class='rubyid_end end kw'>end</span>
|
930
|
+
<span class='rubyid_end end kw'>end</span>
|
931
|
+
|
932
|
+
<span class='rubyid_@date_formats ivar id'>@date_formats</span>
|
933
|
+
<span class='rubyid_end end kw'>end</span>
|
934
|
+
</pre>
|
927
935
|
</td>
|
928
936
|
</tr>
|
929
937
|
</table>
|
@@ -1071,19 +1079,20 @@
|
|
1071
1079
|
<td>
|
1072
1080
|
<pre class="code"><span class="info file"># File 'lib/lazier/settings.rb', line 104</span>
|
1073
1081
|
|
1074
|
-
<span class='kw'>def</span> <span class='
|
1075
|
-
<span class='
|
1076
|
-
<span class='
|
1077
|
-
<span class='
|
1078
|
-
<span class='
|
1079
|
-
|
1080
|
-
<span class='ivar'>@date_names</span> <span class='
|
1081
|
-
<span class='symbol'>:long_months</span> <span class='op'
|
1082
|
-
<span class='symbol'>:short_months</span> <span class='op'
|
1083
|
-
<span class='symbol'>:long_days</span> <span class='op'
|
1084
|
-
<span class='symbol'>:short_days</span> <span class='op'
|
1085
|
-
<span class='rbrace'>}</span>
|
1086
|
-
<span class='kw'>end</span
|
1082
|
+
<span class='rubyid_def def kw'>def</span> <span class='rubyid_setup_date_names identifier id'>setup_date_names</span><span class='lparen token'>(</span><span class='rubyid_long_months identifier id'>long_months</span> <span class='assign token'>=</span> <span class='rubyid_nil nil kw'>nil</span><span class='comma token'>,</span> <span class='rubyid_short_months identifier id'>short_months</span> <span class='assign token'>=</span> <span class='rubyid_nil nil kw'>nil</span><span class='comma token'>,</span> <span class='rubyid_long_days identifier id'>long_days</span> <span class='assign token'>=</span> <span class='rubyid_nil nil kw'>nil</span><span class='comma token'>,</span> <span class='rubyid_short_days identifier id'>short_days</span> <span class='assign token'>=</span> <span class='rubyid_nil nil kw'>nil</span><span class='rparen token'>)</span>
|
1083
|
+
<span class='rubyid_long_months identifier id'>long_months</span> <span class='assign token'>=</span> <span class='lbrack token'>[</span><span class='string val'>"January"</span><span class='comma token'>,</span> <span class='string val'>"February"</span><span class='comma token'>,</span> <span class='string val'>"March"</span><span class='comma token'>,</span> <span class='string val'>"April"</span><span class='comma token'>,</span> <span class='string val'>"May"</span><span class='comma token'>,</span> <span class='string val'>"June"</span><span class='comma token'>,</span> <span class='string val'>"July"</span><span class='comma token'>,</span> <span class='string val'>"August"</span><span class='comma token'>,</span> <span class='string val'>"September"</span><span class='comma token'>,</span> <span class='string val'>"October"</span><span class='comma token'>,</span> <span class='string val'>"November"</span><span class='comma token'>,</span> <span class='string val'>"December"</span><span class='rbrack token'>]</span> <span class='rubyid_if if_mod kw'>if</span> <span class='rubyid_long_months identifier id'>long_months</span><span class='dot token'>.</span><span class='rubyid_blank? fid id'>blank?</span>
|
1084
|
+
<span class='rubyid_short_months identifier id'>short_months</span> <span class='assign token'>=</span> <span class='lbrack token'>[</span><span class='string val'>"Jan"</span><span class='comma token'>,</span> <span class='string val'>"Feb"</span><span class='comma token'>,</span> <span class='string val'>"Mar"</span><span class='comma token'>,</span> <span class='string val'>"Apr"</span><span class='comma token'>,</span> <span class='string val'>"May"</span><span class='comma token'>,</span> <span class='string val'>"Jun"</span><span class='comma token'>,</span> <span class='string val'>"Jul"</span><span class='comma token'>,</span> <span class='string val'>"Aug"</span><span class='comma token'>,</span> <span class='string val'>"Sep"</span><span class='comma token'>,</span> <span class='string val'>"Oct"</span><span class='comma token'>,</span> <span class='string val'>"Nov"</span><span class='comma token'>,</span> <span class='string val'>"Dec"</span><span class='rbrack token'>]</span> <span class='rubyid_if if_mod kw'>if</span> <span class='rubyid_short_months identifier id'>short_months</span><span class='dot token'>.</span><span class='rubyid_blank? fid id'>blank?</span>
|
1085
|
+
<span class='rubyid_long_days identifier id'>long_days</span> <span class='assign token'>=</span> <span class='lbrack token'>[</span><span class='string val'>"Sunday"</span><span class='comma token'>,</span> <span class='string val'>"Monday"</span><span class='comma token'>,</span> <span class='string val'>"Tuesday"</span><span class='comma token'>,</span> <span class='string val'>"Wednesday"</span><span class='comma token'>,</span> <span class='string val'>"Thursday"</span><span class='comma token'>,</span> <span class='string val'>"Friday"</span><span class='comma token'>,</span> <span class='string val'>"Saturday"</span><span class='rbrack token'>]</span> <span class='rubyid_if if_mod kw'>if</span> <span class='rubyid_long_days identifier id'>long_days</span><span class='dot token'>.</span><span class='rubyid_blank? fid id'>blank?</span>
|
1086
|
+
<span class='rubyid_short_days identifier id'>short_days</span> <span class='assign token'>=</span> <span class='lbrack token'>[</span><span class='string val'>"Sun"</span><span class='comma token'>,</span> <span class='string val'>"Mon"</span><span class='comma token'>,</span> <span class='string val'>"Tue"</span><span class='comma token'>,</span> <span class='string val'>"Wed"</span><span class='comma token'>,</span> <span class='string val'>"Thu"</span><span class='comma token'>,</span> <span class='string val'>"Fri"</span><span class='comma token'>,</span> <span class='string val'>"Sat"</span><span class='rbrack token'>]</span> <span class='rubyid_if if_mod kw'>if</span> <span class='rubyid_short_days identifier id'>short_days</span><span class='dot token'>.</span><span class='rubyid_blank? fid id'>blank?</span>
|
1087
|
+
|
1088
|
+
<span class='rubyid_@date_names ivar id'>@date_names</span> <span class='assign token'>=</span> <span class='lbrace token'>{</span>
|
1089
|
+
<span class='symbol val'>:long_months</span> <span class='assign token'>=</span><span class='gt op'>></span> <span class='rubyid_long_months identifier id'>long_months</span><span class='comma token'>,</span>
|
1090
|
+
<span class='symbol val'>:short_months</span> <span class='assign token'>=</span><span class='gt op'>></span> <span class='rubyid_short_months identifier id'>short_months</span><span class='comma token'>,</span>
|
1091
|
+
<span class='symbol val'>:long_days</span> <span class='assign token'>=</span><span class='gt op'>></span> <span class='rubyid_long_days identifier id'>long_days</span><span class='comma token'>,</span>
|
1092
|
+
<span class='symbol val'>:short_days</span> <span class='assign token'>=</span><span class='gt op'>></span> <span class='rubyid_short_days identifier id'>short_days</span>
|
1093
|
+
<span class='rbrace token'>}</span>
|
1094
|
+
<span class='rubyid_end end kw'>end</span>
|
1095
|
+
</pre>
|
1087
1096
|
</td>
|
1088
1097
|
</tr>
|
1089
1098
|
</table>
|
@@ -1222,14 +1231,15 @@
|
|
1222
1231
|
<td>
|
1223
1232
|
<pre class="code"><span class="info file"># File 'lib/lazier/settings.rb', line 45</span>
|
1224
1233
|
|
1225
|
-
<span class='kw'>def</span> <span class='
|
1226
|
-
<span class='ivar'>@format_number</span> <span class='
|
1227
|
-
<span class='symbol'>:prec</span> <span class='op'
|
1228
|
-
<span class='symbol'>:decimal_separator</span> <span class='op'
|
1229
|
-
<span class='symbol'>:add_string</span> <span class='op'
|
1230
|
-
<span class='symbol'>:k_separator</span> <span class='op'
|
1231
|
-
<span class='rbrace'>}</span>
|
1232
|
-
<span class='kw'>end</span
|
1234
|
+
<span class='rubyid_def def kw'>def</span> <span class='rubyid_setup_format_number identifier id'>setup_format_number</span><span class='lparen token'>(</span><span class='rubyid_prec identifier id'>prec</span> <span class='assign token'>=</span> <span class='integer val'>2</span><span class='comma token'>,</span> <span class='rubyid_decimal_separator identifier id'>decimal_separator</span> <span class='assign token'>=</span> <span class='string val'>"."</span><span class='comma token'>,</span> <span class='rubyid_add_string identifier id'>add_string</span> <span class='assign token'>=</span> <span class='string val'>""</span><span class='comma token'>,</span> <span class='rubyid_k_separator identifier id'>k_separator</span> <span class='assign token'>=</span> <span class='string val'>","</span><span class='rparen token'>)</span>
|
1235
|
+
<span class='rubyid_@format_number ivar id'>@format_number</span> <span class='assign token'>=</span> <span class='lbrace token'>{</span>
|
1236
|
+
<span class='symbol val'>:prec</span> <span class='assign token'>=</span><span class='gt op'>></span> <span class='rubyid_prec identifier id'>prec</span><span class='comma token'>,</span>
|
1237
|
+
<span class='symbol val'>:decimal_separator</span> <span class='assign token'>=</span><span class='gt op'>></span> <span class='rubyid_decimal_separator identifier id'>decimal_separator</span><span class='comma token'>,</span>
|
1238
|
+
<span class='symbol val'>:add_string</span> <span class='assign token'>=</span><span class='gt op'>></span> <span class='rubyid_add_string identifier id'>add_string</span><span class='comma token'>,</span>
|
1239
|
+
<span class='symbol val'>:k_separator</span> <span class='assign token'>=</span><span class='gt op'>></span> <span class='rubyid_k_separator identifier id'>k_separator</span>
|
1240
|
+
<span class='rbrace token'>}</span>
|
1241
|
+
<span class='rubyid_end end kw'>end</span>
|
1242
|
+
</pre>
|
1233
1243
|
</td>
|
1234
1244
|
</tr>
|
1235
1245
|
</table>
|
@@ -1240,9 +1250,9 @@
|
|
1240
1250
|
</div>
|
1241
1251
|
|
1242
1252
|
<div id="footer">
|
1243
|
-
Generated on
|
1253
|
+
Generated on Wed Jan 16 10:02:59 2013 by
|
1244
1254
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
1245
|
-
0.8.2.1 (ruby-1.
|
1255
|
+
0.8.2.1 (ruby-1.8.7).
|
1246
1256
|
</div>
|
1247
1257
|
|
1248
1258
|
</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'># => "eoau"
|
233
|
-
</
|
231
|
+
<pre class="code ruby"><code><span class='string val'>"èòàù"</span><span class='dot token'>.</span><span class='rubyid_remove_accents identifier id'>remove_accents</span>
|
232
|
+
<span class='comment val'># => "eoau"</span>
|
233
|
+
</code></pre>
|
234
234
|
|
235
235
|
|
236
236
|
</div>
|
@@ -270,11 +270,12 @@
|
|
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='kw'>def</span> <span class='
|
274
|
-
<span class='
|
275
|
-
<span class='kw'>self</span><span class='
|
276
|
-
<span class='rbrace'>}</span>
|
277
|
-
<span class='kw'>end</span
|
273
|
+
<span class='rubyid_def def kw'>def</span> <span class='rubyid_remove_accents identifier id'>remove_accents</span>
|
274
|
+
<span class='rubyid_silence_warnings identifier id'>silence_warnings</span> <span class='lbrace token'>{</span>
|
275
|
+
<span class='rubyid_self self kw'>self</span><span class='dot token'>.</span><span class='rubyid_mb_chars identifier id'>mb_chars</span><span class='dot token'>.</span><span class='rubyid_normalize identifier id'>normalize</span><span class='lparen token'>(</span><span class='symbol val'>:kd</span><span class='rparen token'>)</span><span class='dot token'>.</span><span class='rubyid_gsub identifier id'>gsub</span><span class='lparen token'>(</span><span class='regexp val'>/[^\x00-\x7F]/n</span><span class='comma token'>,</span> <span class='string val'>""</span><span class='rparen token'>)</span><span class='dot token'>.</span><span class='rubyid_to_s identifier id'>to_s</span>
|
276
|
+
<span class='rbrace token'>}</span>
|
277
|
+
<span class='rubyid_end end kw'>end</span>
|
278
|
+
</pre>
|
278
279
|
</td>
|
279
280
|
</tr>
|
280
281
|
</table>
|
@@ -329,9 +330,10 @@
|
|
329
330
|
<td>
|
330
331
|
<pre class="code"><span class="info file"># File 'lib/lazier/string.rb', line 43</span>
|
331
332
|
|
332
|
-
<span class='kw'>def</span> <span class='
|
333
|
-
<span class='kw'>self</span><span class='
|
334
|
-
<span class='kw'>end</span
|
333
|
+
<span class='rubyid_def def kw'>def</span> <span class='rubyid_replace_ampersands identifier id'>replace_ampersands</span>
|
334
|
+
<span class='rubyid_self self kw'>self</span><span class='dot token'>.</span><span class='rubyid_gsub identifier id'>gsub</span><span class='lparen token'>(</span><span class='regexp val'>/&amp;(\S+);/</span><span class='comma token'>,</span> <span class='string val'>"&\\1;"</span><span class='rparen token'>)</span>
|
335
|
+
<span class='rubyid_end end kw'>end</span>
|
336
|
+
</pre>
|
335
337
|
</td>
|
336
338
|
</tr>
|
337
339
|
</table>
|
@@ -352,9 +354,9 @@
|
|
352
354
|
|
353
355
|
<p>The string is downcased and spaces are substituted with <code>-</code>.</p>
|
354
356
|
|
355
|
-
<pre class="code ruby"><code><span class='
|
356
|
-
<span class='comment'># => "abc-cde"
|
357
|
-
</
|
357
|
+
<pre class="code ruby"><code><span class='string val'>"ABC cde"</span><span class='dot token'>.</span><span class='rubyid_untitleize identifier id'>untitleize</span>
|
358
|
+
<span class='comment val'># => "abc-cde"</span>
|
359
|
+
</code></pre>
|
358
360
|
|
359
361
|
|
360
362
|
</div>
|
@@ -392,9 +394,10 @@
|
|
392
394
|
<td>
|
393
395
|
<pre class="code"><span class="info file"># File 'lib/lazier/string.rb', line 36</span>
|
394
396
|
|
395
|
-
<span class='kw'>def</span> <span class='
|
396
|
-
<span class='kw'>self</span><span class='
|
397
|
-
<span class='kw'>end</span
|
397
|
+
<span class='rubyid_def def kw'>def</span> <span class='rubyid_untitleize identifier id'>untitleize</span>
|
398
|
+
<span class='rubyid_self self kw'>self</span><span class='dot token'>.</span><span class='rubyid_downcase identifier id'>downcase</span><span class='dot token'>.</span><span class='rubyid_gsub identifier id'>gsub</span><span class='lparen token'>(</span><span class='string val'>" "</span><span class='comma token'>,</span> <span class='string val'>"-"</span><span class='rparen token'>)</span>
|
399
|
+
<span class='rubyid_end end kw'>end</span>
|
400
|
+
</pre>
|
398
401
|
</td>
|
399
402
|
</tr>
|
400
403
|
</table>
|
@@ -449,9 +452,10 @@
|
|
449
452
|
<td>
|
450
453
|
<pre class="code"><span class="info file"># File 'lib/lazier/string.rb', line 50</span>
|
451
454
|
|
452
|
-
<span class='kw'>def</span> <span class='
|
453
|
-
<span class='kw'>self</span>
|
454
|
-
<span class='kw'>end</span
|
455
|
+
<span class='rubyid_def def kw'>def</span> <span class='rubyid_value identifier id'>value</span>
|
456
|
+
<span class='rubyid_self self kw'>self</span>
|
457
|
+
<span class='rubyid_end end kw'>end</span>
|
458
|
+
</pre>
|
455
459
|
</td>
|
456
460
|
</tr>
|
457
461
|
</table>
|
@@ -462,9 +466,9 @@
|
|
462
466
|
</div>
|
463
467
|
|
464
468
|
<div id="footer">
|
465
|
-
Generated on
|
469
|
+
Generated on Wed Jan 16 10:02:56 2013 by
|
466
470
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
467
|
-
0.8.2.1 (ruby-1.
|
471
|
+
0.8.2.1 (ruby-1.8.7).
|
468
472
|
</div>
|
469
473
|
|
470
474
|
</body>
|
data/doc/Lazier/TimeZone.html
CHANGED
@@ -143,6 +143,29 @@
|
|
143
143
|
<span class="summary_desc"><div class='inline'><p>Returns a list of valid aliases (city names) for this timezone (basing on offset).</p>
|
144
144
|
</div></span>
|
145
145
|
|
146
|
+
</li>
|
147
|
+
|
148
|
+
|
149
|
+
<li class="public ">
|
150
|
+
<span class="summary_signature">
|
151
|
+
|
152
|
+
<a href="#current_alias-instance_method" title="#current_alias (instance method)">- (Object) <strong>current_alias</strong> </a>
|
153
|
+
|
154
|
+
|
155
|
+
|
156
|
+
</span>
|
157
|
+
|
158
|
+
|
159
|
+
|
160
|
+
|
161
|
+
|
162
|
+
|
163
|
+
|
164
|
+
|
165
|
+
|
166
|
+
<span class="summary_desc"><div class='inline'><p>Return the current alias for this timezone.</p>
|
167
|
+
</div></span>
|
168
|
+
|
146
169
|
</li>
|
147
170
|
|
148
171
|
|
@@ -500,30 +523,88 @@
|
|
500
523
|
<td>
|
501
524
|
<pre class="code"><span class="info file"># File 'lib/lazier/datetime.rb', line 388</span>
|
502
525
|
|
503
|
-
<span class='kw'>def</span> <span class='
|
504
|
-
<span class='
|
505
|
-
<span class='
|
506
|
-
|
507
|
-
|
508
|
-
<span class='kw'>if</span> <span class='ivar'>@aliases</span><span class='
|
509
|
-
<span class='comment'># First we search for aliases by name
|
510
|
-
|
511
|
-
|
512
|
-
<span class='kw'>self</span><span class='
|
513
|
-
<span class='kw'>if</span> <span class='
|
514
|
-
<span class='kw'>if</span> <span class='
|
515
|
-
<span class='ivar'>@aliases</span> <span class='op'><<</span> <span class='
|
516
|
-
<span class='kw'>else</span>
|
517
|
-
<span class='ivar'>@aliases</span> <span class='op'><<</span> <span class='
|
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='
|
523
|
-
<span class='kw'>end</span>
|
524
|
-
|
525
|
-
<span class='ivar'>@aliases</span>
|
526
|
-
<span class='kw'>end</span
|
526
|
+
<span class='rubyid_def def kw'>def</span> <span class='rubyid_aliases identifier id'>aliases</span><span class='lparen token'>(</span><span class='rubyid_dst_label identifier id'>dst_label</span> <span class='assign token'>=</span> <span class='rubyid_nil nil kw'>nil</span><span class='rparen token'>)</span>
|
527
|
+
<span class='rubyid_reference identifier id'>reference</span> <span class='assign token'>=</span> <span class='rubyid_self self kw'>self</span><span class='dot token'>.</span><span class='rubyid_name identifier id'>name</span>
|
528
|
+
<span class='rubyid_reference identifier id'>reference</span> <span class='assign token'>=</span> <span class='rubyid_self self kw'>self</span><span class='dot token'>.</span><span class='rubyid_class identifier id'>class</span><span class='colon2 op'>::</span><span class='rubyid_MAPPING constant id'>MAPPING</span><span class='lbrack token'>[</span><span class='rubyid_self self kw'>self</span><span class='dot token'>.</span><span class='rubyid_name identifier id'>name</span><span class='rbrack token'>]</span> <span class='rubyid_if if_mod kw'>if</span> <span class='rubyid_self self kw'>self</span><span class='dot token'>.</span><span class='rubyid_class identifier id'>class</span><span class='colon2 op'>::</span><span class='rubyid_MAPPING constant id'>MAPPING</span><span class='dot token'>.</span><span class='rubyid_has_key? fid id'>has_key?</span><span class='lparen token'>(</span><span class='rubyid_self self kw'>self</span><span class='dot token'>.</span><span class='rubyid_name identifier id'>name</span><span class='rparen token'>)</span> <span class='comment val'># We are an alias</span>
|
529
|
+
<span class='rubyid_reference identifier id'>reference</span> <span class='assign token'>=</span> <span class='rubyid_reference identifier id'>reference</span><span class='dot token'>.</span><span class='rubyid_gsub identifier id'>gsub</span><span class='lparen token'>(</span><span class='string val'>"_"</span><span class='comma token'>,</span> <span class='string val'>" "</span><span class='rparen token'>)</span>
|
530
|
+
|
531
|
+
<span class='rubyid_if if kw'>if</span> <span class='rubyid_@aliases ivar id'>@aliases</span><span class='dot token'>.</span><span class='rubyid_blank? fid id'>blank?</span> <span class='rubyid_then then kw'>then</span>
|
532
|
+
<span class='comment val'># First we search for aliases by name</span>
|
533
|
+
<span class='rubyid_@aliases ivar id'>@aliases</span> <span class='assign token'>=</span> <span class='lbrack token'>[</span><span class='rubyid_reference identifier id'>reference</span><span class='rbrack token'>]</span>
|
534
|
+
|
535
|
+
<span class='rubyid_self self kw'>self</span><span class='dot token'>.</span><span class='rubyid_class identifier id'>class</span><span class='colon2 op'>::</span><span class='rubyid_MAPPING constant id'>MAPPING</span><span class='dot token'>.</span><span class='rubyid_each identifier id'>each</span> <span class='rubyid_do do kw'>do</span> <span class='bitor op'>|</span><span class='rubyid_name identifier id'>name</span><span class='comma token'>,</span> <span class='rubyid_zone identifier id'>zone</span><span class='bitor op'>|</span>
|
536
|
+
<span class='rubyid_if if kw'>if</span> <span class='rubyid_zone identifier id'>zone</span><span class='dot token'>.</span><span class='rubyid_gsub identifier id'>gsub</span><span class='lparen token'>(</span><span class='string val'>"_"</span><span class='comma token'>,</span> <span class='string val'>" "</span><span class='rparen token'>)</span> <span class='eq op'>==</span> <span class='rubyid_reference identifier id'>reference</span> <span class='rubyid_then then kw'>then</span>
|
537
|
+
<span class='rubyid_if if kw'>if</span> <span class='rubyid_name identifier id'>name</span> <span class='eq op'>==</span> <span class='string val'>"International Date Line West"</span> <span class='orop op'>||</span> <span class='rubyid_name identifier id'>name</span> <span class='eq op'>==</span> <span class='string val'>"UTC"</span> <span class='orop op'>||</span> <span class='rubyid_name identifier id'>name</span><span class='dot token'>.</span><span class='rubyid_include? fid id'>include?</span><span class='lparen token'>(</span><span class='string val'>"(US & Canada)"</span><span class='rparen token'>)</span>
|
538
|
+
<span class='rubyid_@aliases ivar id'>@aliases</span> <span class='lshft op'><<</span> <span class='rubyid_name identifier id'>name</span>
|
539
|
+
<span class='rubyid_else else kw'>else</span>
|
540
|
+
<span class='rubyid_@aliases ivar id'>@aliases</span> <span class='lshft op'><<</span> <span class='rubyid_reference identifier id'>reference</span><span class='dot token'>.</span><span class='rubyid_gsub identifier id'>gsub</span><span class='lparen token'>(</span><span class='regexp val'>/\/.*/</span><span class='comma token'>,</span> <span class='string val'>"/"</span> <span class='plus op'>+</span> <span class='rubyid_name identifier id'>name</span><span class='rparen token'>)</span>
|
541
|
+
<span class='rubyid_end end kw'>end</span>
|
542
|
+
<span class='rubyid_end end kw'>end</span>
|
543
|
+
<span class='rubyid_end end kw'>end</span>
|
544
|
+
|
545
|
+
<span class='rubyid_@aliases ivar id'>@aliases</span> <span class='assign token'>=</span> <span class='rubyid_@aliases ivar id'>@aliases</span><span class='dot token'>.</span><span class='rubyid_uniq identifier id'>uniq</span><span class='dot token'>.</span><span class='rubyid_compact identifier id'>compact</span><span class='dot token'>.</span><span class='rubyid_sort identifier id'>sort</span>
|
546
|
+
<span class='rubyid_end end kw'>end</span>
|
547
|
+
|
548
|
+
<span class='rubyid_@aliases ivar id'>@aliases</span>
|
549
|
+
<span class='rubyid_end end kw'>end</span>
|
550
|
+
</pre>
|
551
|
+
</td>
|
552
|
+
</tr>
|
553
|
+
</table>
|
554
|
+
</div>
|
555
|
+
|
556
|
+
<div class="method_details ">
|
557
|
+
<h3 class="signature " id="current_alias-instance_method">
|
558
|
+
|
559
|
+
- (<tt><span class='object_link'><a href="Object.html" title="Lazier::Object (module)">Object</a></span></tt>) <strong>current_alias</strong>
|
560
|
+
|
561
|
+
|
562
|
+
|
563
|
+
|
564
|
+
|
565
|
+
</h3><div class="docstring">
|
566
|
+
<div class="discussion">
|
567
|
+
<p>Return the current alias for this timezone.</p>
|
568
|
+
|
569
|
+
|
570
|
+
</div>
|
571
|
+
</div>
|
572
|
+
<div class="tags">
|
573
|
+
|
574
|
+
|
575
|
+
</div><table class="source_code">
|
576
|
+
<tr>
|
577
|
+
<td>
|
578
|
+
<pre class="lines">
|
579
|
+
|
580
|
+
|
581
|
+
428
|
582
|
+
429
|
583
|
+
430
|
584
|
+
431
|
585
|
+
432
|
586
|
+
433
|
587
|
+
434
|
588
|
+
435
|
589
|
+
436
|
590
|
+
437
|
591
|
+
438</pre>
|
592
|
+
</td>
|
593
|
+
<td>
|
594
|
+
<pre class="code"><span class="info file"># File 'lib/lazier/datetime.rb', line 428</span>
|
595
|
+
|
596
|
+
<span class='rubyid_def def kw'>def</span> <span class='rubyid_current_alias identifier id'>current_alias</span>
|
597
|
+
<span class='rubyid_identifier identifier id'>identifier</span> <span class='assign token'>=</span> <span class='rubyid_self self kw'>self</span><span class='dot token'>.</span><span class='rubyid_tzinfo identifier id'>tzinfo</span><span class='dot token'>.</span><span class='rubyid_identifier identifier id'>identifier</span>
|
598
|
+
|
599
|
+
<span class='rubyid_catch identifier id'>catch</span><span class='lparen token'>(</span><span class='symbol val'>:alias</span><span class='rparen token'>)</span> <span class='rubyid_do do kw'>do</span>
|
600
|
+
<span class='rubyid_self self kw'>self</span><span class='dot token'>.</span><span class='rubyid_aliases identifier id'>aliases</span><span class='dot token'>.</span><span class='rubyid_each identifier id'>each</span> <span class='rubyid_do do kw'>do</span> <span class='bitor op'>|</span><span class='rubyid_a identifier id'>a</span><span class='bitor op'>|</span>
|
601
|
+
<span class='rubyid_throw identifier id'>throw</span><span class='lparen token'>(</span><span class='symbol val'>:alias</span><span class='comma token'>,</span> <span class='rubyid_a identifier id'>a</span><span class='rparen token'>)</span> <span class='rubyid_if if_mod kw'>if</span> <span class='rubyid_a identifier id'>a</span> <span class='eq op'>==</span> <span class='rubyid_identifier identifier id'>identifier</span>
|
602
|
+
<span class='rubyid_end end kw'>end</span>
|
603
|
+
|
604
|
+
<span class='rubyid_self self kw'>self</span><span class='dot token'>.</span><span class='rubyid_aliases identifier id'>aliases</span><span class='dot token'>.</span><span class='rubyid_first identifier id'>first</span>
|
605
|
+
<span class='rubyid_end end kw'>end</span>
|
606
|
+
<span class='rubyid_end end kw'>end</span>
|
607
|
+
</pre>
|
527
608
|
</td>
|
528
609
|
</tr>
|
529
610
|
</table>
|
@@ -621,14 +702,15 @@
|
|
621
702
|
<td>
|
622
703
|
<pre class="code"><span class="info file"># File 'lib/lazier/datetime.rb', line 418</span>
|
623
704
|
|
624
|
-
<span class='kw'>def</span> <span class='
|
625
|
-
<span class='
|
705
|
+
<span class='rubyid_def def kw'>def</span> <span class='rubyid_current_offset identifier id'>current_offset</span><span class='lparen token'>(</span><span class='rubyid_rational identifier id'>rational</span> <span class='assign token'>=</span> <span class='rubyid_false false kw'>false</span><span class='comma token'>,</span> <span class='rubyid_date identifier id'>date</span> <span class='assign token'>=</span> <span class='rubyid_nil nil kw'>nil</span><span class='rparen token'>)</span>
|
706
|
+
<span class='rubyid_date identifier id'>date</span> <span class='opasgn op'>||=</span> <span class='colon3 op'>::</span><span class='rubyid_DateTime constant id'>DateTime</span><span class='dot token'>.</span><span class='rubyid_now identifier id'>now</span>
|
626
707
|
|
627
|
-
<span class='
|
708
|
+
<span class='rubyid_dst_period identifier id'>dst_period</span> <span class='assign token'>=</span> <span class='rubyid_self self kw'>self</span><span class='dot token'>.</span><span class='rubyid_dst_period identifier id'>dst_period</span>
|
628
709
|
|
629
|
-
<span class='
|
630
|
-
<span class='
|
631
|
-
<span class='kw'>end</span
|
710
|
+
<span class='rubyid_rv identifier id'>rv</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_period_for_utc identifier id'>period_for_utc</span><span class='lparen token'>(</span><span class='rubyid_date identifier id'>date</span><span class='dot token'>.</span><span class='rubyid_utc identifier id'>utc</span><span class='rparen token'>)</span><span class='dot token'>.</span><span class='rubyid_dst? fid id'>dst?</span> <span class='integer val'>? </span><span class='rubyid_self self kw'>self</span><span class='dot token'>.</span><span class='rubyid_dst_offset identifier id'>dst_offset</span> <span class='colon op'>:</span> <span class='rubyid_self self kw'>self</span><span class='dot token'>.</span><span class='rubyid_offset identifier id'>offset</span><span class='rparen token'>)</span>
|
711
|
+
<span class='rubyid_rational identifier id'>rational</span> <span class='integer val'>? </span><span class='rubyid_self self kw'>self</span><span class='dot token'>.</span><span class='rubyid_class identifier id'>class</span><span class='dot token'>.</span><span class='rubyid_rationalize_offset identifier id'>rationalize_offset</span><span class='lparen token'>(</span><span class='rubyid_rv identifier id'>rv</span><span class='rparen token'>)</span> <span class='colon op'>:</span> <span class='rubyid_rv identifier id'>rv</span>
|
712
|
+
<span class='rubyid_end end kw'>end</span>
|
713
|
+
</pre>
|
632
714
|
</td>
|
633
715
|
</tr>
|
634
716
|
</table>
|
@@ -714,20 +796,21 @@
|
|
714
796
|
<pre class="lines">
|
715
797
|
|
716
798
|
|
717
|
-
|
718
|
-
|
719
|
-
|
720
|
-
|
721
|
-
|
799
|
+
481
|
800
|
+
482
|
801
|
+
483
|
802
|
+
484
|
803
|
+
485</pre>
|
722
804
|
</td>
|
723
805
|
<td>
|
724
|
-
<pre class="code"><span class="info file"># File 'lib/lazier/datetime.rb', line
|
725
|
-
|
726
|
-
<span class='kw'>def</span> <span class='
|
727
|
-
<span class='
|
728
|
-
<span class='
|
729
|
-
<span class='
|
730
|
-
<span class='kw'>end</span
|
806
|
+
<pre class="code"><span class="info file"># File 'lib/lazier/datetime.rb', line 481</span>
|
807
|
+
|
808
|
+
<span class='rubyid_def def kw'>def</span> <span class='rubyid_dst_correction identifier id'>dst_correction</span><span class='lparen token'>(</span><span class='rubyid_rational identifier id'>rational</span> <span class='assign token'>=</span> <span class='rubyid_false false kw'>false</span><span class='comma token'>,</span> <span class='rubyid_year identifier id'>year</span> <span class='assign token'>=</span> <span class='rubyid_nil nil kw'>nil</span><span class='rparen token'>)</span>
|
809
|
+
<span class='rubyid_period identifier id'>period</span> <span class='assign token'>=</span> <span class='rubyid_self self kw'>self</span><span class='dot token'>.</span><span class='rubyid_dst_period identifier id'>dst_period</span><span class='lparen token'>(</span><span class='rubyid_year identifier id'>year</span><span class='rparen token'>)</span>
|
810
|
+
<span class='rubyid_rv identifier id'>rv</span> <span class='assign token'>=</span> <span class='rubyid_period identifier id'>period</span> <span class='integer val'>? </span><span class='rubyid_period identifier id'>period</span><span class='dot token'>.</span><span class='rubyid_std_offset identifier id'>std_offset</span> <span class='colon op'>:</span> <span class='integer val'>0</span>
|
811
|
+
<span class='rubyid_rational identifier id'>rational</span> <span class='integer val'>? </span><span class='rubyid_self self kw'>self</span><span class='dot token'>.</span><span class='rubyid_class identifier id'>class</span><span class='dot token'>.</span><span class='rubyid_rationalize_offset identifier id'>rationalize_offset</span><span class='lparen token'>(</span><span class='rubyid_rv identifier id'>rv</span><span class='rparen token'>)</span> <span class='colon op'>:</span> <span class='rubyid_rv identifier id'>rv</span>
|
812
|
+
<span class='rubyid_end end kw'>end</span>
|
813
|
+
</pre>
|
731
814
|
</td>
|
732
815
|
</tr>
|
733
816
|
</table>
|
@@ -830,22 +913,23 @@
|
|
830
913
|
<pre class="lines">
|
831
914
|
|
832
915
|
|
833
|
-
|
834
|
-
|
835
|
-
|
836
|
-
|
837
|
-
|
838
|
-
|
916
|
+
504
|
917
|
+
505
|
918
|
+
506
|
919
|
+
507
|
920
|
+
508
|
921
|
+
509</pre>
|
839
922
|
</td>
|
840
923
|
<td>
|
841
|
-
<pre class="code"><span class="info file"># File 'lib/lazier/datetime.rb', line
|
924
|
+
<pre class="code"><span class="info file"># File 'lib/lazier/datetime.rb', line 504</span>
|
842
925
|
|
843
|
-
<span class='kw'>def</span> <span class='
|
844
|
-
<span class='
|
845
|
-
<span class='
|
926
|
+
<span class='rubyid_def def kw'>def</span> <span class='rubyid_dst_name identifier id'>dst_name</span><span class='lparen token'>(</span><span class='rubyid_dst_label identifier id'>dst_label</span> <span class='assign token'>=</span> <span class='rubyid_nil nil kw'>nil</span><span class='comma token'>,</span> <span class='rubyid_year identifier id'>year</span> <span class='assign token'>=</span> <span class='rubyid_nil nil kw'>nil</span><span class='comma token'>,</span> <span class='rubyid_name identifier id'>name</span> <span class='assign token'>=</span> <span class='rubyid_nil nil kw'>nil</span><span class='rparen token'>)</span>
|
927
|
+
<span class='rubyid_dst_label identifier id'>dst_label</span> <span class='opasgn op'>||=</span> <span class='string val'>"(DST)"</span>
|
928
|
+
<span class='rubyid_name identifier id'>name</span> <span class='opasgn op'>||=</span> <span class='rubyid_self self kw'>self</span><span class='dot token'>.</span><span class='rubyid_name identifier id'>name</span>
|
846
929
|
|
847
|
-
<span class='kw'>self</span><span class='
|
848
|
-
<span class='kw'>end</span
|
930
|
+
<span class='rubyid_self self kw'>self</span><span class='dot token'>.</span><span class='rubyid_uses_dst? fid id'>uses_dst?</span><span class='lparen token'>(</span><span class='rubyid_year identifier id'>year</span><span class='rparen token'>)</span> <span class='question op'>?</span> <span class='dstring node'>"#{name} #{dst_label}"</span> <span class='colon op'>:</span> <span class='rubyid_nil nil kw'>nil</span>
|
931
|
+
<span class='rubyid_end end kw'>end</span>
|
932
|
+
</pre>
|
849
933
|
</td>
|
850
934
|
</tr>
|
851
935
|
</table>
|
@@ -931,20 +1015,21 @@
|
|
931
1015
|
<pre class="lines">
|
932
1016
|
|
933
1017
|
|
934
|
-
|
935
|
-
|
936
|
-
|
937
|
-
|
938
|
-
|
1018
|
+
492
|
1019
|
+
493
|
1020
|
+
494
|
1021
|
+
495
|
1022
|
+
496</pre>
|
939
1023
|
</td>
|
940
1024
|
<td>
|
941
|
-
<pre class="code"><span class="info file"># File 'lib/lazier/datetime.rb', line
|
942
|
-
|
943
|
-
<span class='kw'>def</span> <span class='
|
944
|
-
<span class='
|
945
|
-
<span class='
|
946
|
-
<span class='
|
947
|
-
<span class='kw'>end</span
|
1025
|
+
<pre class="code"><span class="info file"># File 'lib/lazier/datetime.rb', line 492</span>
|
1026
|
+
|
1027
|
+
<span class='rubyid_def def kw'>def</span> <span class='rubyid_dst_offset identifier id'>dst_offset</span><span class='lparen token'>(</span><span class='rubyid_rational identifier id'>rational</span> <span class='assign token'>=</span> <span class='rubyid_false false kw'>false</span><span class='comma token'>,</span> <span class='rubyid_year identifier id'>year</span> <span class='assign token'>=</span> <span class='rubyid_nil nil kw'>nil</span><span class='rparen token'>)</span>
|
1028
|
+
<span class='rubyid_period identifier id'>period</span> <span class='assign token'>=</span> <span class='rubyid_self self kw'>self</span><span class='dot token'>.</span><span class='rubyid_dst_period identifier id'>dst_period</span><span class='lparen token'>(</span><span class='rubyid_year identifier id'>year</span><span class='rparen token'>)</span>
|
1029
|
+
<span class='rubyid_rv identifier id'>rv</span> <span class='assign token'>=</span> <span class='rubyid_period identifier id'>period</span> <span class='integer val'>? </span><span class='rubyid_period identifier id'>period</span><span class='dot token'>.</span><span class='rubyid_utc_total_offset identifier id'>utc_total_offset</span> <span class='colon op'>:</span> <span class='integer val'>0</span>
|
1030
|
+
<span class='rubyid_rational identifier id'>rational</span> <span class='integer val'>? </span><span class='rubyid_self self kw'>self</span><span class='dot token'>.</span><span class='rubyid_class identifier id'>class</span><span class='dot token'>.</span><span class='rubyid_rationalize_offset identifier id'>rationalize_offset</span><span class='lparen token'>(</span><span class='rubyid_rv identifier id'>rv</span><span class='rparen token'>)</span> <span class='colon op'>:</span> <span class='rubyid_rv identifier id'>rv</span>
|
1031
|
+
<span class='rubyid_end end kw'>end</span>
|
1032
|
+
</pre>
|
948
1033
|
</td>
|
949
1034
|
</tr>
|
950
1035
|
</table>
|
@@ -1013,30 +1098,31 @@
|
|
1013
1098
|
<pre class="lines">
|
1014
1099
|
|
1015
1100
|
|
1016
|
-
|
1017
|
-
|
1018
|
-
|
1019
|
-
|
1020
|
-
|
1021
|
-
|
1022
|
-
|
1023
|
-
|
1024
|
-
|
1025
|
-
|
1101
|
+
453
|
1102
|
+
454
|
1103
|
+
455
|
1104
|
+
456
|
1105
|
+
457
|
1106
|
+
458
|
1107
|
+
459
|
1108
|
+
460
|
1109
|
+
461
|
1110
|
+
462</pre>
|
1026
1111
|
</td>
|
1027
1112
|
<td>
|
1028
|
-
<pre class="code"><span class="info file"># File 'lib/lazier/datetime.rb', line
|
1029
|
-
|
1030
|
-
<span class='kw'>def</span> <span class='
|
1031
|
-
<span class='
|
1032
|
-
|
1033
|
-
<span class='
|
1034
|
-
|
1035
|
-
|
1036
|
-
<span class='
|
1037
|
-
<span class='
|
1038
|
-
<span class='
|
1039
|
-
<span class='kw'>end</span
|
1113
|
+
<pre class="code"><span class="info file"># File 'lib/lazier/datetime.rb', line 453</span>
|
1114
|
+
|
1115
|
+
<span class='rubyid_def def kw'>def</span> <span class='rubyid_dst_period identifier id'>dst_period</span><span class='lparen token'>(</span><span class='rubyid_year identifier id'>year</span> <span class='assign token'>=</span> <span class='rubyid_nil nil kw'>nil</span><span class='rparen token'>)</span>
|
1116
|
+
<span class='rubyid_year identifier id'>year</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>
|
1117
|
+
|
1118
|
+
<span class='rubyid_nothern_summer identifier id'>nothern_summer</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_civil identifier id'>civil</span><span class='lparen token'>(</span><span class='rubyid_year identifier id'>year</span><span class='comma token'>,</span> <span class='integer val'>7</span><span class='comma token'>,</span> <span class='integer val'>15</span><span class='rparen token'>)</span><span class='dot token'>.</span><span class='rubyid_utc identifier id'>utc</span> <span class='comment val'># This is a representation of a summer period in the Northern Hemisphere.</span>
|
1119
|
+
<span class='rubyid_southern_summer identifier id'>southern_summer</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_civil identifier id'>civil</span><span class='lparen token'>(</span><span class='rubyid_year identifier id'>year</span><span class='comma token'>,</span> <span class='integer val'>1</span><span class='comma token'>,</span> <span class='integer val'>15</span><span class='rparen token'>)</span><span class='dot token'>.</span><span class='rubyid_utc identifier id'>utc</span> <span class='comment val'># This is a representation of a summer period in the Northern Hemisphere.</span>
|
1120
|
+
|
1121
|
+
<span class='rubyid_period identifier id'>period</span> <span class='assign token'>=</span> <span class='rubyid_self self kw'>self</span><span class='dot token'>.</span><span class='rubyid_period_for_utc identifier id'>period_for_utc</span><span class='lparen token'>(</span><span class='rubyid_nothern_summer identifier id'>nothern_summer</span><span class='rparen token'>)</span>
|
1122
|
+
<span class='rubyid_period identifier id'>period</span> <span class='assign token'>=</span> <span class='rubyid_self self kw'>self</span><span class='dot token'>.</span><span class='rubyid_period_for_utc identifier id'>period_for_utc</span><span class='lparen token'>(</span><span class='rubyid_southern_summer identifier id'>southern_summer</span><span class='rparen token'>)</span> <span class='rubyid_if if_mod kw'>if</span> <span class='notop op'>!</span><span class='rubyid_period identifier id'>period</span><span class='dot token'>.</span><span class='rubyid_dst? fid id'>dst?</span>
|
1123
|
+
<span class='rubyid_period identifier id'>period</span><span class='dot token'>.</span><span class='rubyid_dst? fid id'>dst?</span> <span class='integer val'>? </span><span class='rubyid_period identifier id'>period</span> <span class='colon op'>:</span> <span class='rubyid_nil nil kw'>nil</span>
|
1124
|
+
<span class='rubyid_end end kw'>end</span>
|
1125
|
+
</pre>
|
1040
1126
|
</td>
|
1041
1127
|
</tr>
|
1042
1128
|
</table>
|
@@ -1105,18 +1191,19 @@
|
|
1105
1191
|
<pre class="lines">
|
1106
1192
|
|
1107
1193
|
|
1108
|
-
|
1109
|
-
|
1110
|
-
|
1111
|
-
|
1194
|
+
444
|
1195
|
+
445
|
1196
|
+
446
|
1197
|
+
447</pre>
|
1112
1198
|
</td>
|
1113
1199
|
<td>
|
1114
|
-
<pre class="code"><span class="info file"># File 'lib/lazier/datetime.rb', line
|
1200
|
+
<pre class="code"><span class="info file"># File 'lib/lazier/datetime.rb', line 444</span>
|
1115
1201
|
|
1116
|
-
<span class='kw'>def</span> <span class='
|
1117
|
-
<span class='
|
1118
|
-
<span class='
|
1119
|
-
<span class='kw'>end</span
|
1202
|
+
<span class='rubyid_def def kw'>def</span> <span class='rubyid_offset identifier id'>offset</span><span class='lparen token'>(</span><span class='rubyid_rational identifier id'>rational</span> <span class='assign token'>=</span> <span class='rubyid_false false kw'>false</span><span class='rparen token'>)</span>
|
1203
|
+
<span class='rubyid_rv identifier id'>rv</span> <span class='assign token'>=</span> <span class='rubyid_self self kw'>self</span><span class='dot token'>.</span><span class='rubyid_utc_offset identifier id'>utc_offset</span>
|
1204
|
+
<span class='rubyid_rational identifier id'>rational</span> <span class='integer val'>? </span><span class='rubyid_self self kw'>self</span><span class='dot token'>.</span><span class='rubyid_class identifier id'>class</span><span class='dot token'>.</span><span class='rubyid_rationalize_offset identifier id'>rationalize_offset</span><span class='lparen token'>(</span><span class='rubyid_rv identifier id'>rv</span><span class='rparen token'>)</span> <span class='colon op'>:</span> <span class='rubyid_rv identifier id'>rv</span>
|
1205
|
+
<span class='rubyid_end end kw'>end</span>
|
1206
|
+
</pre>
|
1120
1207
|
</td>
|
1121
1208
|
</tr>
|
1122
1209
|
</table>
|
@@ -1202,18 +1289,19 @@
|
|
1202
1289
|
<pre class="lines">
|
1203
1290
|
|
1204
1291
|
|
1205
|
-
|
1206
|
-
|
1207
|
-
|
1208
|
-
|
1292
|
+
516
|
1293
|
+
517
|
1294
|
+
518
|
1295
|
+
519</pre>
|
1209
1296
|
</td>
|
1210
1297
|
<td>
|
1211
|
-
<pre class="code"><span class="info file"># File 'lib/lazier/datetime.rb', line
|
1298
|
+
<pre class="code"><span class="info file"># File 'lib/lazier/datetime.rb', line 516</span>
|
1212
1299
|
|
1213
|
-
<span class='kw'>def</span> <span class='
|
1214
|
-
<span class='
|
1215
|
-
<span class='
|
1216
|
-
<span class='kw'>end</span
|
1300
|
+
<span class='rubyid_def def kw'>def</span> <span class='rubyid_to_str identifier id'>to_str</span><span class='lparen token'>(</span><span class='rubyid_name identifier id'>name</span> <span class='assign token'>=</span> <span class='rubyid_nil nil kw'>nil</span><span class='comma token'>,</span> <span class='rubyid_colon identifier id'>colon</span> <span class='assign token'>=</span> <span class='rubyid_true true kw'>true</span><span class='rparen token'>)</span>
|
1301
|
+
<span class='rubyid_name identifier id'>name</span> <span class='opasgn op'>||=</span> <span class='rubyid_self self kw'>self</span><span class='dot token'>.</span><span class='rubyid_current_alias identifier id'>current_alias</span>
|
1302
|
+
<span class='dstring node'>"(GMT#{self.formatted_offset(colon)}) #{name}"</span>
|
1303
|
+
<span class='rubyid_end end kw'>end</span>
|
1304
|
+
</pre>
|
1217
1305
|
</td>
|
1218
1306
|
</tr>
|
1219
1307
|
</table>
|
@@ -1299,16 +1387,17 @@
|
|
1299
1387
|
<pre class="lines">
|
1300
1388
|
|
1301
1389
|
|
1302
|
-
|
1303
|
-
|
1304
|
-
|
1390
|
+
545
|
1391
|
+
546
|
1392
|
+
547</pre>
|
1305
1393
|
</td>
|
1306
1394
|
<td>
|
1307
|
-
<pre class="code"><span class="info file"># File 'lib/lazier/datetime.rb', line
|
1395
|
+
<pre class="code"><span class="info file"># File 'lib/lazier/datetime.rb', line 545</span>
|
1308
1396
|
|
1309
|
-
<span class='kw'>def</span> <span class='
|
1310
|
-
<span class='op'>::</span><span class='
|
1311
|
-
<span class='kw'>end</span
|
1397
|
+
<span class='rubyid_def def kw'>def</span> <span class='rubyid_to_str_parameterized identifier id'>to_str_parameterized</span><span class='lparen token'>(</span><span class='rubyid_with_offset identifier id'>with_offset</span> <span class='assign token'>=</span> <span class='rubyid_true true kw'>true</span><span class='comma token'>,</span> <span class='rubyid_name identifier id'>name</span> <span class='assign token'>=</span> <span class='rubyid_nil nil kw'>nil</span><span class='rparen token'>)</span>
|
1398
|
+
<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_parameterize_zone identifier id'>parameterize_zone</span><span class='lparen token'>(</span><span class='rubyid_name identifier id'>name</span> <span class='orop op'>||</span> <span class='rubyid_self self kw'>self</span><span class='dot token'>.</span><span class='rubyid_to_str identifier id'>to_str</span><span class='comma token'>,</span> <span class='rubyid_with_offset identifier id'>with_offset</span><span class='rparen token'>)</span>
|
1399
|
+
<span class='rubyid_end end kw'>end</span>
|
1400
|
+
</pre>
|
1312
1401
|
</td>
|
1313
1402
|
</tr>
|
1314
1403
|
</table>
|
@@ -1411,34 +1500,35 @@
|
|
1411
1500
|
<pre class="lines">
|
1412
1501
|
|
1413
1502
|
|
1414
|
-
|
1415
|
-
|
1416
|
-
|
1417
|
-
|
1418
|
-
|
1419
|
-
|
1420
|
-
|
1421
|
-
|
1422
|
-
|
1423
|
-
|
1424
|
-
|
1425
|
-
|
1503
|
+
527
|
1504
|
+
528
|
1505
|
+
529
|
1506
|
+
530
|
1507
|
+
531
|
1508
|
+
532
|
1509
|
+
533
|
1510
|
+
534
|
1511
|
+
535
|
1512
|
+
536
|
1513
|
+
537
|
1514
|
+
538</pre>
|
1426
1515
|
</td>
|
1427
1516
|
<td>
|
1428
|
-
<pre class="code"><span class="info file"># File 'lib/lazier/datetime.rb', line
|
1429
|
-
|
1430
|
-
<span class='kw'>def</span> <span class='
|
1431
|
-
<span class='
|
1432
|
-
<span class='
|
1433
|
-
|
1434
|
-
<span class='kw'>if</span> <span class='kw'>self</span><span class='
|
1435
|
-
<span class='
|
1436
|
-
<span class='
|
1437
|
-
<span class='
|
1438
|
-
<span class='kw'>else</span>
|
1439
|
-
<span class='kw'>nil</span>
|
1440
|
-
<span class='kw'>end</span>
|
1441
|
-
<span class='kw'>end</span
|
1517
|
+
<pre class="code"><span class="info file"># File 'lib/lazier/datetime.rb', line 527</span>
|
1518
|
+
|
1519
|
+
<span class='rubyid_def def kw'>def</span> <span class='rubyid_to_str_with_dst identifier id'>to_str_with_dst</span><span class='lparen token'>(</span><span class='rubyid_dst_label identifier id'>dst_label</span> <span class='assign token'>=</span> <span class='rubyid_nil nil kw'>nil</span><span class='comma token'>,</span> <span class='rubyid_year identifier id'>year</span> <span class='assign token'>=</span> <span class='rubyid_nil nil kw'>nil</span><span class='comma token'>,</span> <span class='rubyid_name identifier id'>name</span> <span class='assign token'>=</span> <span class='rubyid_nil nil kw'>nil</span><span class='rparen token'>)</span>
|
1520
|
+
<span class='rubyid_dst_label identifier id'>dst_label</span> <span class='opasgn op'>||=</span> <span class='string val'>"(DST)"</span>
|
1521
|
+
<span class='rubyid_name identifier id'>name</span> <span class='opasgn op'>||=</span> <span class='rubyid_self self kw'>self</span><span class='dot token'>.</span><span class='rubyid_current_alias identifier id'>current_alias</span>
|
1522
|
+
|
1523
|
+
<span class='rubyid_if if kw'>if</span> <span class='rubyid_self self kw'>self</span><span class='dot token'>.</span><span class='rubyid_uses_dst? fid id'>uses_dst?</span><span class='lparen token'>(</span><span class='rubyid_year identifier id'>year</span><span class='rparen token'>)</span> <span class='rubyid_then then kw'>then</span>
|
1524
|
+
<span class='rubyid_period identifier id'>period</span> <span class='assign token'>=</span> <span class='rubyid_self self kw'>self</span><span class='dot token'>.</span><span class='rubyid_dst_period identifier id'>dst_period</span><span class='lparen token'>(</span><span class='rubyid_year identifier id'>year</span><span class='rparen token'>)</span>
|
1525
|
+
<span class='rubyid_offset identifier id'>offset</span> <span class='assign token'>=</span> <span class='rubyid_self self kw'>self</span><span class='dot token'>.</span><span class='rubyid_class identifier id'>class</span><span class='dot token'>.</span><span class='rubyid_seconds_to_utc_offset identifier id'>seconds_to_utc_offset</span><span class='lparen token'>(</span><span class='rubyid_period identifier id'>period</span><span class='dot token'>.</span><span class='rubyid_utc_total_offset identifier id'>utc_total_offset</span><span class='rparen token'>)</span>
|
1526
|
+
<span class='dstring node'>"(GMT#{offset}) #{name} #{dst_label}"</span>
|
1527
|
+
<span class='rubyid_else else kw'>else</span>
|
1528
|
+
<span class='rubyid_nil nil kw'>nil</span>
|
1529
|
+
<span class='rubyid_end end kw'>end</span>
|
1530
|
+
<span class='rubyid_end end kw'>end</span>
|
1531
|
+
</pre>
|
1442
1532
|
</td>
|
1443
1533
|
</tr>
|
1444
1534
|
</table>
|
@@ -1558,18 +1648,19 @@
|
|
1558
1648
|
<pre class="lines">
|
1559
1649
|
|
1560
1650
|
|
1561
|
-
|
1562
|
-
|
1563
|
-
|
1564
|
-
|
1651
|
+
556
|
1652
|
+
557
|
1653
|
+
558
|
1654
|
+
559</pre>
|
1565
1655
|
</td>
|
1566
1656
|
<td>
|
1567
|
-
<pre class="code"><span class="info file"># File 'lib/lazier/datetime.rb', line
|
1657
|
+
<pre class="code"><span class="info file"># File 'lib/lazier/datetime.rb', line 556</span>
|
1568
1658
|
|
1569
|
-
<span class='kw'>def</span> <span class='
|
1570
|
-
<span class='
|
1571
|
-
<span class='
|
1572
|
-
<span class='kw'>end</span
|
1659
|
+
<span class='rubyid_def def kw'>def</span> <span class='rubyid_to_str_with_dst_parameterized identifier id'>to_str_with_dst_parameterized</span><span class='lparen token'>(</span><span class='rubyid_dst_label identifier id'>dst_label</span> <span class='assign token'>=</span> <span class='rubyid_nil nil kw'>nil</span><span class='comma token'>,</span> <span class='rubyid_with_offset identifier id'>with_offset</span> <span class='assign token'>=</span> <span class='rubyid_true true kw'>true</span><span class='comma token'>,</span> <span class='rubyid_year identifier id'>year</span> <span class='assign token'>=</span> <span class='rubyid_nil nil kw'>nil</span><span class='comma token'>,</span> <span class='rubyid_name identifier id'>name</span> <span class='assign token'>=</span> <span class='rubyid_nil nil kw'>nil</span><span class='rparen token'>)</span>
|
1660
|
+
<span class='rubyid_rv identifier id'>rv</span> <span class='assign token'>=</span> <span class='rubyid_self self kw'>self</span><span class='dot token'>.</span><span class='rubyid_to_str_with_dst identifier id'>to_str_with_dst</span><span class='lparen token'>(</span><span class='rubyid_dst_label identifier id'>dst_label</span><span class='comma token'>,</span> <span class='rubyid_year identifier id'>year</span><span class='comma token'>,</span> <span class='rubyid_name identifier id'>name</span><span class='rparen token'>)</span>
|
1661
|
+
<span class='rubyid_rv identifier id'>rv</span> <span class='integer val'>? </span><span class='colon2 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_parameterize_zone identifier id'>parameterize_zone</span><span class='lparen token'>(</span><span class='rubyid_rv identifier id'>rv</span><span class='rparen token'>)</span> <span class='colon op'>:</span> <span class='rubyid_nil nil kw'>nil</span>
|
1662
|
+
<span class='rubyid_end end kw'>end</span>
|
1663
|
+
</pre>
|
1573
1664
|
</td>
|
1574
1665
|
</tr>
|
1575
1666
|
</table>
|
@@ -1638,24 +1729,25 @@
|
|
1638
1729
|
<pre class="lines">
|
1639
1730
|
|
1640
1731
|
|
1641
|
-
|
1642
|
-
|
1643
|
-
|
1644
|
-
|
1645
|
-
|
1646
|
-
|
1647
|
-
|
1732
|
+
468
|
1733
|
+
469
|
1734
|
+
470
|
1735
|
+
471
|
1736
|
+
472
|
1737
|
+
473
|
1738
|
+
474</pre>
|
1648
1739
|
</td>
|
1649
1740
|
<td>
|
1650
|
-
<pre class="code"><span class="info file"># File 'lib/lazier/datetime.rb', line
|
1651
|
-
|
1652
|
-
<span class='kw'>def</span> <span class='
|
1653
|
-
<span class='kw'>if</span> <span class='
|
1654
|
-
|
1655
|
-
<span class='kw'>else</span>
|
1656
|
-
<span class='kw'>self</span><span class='
|
1657
|
-
<span class='kw'>end</span>
|
1658
|
-
<span class='kw'>end</span
|
1741
|
+
<pre class="code"><span class="info file"># File 'lib/lazier/datetime.rb', line 468</span>
|
1742
|
+
|
1743
|
+
<span class='rubyid_def def kw'>def</span> <span class='rubyid_uses_dst? fid id'>uses_dst?</span><span class='lparen token'>(</span><span class='rubyid_reference identifier id'>reference</span> <span class='assign token'>=</span> <span class='rubyid_nil nil kw'>nil</span><span class='rparen token'>)</span>
|
1744
|
+
<span class='rubyid_if if kw'>if</span> <span class='rubyid_reference identifier id'>reference</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'>:year</span><span class='rparen token'>)</span> <span class='andop op'>&&</span> <span class='rubyid_reference identifier id'>reference</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='rubyid_then then kw'>then</span> <span class='comment val'># This is a date like object</span>
|
1745
|
+
<span class='rubyid_self self kw'>self</span><span class='dot token'>.</span><span class='rubyid_dst_period identifier id'>dst_period</span><span class='lparen token'>(</span><span class='rubyid_reference identifier id'>reference</span><span class='dot token'>.</span><span class='rubyid_year identifier id'>year</span><span class='rparen token'>)</span><span class='dot token'>.</span><span class='rubyid_present? fid id'>present?</span> <span class='andop op'>&&</span> <span class='rubyid_self self kw'>self</span><span class='dot token'>.</span><span class='rubyid_period_for_utc identifier id'>period_for_utc</span><span class='lparen token'>(</span><span class='rubyid_reference identifier id'>reference</span><span class='dot token'>.</span><span class='rubyid_utc identifier id'>utc</span><span class='rparen token'>)</span><span class='dot token'>.</span><span class='rubyid_dst? fid id'>dst?</span>
|
1746
|
+
<span class='rubyid_else else kw'>else</span>
|
1747
|
+
<span class='rubyid_self self kw'>self</span><span class='dot token'>.</span><span class='rubyid_dst_period identifier id'>dst_period</span><span class='lparen token'>(</span><span class='rubyid_reference identifier id'>reference</span><span class='rparen token'>)</span><span class='dot token'>.</span><span class='rubyid_present? fid id'>present?</span>
|
1748
|
+
<span class='rubyid_end end kw'>end</span>
|
1749
|
+
<span class='rubyid_end end kw'>end</span>
|
1750
|
+
</pre>
|
1659
1751
|
</td>
|
1660
1752
|
</tr>
|
1661
1753
|
</table>
|
@@ -1666,9 +1758,9 @@
|
|
1666
1758
|
</div>
|
1667
1759
|
|
1668
1760
|
<div id="footer">
|
1669
|
-
Generated on
|
1761
|
+
Generated on Wed Jan 16 10:02:58 2013 by
|
1670
1762
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
1671
|
-
0.8.2.1 (ruby-1.
|
1763
|
+
0.8.2.1 (ruby-1.8.7).
|
1672
1764
|
</div>
|
1673
1765
|
|
1674
1766
|
</body>
|