lazier 2.4.0 → 2.5.0
Sign up to get free protection for your applications and to get access to all the features.
- data/doc/Lazier.html +22 -34
- data/doc/Lazier/Boolean.html +1 -1
- data/doc/Lazier/DateTime.html +28 -34
- data/doc/Lazier/DateTime/ClassMethods.html +17 -13
- data/doc/Lazier/Exceptions.html +1 -1
- data/doc/Lazier/Exceptions/Dump.html +1 -1
- data/doc/Lazier/Hash.html +1 -1
- data/doc/Lazier/I18n.html +20 -10
- data/doc/Lazier/Math.html +1 -1
- data/doc/Lazier/Math/ClassMethods.html +1 -1
- data/doc/Lazier/Object.html +1 -1
- data/doc/Lazier/Pathname.html +1 -1
- data/doc/Lazier/Settings.html +1 -1
- data/doc/Lazier/String.html +1 -1
- data/doc/Lazier/TimeZone.html +96 -110
- data/doc/Lazier/TimeZone/ClassMethods.html +65 -69
- data/doc/Lazier/Version.html +3 -3
- data/doc/_index.html +1 -1
- data/doc/file.README.html +1 -1
- data/doc/index.html +1 -1
- data/doc/top-level-namespace.html +1 -1
- data/lib/lazier.rb +4 -10
- data/lib/lazier/datetime.rb +68 -37
- data/lib/lazier/i18n.rb +1 -0
- data/lib/lazier/version.rb +1 -1
- metadata +2 -2
data/doc/Lazier/String.html
CHANGED
@@ -462,7 +462,7 @@
|
|
462
462
|
</div>
|
463
463
|
|
464
464
|
<div id="footer">
|
465
|
-
Generated on
|
465
|
+
Generated on Thu Jan 31 20:15:55 2013 by
|
466
466
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
467
467
|
0.8.3 (ruby-1.9.3).
|
468
468
|
</div>
|
data/doc/Lazier/TimeZone.html
CHANGED
@@ -474,31 +474,17 @@
|
|
474
474
|
<pre class="lines">
|
475
475
|
|
476
476
|
|
477
|
-
|
478
|
-
|
479
|
-
|
480
|
-
|
481
|
-
392
|
482
|
-
393
|
483
|
-
394
|
484
|
-
395
|
485
|
-
396
|
486
|
-
397
|
487
|
-
398</pre>
|
477
|
+
411
|
478
|
+
412
|
479
|
+
413
|
480
|
+
414</pre>
|
488
481
|
</td>
|
489
482
|
<td>
|
490
|
-
<pre class="code"><span class="info file"># File 'lib/lazier/datetime.rb', line
|
483
|
+
<pre class="code"><span class="info file"># File 'lib/lazier/datetime.rb', line 411</span>
|
491
484
|
|
492
485
|
<span class='kw'>def</span> <span class='id identifier rubyid_aliases'>aliases</span>
|
493
486
|
<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='period'>.</span><span class='id identifier rubyid_fetch'>fetch</span><span class='lparen'>(</span><span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_name'>name</span><span class='comma'>,</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_name'>name</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='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>
|
494
|
-
|
495
|
-
<span class='ivar'>@aliases</span> <span class='op'>||=</span> <span class='lparen'>(</span><span class='lbracket'>[</span><span class='id identifier rubyid_reference'>reference</span><span class='rbracket'>]</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='period'>.</span><span class='id identifier rubyid_collect'>collect</span> <span class='lbrace'>{</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>
|
496
|
-
<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>
|
497
|
-
<span class='lparen'>(</span><span class='lbracket'>[</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='comma'>,</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>UTC</span><span class='tstring_end'>"</span></span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_include?'>include?</span><span class='lparen'>(</span><span class='id identifier rubyid_name'>name</span><span class='rparen'>)</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><span class='rparen'>)</span> <span class='op'>?</span> <span class='id identifier rubyid_name'>name</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='embexpr_beg'>#{</span><span class='id identifier rubyid_name'>name</span><span class='rbrace'>}</span><span class='tstring_end'>"</span></span><span class='rparen'>)</span>
|
498
|
-
<span class='kw'>else</span>
|
499
|
-
<span class='kw'>nil</span>
|
500
|
-
<span class='kw'>end</span>
|
501
|
-
<span class='rbrace'>}</span><span class='rparen'>)</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>
|
487
|
+
<span class='ivar'>@aliases</span> <span class='op'>||=</span> <span class='lparen'>(</span><span class='lbracket'>[</span><span class='id identifier rubyid_reference'>reference</span><span class='rbracket'>]</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='period'>.</span><span class='id identifier rubyid_collect'>collect</span> <span class='lbrace'>{</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> <span class='id identifier rubyid_format_alias'>format_alias</span><span class='lparen'>(</span><span class='id identifier rubyid_name'>name</span><span class='comma'>,</span> <span class='id identifier rubyid_zone'>zone</span><span class='comma'>,</span> <span class='id identifier rubyid_reference'>reference</span><span class='rparen'>)</span> <span class='rbrace'>}</span><span class='rparen'>)</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>
|
502
488
|
<span class='kw'>end</span></pre>
|
503
489
|
</td>
|
504
490
|
</tr>
|
@@ -530,20 +516,20 @@
|
|
530
516
|
<pre class="lines">
|
531
517
|
|
532
518
|
|
533
|
-
|
534
|
-
|
535
|
-
|
536
|
-
|
537
|
-
|
538
|
-
|
539
|
-
|
540
|
-
|
541
|
-
|
542
|
-
|
543
|
-
|
519
|
+
431
|
520
|
+
432
|
521
|
+
433
|
522
|
+
434
|
523
|
+
435
|
524
|
+
436
|
525
|
+
437
|
526
|
+
438
|
527
|
+
439
|
528
|
+
440
|
529
|
+
441</pre>
|
544
530
|
</td>
|
545
531
|
<td>
|
546
|
-
<pre class="code"><span class="info file"># File 'lib/lazier/datetime.rb', line
|
532
|
+
<pre class="code"><span class="info file"># File 'lib/lazier/datetime.rb', line 431</span>
|
547
533
|
|
548
534
|
<span class='kw'>def</span> <span class='id identifier rubyid_current_alias'>current_alias</span>
|
549
535
|
<span class='id identifier rubyid_identifier'>identifier</span> <span class='op'>=</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_tzinfo'>tzinfo</span><span class='period'>.</span><span class='id identifier rubyid_identifier'>identifier</span>
|
@@ -641,17 +627,17 @@
|
|
641
627
|
<pre class="lines">
|
642
628
|
|
643
629
|
|
644
|
-
|
645
|
-
|
646
|
-
|
647
|
-
|
648
|
-
|
649
|
-
|
650
|
-
|
651
|
-
|
630
|
+
421
|
631
|
+
422
|
632
|
+
423
|
633
|
+
424
|
634
|
+
425
|
635
|
+
426
|
636
|
+
427
|
637
|
+
428</pre>
|
652
638
|
</td>
|
653
639
|
<td>
|
654
|
-
<pre class="code"><span class="info file"># File 'lib/lazier/datetime.rb', line
|
640
|
+
<pre class="code"><span class="info file"># File 'lib/lazier/datetime.rb', line 421</span>
|
655
641
|
|
656
642
|
<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>
|
657
643
|
<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>
|
@@ -746,12 +732,12 @@
|
|
746
732
|
<pre class="lines">
|
747
733
|
|
748
734
|
|
749
|
-
|
750
|
-
|
751
|
-
|
735
|
+
484
|
736
|
+
485
|
737
|
+
486</pre>
|
752
738
|
</td>
|
753
739
|
<td>
|
754
|
-
<pre class="code"><span class="info file"># File 'lib/lazier/datetime.rb', line
|
740
|
+
<pre class="code"><span class="info file"># File 'lib/lazier/datetime.rb', line 484</span>
|
755
741
|
|
756
742
|
<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>
|
757
743
|
<span class='kw'>self</span><span class='period'>.</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='comma'>,</span> <span class='id identifier rubyid_year'>year</span><span class='comma'>,</span> <span class='symbol'>:std_offset</span><span class='rparen'>)</span>
|
@@ -858,15 +844,15 @@
|
|
858
844
|
<pre class="lines">
|
859
845
|
|
860
846
|
|
861
|
-
|
862
|
-
|
863
|
-
|
864
|
-
|
865
|
-
|
866
|
-
|
847
|
+
506
|
848
|
+
507
|
849
|
+
508
|
850
|
+
509
|
851
|
+
510
|
852
|
+
511</pre>
|
867
853
|
</td>
|
868
854
|
<td>
|
869
|
-
<pre class="code"><span class="info file"># File 'lib/lazier/datetime.rb', line
|
855
|
+
<pre class="code"><span class="info file"># File 'lib/lazier/datetime.rb', line 506</span>
|
870
856
|
|
871
857
|
<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>
|
872
858
|
<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>
|
@@ -976,14 +962,14 @@
|
|
976
962
|
<pre class="lines">
|
977
963
|
|
978
964
|
|
979
|
-
|
980
|
-
|
981
|
-
|
982
|
-
|
983
|
-
|
965
|
+
494
|
966
|
+
495
|
967
|
+
496
|
968
|
+
497
|
969
|
+
498</pre>
|
984
970
|
</td>
|
985
971
|
<td>
|
986
|
-
<pre class="code"><span class="info file"># File 'lib/lazier/datetime.rb', line
|
972
|
+
<pre class="code"><span class="info file"># File 'lib/lazier/datetime.rb', line 494</span>
|
987
973
|
|
988
974
|
<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='comma'>,</span> <span class='id identifier rubyid_method'>method</span> <span class='op'>=</span> <span class='symbol'>:utc_total_offset</span><span class='rparen'>)</span>
|
989
975
|
<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>
|
@@ -1058,19 +1044,19 @@
|
|
1058
1044
|
<pre class="lines">
|
1059
1045
|
|
1060
1046
|
|
1061
|
-
|
1062
|
-
|
1063
|
-
|
1064
|
-
|
1065
|
-
|
1066
|
-
|
1067
|
-
|
1068
|
-
|
1069
|
-
|
1070
|
-
|
1047
|
+
456
|
1048
|
+
457
|
1049
|
+
458
|
1050
|
+
459
|
1051
|
+
460
|
1052
|
+
461
|
1053
|
+
462
|
1054
|
+
463
|
1055
|
+
464
|
1056
|
+
465</pre>
|
1071
1057
|
</td>
|
1072
1058
|
<td>
|
1073
|
-
<pre class="code"><span class="info file"># File 'lib/lazier/datetime.rb', line
|
1059
|
+
<pre class="code"><span class="info file"># File 'lib/lazier/datetime.rb', line 456</span>
|
1074
1060
|
|
1075
1061
|
<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>
|
1076
1062
|
<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>
|
@@ -1150,13 +1136,13 @@
|
|
1150
1136
|
<pre class="lines">
|
1151
1137
|
|
1152
1138
|
|
1153
|
-
|
1154
|
-
|
1155
|
-
|
1156
|
-
|
1139
|
+
447
|
1140
|
+
448
|
1141
|
+
449
|
1142
|
+
450</pre>
|
1157
1143
|
</td>
|
1158
1144
|
<td>
|
1159
|
-
<pre class="code"><span class="info file"># File 'lib/lazier/datetime.rb', line
|
1145
|
+
<pre class="code"><span class="info file"># File 'lib/lazier/datetime.rb', line 447</span>
|
1160
1146
|
|
1161
1147
|
<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>
|
1162
1148
|
<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>
|
@@ -1247,13 +1233,13 @@
|
|
1247
1233
|
<pre class="lines">
|
1248
1234
|
|
1249
1235
|
|
1250
|
-
|
1251
|
-
|
1252
|
-
|
1253
|
-
|
1236
|
+
518
|
1237
|
+
519
|
1238
|
+
520
|
1239
|
+
521</pre>
|
1254
1240
|
</td>
|
1255
1241
|
<td>
|
1256
|
-
<pre class="code"><span class="info file"># File 'lib/lazier/datetime.rb', line
|
1242
|
+
<pre class="code"><span class="info file"># File 'lib/lazier/datetime.rb', line 518</span>
|
1257
1243
|
|
1258
1244
|
<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>
|
1259
1245
|
<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_current_alias'>current_alias</span>
|
@@ -1344,12 +1330,12 @@
|
|
1344
1330
|
<pre class="lines">
|
1345
1331
|
|
1346
1332
|
|
1347
|
-
|
1348
|
-
|
1349
|
-
|
1333
|
+
547
|
1334
|
+
548
|
1335
|
+
549</pre>
|
1350
1336
|
</td>
|
1351
1337
|
<td>
|
1352
|
-
<pre class="code"><span class="info file"># File 'lib/lazier/datetime.rb', line
|
1338
|
+
<pre class="code"><span class="info file"># File 'lib/lazier/datetime.rb', line 547</span>
|
1353
1339
|
|
1354
1340
|
<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>
|
1355
1341
|
<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>
|
@@ -1456,21 +1442,21 @@
|
|
1456
1442
|
<pre class="lines">
|
1457
1443
|
|
1458
1444
|
|
1459
|
-
|
1460
|
-
|
1461
|
-
|
1462
|
-
|
1463
|
-
|
1464
|
-
|
1465
|
-
|
1466
|
-
|
1467
|
-
|
1468
|
-
|
1469
|
-
|
1470
|
-
|
1445
|
+
529
|
1446
|
+
530
|
1447
|
+
531
|
1448
|
+
532
|
1449
|
+
533
|
1450
|
+
534
|
1451
|
+
535
|
1452
|
+
536
|
1453
|
+
537
|
1454
|
+
538
|
1455
|
+
539
|
1456
|
+
540</pre>
|
1471
1457
|
</td>
|
1472
1458
|
<td>
|
1473
|
-
<pre class="code"><span class="info file"># File 'lib/lazier/datetime.rb', line
|
1459
|
+
<pre class="code"><span class="info file"># File 'lib/lazier/datetime.rb', line 529</span>
|
1474
1460
|
|
1475
1461
|
<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>
|
1476
1462
|
<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>
|
@@ -1603,13 +1589,13 @@
|
|
1603
1589
|
<pre class="lines">
|
1604
1590
|
|
1605
1591
|
|
1606
|
-
|
1607
|
-
|
1608
|
-
|
1609
|
-
|
1592
|
+
558
|
1593
|
+
559
|
1594
|
+
560
|
1595
|
+
561</pre>
|
1610
1596
|
</td>
|
1611
1597
|
<td>
|
1612
|
-
<pre class="code"><span class="info file"># File 'lib/lazier/datetime.rb', line
|
1598
|
+
<pre class="code"><span class="info file"># File 'lib/lazier/datetime.rb', line 558</span>
|
1613
1599
|
|
1614
1600
|
<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>
|
1615
1601
|
<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>
|
@@ -1683,16 +1669,16 @@
|
|
1683
1669
|
<pre class="lines">
|
1684
1670
|
|
1685
1671
|
|
1686
|
-
|
1687
|
-
|
1688
|
-
|
1689
|
-
|
1690
|
-
|
1691
|
-
|
1692
|
-
|
1672
|
+
471
|
1673
|
+
472
|
1674
|
+
473
|
1675
|
+
474
|
1676
|
+
475
|
1677
|
+
476
|
1678
|
+
477</pre>
|
1693
1679
|
</td>
|
1694
1680
|
<td>
|
1695
|
-
<pre class="code"><span class="info file"># File 'lib/lazier/datetime.rb', line
|
1681
|
+
<pre class="code"><span class="info file"># File 'lib/lazier/datetime.rb', line 471</span>
|
1696
1682
|
|
1697
1683
|
<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>
|
1698
1684
|
<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
|
@@ -1711,7 +1697,7 @@
|
|
1711
1697
|
</div>
|
1712
1698
|
|
1713
1699
|
<div id="footer">
|
1714
|
-
Generated on
|
1700
|
+
Generated on Thu Jan 31 20:15:56 2013 by
|
1715
1701
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
1716
1702
|
0.8.3 (ruby-1.9.3).
|
1717
1703
|
</div>
|
@@ -355,14 +355,14 @@
|
|
355
355
|
<pre class="lines">
|
356
356
|
|
357
357
|
|
358
|
-
|
359
|
-
|
360
|
-
|
361
|
-
|
362
|
-
|
358
|
+
391
|
359
|
+
392
|
360
|
+
393
|
361
|
+
394
|
362
|
+
395</pre>
|
363
363
|
</td>
|
364
364
|
<td>
|
365
|
-
<pre class="code"><span class="info file"># File 'lib/lazier/datetime.rb', line
|
365
|
+
<pre class="code"><span class="info file"># File 'lib/lazier/datetime.rb', line 391</span>
|
366
366
|
|
367
367
|
<span class='kw'>def</span> <span class='id identifier rubyid_compare'>compare</span><span class='lparen'>(</span><span class='id identifier rubyid_left'>left</span><span class='comma'>,</span> <span class='id identifier rubyid_right'>right</span><span class='rparen'>)</span>
|
368
368
|
<span class='id identifier rubyid_left'>left</span> <span class='op'>=</span> <span class='id identifier rubyid_left'>left</span><span class='period'>.</span><span class='id identifier rubyid_to_str'>to_str</span> <span class='kw'>if</span> <span class='id identifier rubyid_left'>left</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'>ActiveSupport</span><span class='op'>::</span><span class='const'>TimeZone</span><span class='rparen'>)</span>
|
@@ -452,20 +452,20 @@
|
|
452
452
|
<pre class="lines">
|
453
453
|
|
454
454
|
|
455
|
-
|
456
|
-
|
457
|
-
|
458
|
-
|
459
|
-
|
460
|
-
|
461
|
-
|
462
|
-
|
463
|
-
|
464
|
-
|
465
|
-
|
455
|
+
315
|
456
|
+
316
|
457
|
+
317
|
458
|
+
318
|
459
|
+
319
|
460
|
+
320
|
461
|
+
321
|
462
|
+
322
|
463
|
+
323
|
464
|
+
324
|
465
|
+
325</pre>
|
466
466
|
</td>
|
467
467
|
<td>
|
468
|
-
<pre class="code"><span class="info file"># File 'lib/lazier/datetime.rb', line
|
468
|
+
<pre class="code"><span class="info file"># File 'lib/lazier/datetime.rb', line 315</span>
|
469
469
|
|
470
470
|
<span class='kw'>def</span> <span class='id identifier rubyid_find'>find</span><span class='lparen'>(</span><span class='id identifier rubyid_name'>name</span><span class='comma'>,</span> <span class='id identifier rubyid_dst_label'>dst_label</span> <span class='op'>=</span> <span class='kw'>nil</span><span class='rparen'>)</span>
|
471
471
|
<span class='id identifier rubyid_catch'>catch</span><span class='lparen'>(</span><span class='symbol'>:zone</span><span class='rparen'>)</span> <span class='kw'>do</span>
|
@@ -561,13 +561,13 @@
|
|
561
561
|
<pre class="lines">
|
562
562
|
|
563
563
|
|
564
|
-
|
565
|
-
|
566
|
-
|
567
|
-
|
564
|
+
305
|
565
|
+
306
|
566
|
+
307
|
567
|
+
308</pre>
|
568
568
|
</td>
|
569
569
|
<td>
|
570
|
-
<pre class="code"><span class="info file"># File 'lib/lazier/datetime.rb', line
|
570
|
+
<pre class="code"><span class="info file"># File 'lib/lazier/datetime.rb', line 305</span>
|
571
571
|
|
572
572
|
<span class='kw'>def</span> <span class='id identifier rubyid_format_offset'>format_offset</span><span class='lparen'>(</span><span class='id identifier rubyid_offset'>offset</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>
|
573
573
|
<span class='id identifier rubyid_offset'>offset</span> <span class='op'>=</span> <span class='lparen'>(</span><span class='id identifier rubyid_offset'>offset</span> <span class='op'>*</span> <span class='int'>86400</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_to_i'>to_i</span> <span class='kw'>if</span> <span class='id identifier rubyid_offset'>offset</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'>Rational</span><span class='rparen'>)</span>
|
@@ -658,27 +658,23 @@
|
|
658
658
|
<pre class="lines">
|
659
659
|
|
660
660
|
|
661
|
-
|
662
|
-
|
663
|
-
|
664
|
-
|
665
|
-
|
666
|
-
|
667
|
-
|
668
|
-
|
669
|
-
326
|
670
|
-
327</pre>
|
661
|
+
332
|
662
|
+
333
|
663
|
+
334
|
664
|
+
335
|
665
|
+
336
|
666
|
+
337
|
667
|
+
338
|
668
|
+
339</pre>
|
671
669
|
</td>
|
672
670
|
<td>
|
673
|
-
<pre class="code"><span class="info file"># File 'lib/lazier/datetime.rb', line
|
671
|
+
<pre class="code"><span class="info file"># File 'lib/lazier/datetime.rb', line 332</span>
|
674
672
|
|
675
673
|
<span class='kw'>def</span> <span class='id identifier rubyid_list_all'>list_all</span><span class='lparen'>(</span><span class='id identifier rubyid_with_dst'>with_dst</span> <span class='op'>=</span> <span class='kw'>true</span><span class='comma'>,</span> <span class='id identifier rubyid_dst_label'>dst_label</span> <span class='op'>=</span> <span class='kw'>nil</span><span class='rparen'>)</span>
|
676
674
|
<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>
|
677
675
|
|
678
676
|
<span class='ivar'>@zones_names</span> <span class='op'>||=</span> <span class='lbrace'>{</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>STANDARD</span><span class='tstring_end'>"</span></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_all'>all</span><span class='period'>.</span><span class='id identifier rubyid_collect'>collect</span><span class='lparen'>(</span><span class='op'>&</span><span class='symbol'>:to_s</span><span class='rparen'>)</span> <span class='rbrace'>}</span>
|
679
|
-
<span class='ivar'>@zones_names</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>DST[</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_dst_label'>dst_label</span><span class='rbrace'>}</span><span class='tstring_content'>]-STANDARD</span><span class='tstring_end'>"</span></span><span class='rbracket'>]</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_all'>all</span><span class='period'>.</span><span class='id identifier rubyid_collect'>collect</span> <span class='lbrace'>{</span> <span class='op'>|</span><span class='id identifier rubyid_zone'>zone</span><span class='op'>|</span>
|
680
|
-
<span class='id identifier rubyid_zone'>zone</span><span class='period'>.</span><span class='id identifier rubyid_aliases'>aliases</span><span class='period'>.</span><span class='id identifier rubyid_collect'>collect</span> <span class='lbrace'>{</span> <span class='op'>|</span><span class='id identifier rubyid_zone_alias'>zone_alias</span><span class='op'>|</span> <span class='lbracket'>[</span><span class='id identifier rubyid_zone'>zone</span><span class='period'>.</span><span class='id identifier rubyid_to_str'>to_str</span><span class='lparen'>(</span><span class='id identifier rubyid_zone_alias'>zone_alias</span><span class='rparen'>)</span><span class='comma'>,</span> <span class='lparen'>(</span><span class='id identifier rubyid_zone'>zone</span><span class='period'>.</span><span class='id identifier rubyid_uses_dst?'>uses_dst?</span> <span class='op'>&&</span> <span class='id identifier rubyid_zone_alias'>zone_alias</span> <span class='op'>!~</span> <span class='tstring'><span class='regexp_beg'>/</span><span class='tstring_content'>(</span><span class='embexpr_beg'>#{</span><span class='const'>Regexp</span><span class='period'>.</span><span class='id identifier rubyid_quote'>quote</span><span class='lparen'>(</span><span class='id identifier rubyid_dst_label'>dst_label</span><span class='rparen'>)</span><span class='rbrace'>}</span><span class='tstring_content'>)$</span><span class='regexp_end'>/</span></span><span class='rparen'>)</span> <span class='op'>?</span> <span class='id identifier rubyid_zone'>zone</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='kw'>nil</span><span class='comma'>,</span> <span class='id identifier rubyid_zone_alias'>zone_alias</span><span class='rparen'>)</span> <span class='op'>:</span> <span class='kw'>nil</span><span class='rbracket'>]</span> <span class='rbrace'>}</span>
|
681
|
-
<span class='rbrace'>}</span><span class='period'>.</span><span class='id identifier rubyid_flatten'>flatten</span><span class='period'>.</span><span class='id identifier rubyid_compact'>compact</span><span class='period'>.</span><span class='id identifier rubyid_uniq'>uniq</span><span class='period'>.</span><span class='id identifier rubyid_sort'>sort</span> <span class='lbrace'>{</span> <span class='op'>|</span><span class='id identifier rubyid_a'>a</span><span class='comma'>,</span><span class='id identifier rubyid_b'>b</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_compare'>compare</span><span class='lparen'>(</span><span class='id identifier rubyid_a'>a</span><span class='comma'>,</span> <span class='id identifier rubyid_b'>b</span><span class='rparen'>)</span> <span class='rbrace'>}</span> <span class='comment'># Sort by name
|
677
|
+
<span class='ivar'>@zones_names</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>DST[</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_dst_label'>dst_label</span><span class='rbrace'>}</span><span class='tstring_content'>]-STANDARD</span><span class='tstring_end'>"</span></span><span class='rbracket'>]</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_all'>all</span><span class='period'>.</span><span class='id identifier rubyid_collect'>collect</span> <span class='lbrace'>{</span> <span class='op'>|</span><span class='id identifier rubyid_zone'>zone</span><span class='op'>|</span> <span class='id identifier rubyid_fetch_aliases'>fetch_aliases</span><span class='lparen'>(</span><span class='id identifier rubyid_zone'>zone</span><span class='comma'>,</span> <span class='id identifier rubyid_dst_label'>dst_label</span><span class='rparen'>)</span> <span class='rbrace'>}</span><span class='period'>.</span><span class='id identifier rubyid_flatten'>flatten</span><span class='period'>.</span><span class='id identifier rubyid_compact'>compact</span><span class='period'>.</span><span class='id identifier rubyid_uniq'>uniq</span><span class='period'>.</span><span class='id identifier rubyid_sort'>sort</span> <span class='lbrace'>{</span> <span class='op'>|</span><span class='id identifier rubyid_a'>a</span><span class='comma'>,</span><span class='id identifier rubyid_b'>b</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_compare'>compare</span><span class='lparen'>(</span><span class='id identifier rubyid_a'>a</span><span class='comma'>,</span> <span class='id identifier rubyid_b'>b</span><span class='rparen'>)</span> <span class='rbrace'>}</span> <span class='comment'># Sort by name
|
682
678
|
</span>
|
683
679
|
<span class='ivar'>@zones_names</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>"</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_with_dst'>with_dst</span> <span class='op'>?</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>DST[</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_dst_label'>dst_label</span><span class='rbrace'>}</span><span class='tstring_content'>]-</span><span class='tstring_end'>"</span></span> <span class='op'>:</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_end'>"</span></span><span class='rbrace'>}</span><span class='tstring_content'>STANDARD</span><span class='tstring_end'>"</span></span><span class='rbracket'>]</span>
|
684
680
|
<span class='kw'>end</span></pre>
|
@@ -769,20 +765,20 @@
|
|
769
765
|
<pre class="lines">
|
770
766
|
|
771
767
|
|
772
|
-
|
773
|
-
|
774
|
-
|
775
|
-
|
776
|
-
|
777
|
-
|
778
|
-
|
779
|
-
|
780
|
-
|
781
|
-
|
782
|
-
|
768
|
+
350
|
769
|
+
351
|
770
|
+
352
|
771
|
+
353
|
772
|
+
354
|
773
|
+
355
|
774
|
+
356
|
775
|
+
357
|
776
|
+
358
|
777
|
+
359
|
778
|
+
360</pre>
|
783
779
|
</td>
|
784
780
|
<td>
|
785
|
-
<pre class="code"><span class="info file"># File 'lib/lazier/datetime.rb', line
|
781
|
+
<pre class="code"><span class="info file"># File 'lib/lazier/datetime.rb', line 350</span>
|
786
782
|
|
787
783
|
<span class='kw'>def</span> <span class='id identifier rubyid_parameterize_zone'>parameterize_zone</span><span class='lparen'>(</span><span class='id identifier rubyid_tz'>tz</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='rparen'>)</span>
|
788
784
|
<span class='id identifier rubyid_tz'>tz</span> <span class='op'>=</span> <span class='id identifier rubyid_tz'>tz</span><span class='period'>.</span><span class='id identifier rubyid_to_s'>to_s</span> <span class='kw'>if</span> <span class='op'>!</span><span class='id identifier rubyid_tz'>tz</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'>String</span><span class='rparen'>)</span>
|
@@ -861,13 +857,13 @@
|
|
861
857
|
<pre class="lines">
|
862
858
|
|
863
859
|
|
864
|
-
|
865
|
-
|
866
|
-
|
867
|
-
|
860
|
+
295
|
861
|
+
296
|
862
|
+
297
|
863
|
+
298</pre>
|
868
864
|
</td>
|
869
865
|
<td>
|
870
|
-
<pre class="code"><span class="info file"># File 'lib/lazier/datetime.rb', line
|
866
|
+
<pre class="code"><span class="info file"># File 'lib/lazier/datetime.rb', line 295</span>
|
871
867
|
|
872
868
|
<span class='kw'>def</span> <span class='id identifier rubyid_rationalize_offset'>rationalize_offset</span><span class='lparen'>(</span><span class='id identifier rubyid_offset'>offset</span><span class='rparen'>)</span>
|
873
869
|
<span class='id identifier rubyid_offset'>offset</span> <span class='op'>=</span> <span class='id identifier rubyid_offset'>offset</span><span class='period'>.</span><span class='id identifier rubyid_try'>try</span><span class='lparen'>(</span><span class='symbol'>:offset</span><span class='rparen'>)</span> <span class='kw'>if</span> <span class='op'>!</span><span class='id identifier rubyid_offset'>offset</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'>Fixnum</span><span class='rparen'>)</span>
|
@@ -980,25 +976,25 @@
|
|
980
976
|
<pre class="lines">
|
981
977
|
|
982
978
|
|
983
|
-
357
|
984
|
-
358
|
985
|
-
359
|
986
|
-
360
|
987
|
-
361
|
988
|
-
362
|
989
|
-
363
|
990
|
-
364
|
991
|
-
365
|
992
|
-
366
|
993
|
-
367
|
994
|
-
368
|
995
979
|
369
|
996
980
|
370
|
997
981
|
371
|
998
|
-
372
|
982
|
+
372
|
983
|
+
373
|
984
|
+
374
|
985
|
+
375
|
986
|
+
376
|
987
|
+
377
|
988
|
+
378
|
989
|
+
379
|
990
|
+
380
|
991
|
+
381
|
992
|
+
382
|
993
|
+
383
|
994
|
+
384</pre>
|
999
995
|
</td>
|
1000
996
|
<td>
|
1001
|
-
<pre class="code"><span class="info file"># File 'lib/lazier/datetime.rb', line
|
997
|
+
<pre class="code"><span class="info file"># File 'lib/lazier/datetime.rb', line 369</span>
|
1002
998
|
|
1003
999
|
<span class='kw'>def</span> <span class='id identifier rubyid_unparameterize_zone'>unparameterize_zone</span><span class='lparen'>(</span><span class='id identifier rubyid_tz'>tz</span><span class='comma'>,</span> <span class='id identifier rubyid_as_string'>as_string</span> <span class='op'>=</span> <span class='kw'>false</span><span class='comma'>,</span> <span class='id identifier rubyid_dst_label'>dst_label</span> <span class='op'>=</span> <span class='kw'>nil</span><span class='rparen'>)</span>
|
1004
1000
|
<span class='id identifier rubyid_tz'>tz</span> <span class='op'>=</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_parameterize_zone'>parameterize_zone</span><span class='lparen'>(</span><span class='id identifier rubyid_tz'>tz</span><span class='comma'>,</span> <span class='kw'>false</span><span class='rparen'>)</span>
|
@@ -1026,7 +1022,7 @@
|
|
1026
1022
|
</div>
|
1027
1023
|
|
1028
1024
|
<div id="footer">
|
1029
|
-
Generated on
|
1025
|
+
Generated on Thu Jan 31 20:15:56 2013 by
|
1030
1026
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
1031
1027
|
0.8.3 (ruby-1.9.3).
|
1032
1028
|
</div>
|