lazier 1.0.3 → 1.0.4
Sign up to get free protection for your applications and to get access to all the features.
- data/doc/Lazier.html +86 -83
- 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 +102 -90
- 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 +5 -5
- data/doc/index.html +5 -5
- data/doc/top-level-namespace.html +2 -2
- data/lib/lazier/version.rb +1 -1
- data/spec/{cowtech-extensions → lazier}/boolean_spec.rb +0 -0
- data/spec/{cowtech-extensions → lazier}/datetime_spec.rb +0 -0
- data/spec/{cowtech-extensions → lazier}/hash_spec.rb +0 -0
- data/spec/{cowtech-extensions → lazier}/math_spec.rb +0 -0
- data/spec/{cowtech-extensions → lazier}/object_spec.rb +0 -0
- data/spec/{cowtech-extensions → lazier}/pathname_spec.rb +0 -0
- data/spec/{cowtech-extensions → lazier}/settings_spec.rb +0 -0
- data/spec/{cowtech-extensions → lazier}/string_spec.rb +0 -0
- metadata +20 -20
@@ -364,11 +364,12 @@
|
|
364
364
|
<td>
|
365
365
|
<pre class="code"><span class="info file"># File 'lib/lazier/datetime.rb', line 377</span>
|
366
366
|
|
367
|
-
<span class='kw'>def</span> <span class='
|
368
|
-
<span class='
|
369
|
-
<span class='
|
370
|
-
<span class='
|
371
|
-
<span class='kw'>end</span
|
367
|
+
<span class='rubyid_def def kw'>def</span> <span class='rubyid_compare identifier id'>compare</span><span class='lparen token'>(</span><span class='rubyid_left identifier id'>left</span><span class='comma token'>,</span> <span class='rubyid_right identifier id'>right</span><span class='rparen token'>)</span>
|
368
|
+
<span class='rubyid_left identifier id'>left</span> <span class='assign token'>=</span> <span class='rubyid_left identifier id'>left</span><span class='dot token'>.</span><span class='rubyid_to_str identifier id'>to_str</span> <span class='rubyid_if if_mod kw'>if</span> <span class='rubyid_left identifier id'>left</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_ActiveSupport constant id'>ActiveSupport</span><span class='colon2 op'>::</span><span class='rubyid_TimeZone constant id'>TimeZone</span><span class='rparen token'>)</span>
|
369
|
+
<span class='rubyid_right identifier id'>right</span> <span class='assign token'>=</span> <span class='rubyid_right identifier id'>right</span><span class='dot token'>.</span><span class='rubyid_to_str identifier id'>to_str</span> <span class='rubyid_if if_mod kw'>if</span> <span class='rubyid_right identifier id'>right</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_ActiveSupport constant id'>ActiveSupport</span><span class='colon2 op'>::</span><span class='rubyid_TimeZone constant id'>TimeZone</span><span class='rparen token'>)</span>
|
370
|
+
<span class='rubyid_left identifier id'>left</span><span class='dot token'>.</span><span class='rubyid_ensure_string identifier id'>ensure_string</span><span class='dot token'>.</span><span class='rubyid_split identifier id'>split</span><span class='lparen token'>(</span><span class='string val'>" "</span><span class='comma token'>,</span> <span class='integer val'>2</span><span class='rparen token'>)</span><span class='lbrack token'>[</span><span class='integer val'>1</span><span class='rbrack token'>]</span> <span class='cmp op'><=></span> <span class='rubyid_right identifier id'>right</span><span class='dot token'>.</span><span class='rubyid_ensure_string identifier id'>ensure_string</span><span class='dot token'>.</span><span class='rubyid_split identifier id'>split</span><span class='lparen token'>(</span><span class='string val'>" "</span><span class='comma token'>,</span> <span class='integer val'>2</span><span class='rparen token'>)</span><span class='lbrack token'>[</span><span class='integer val'>1</span><span class='rbrack token'>]</span>
|
371
|
+
<span class='rubyid_end end kw'>end</span>
|
372
|
+
</pre>
|
372
373
|
</td>
|
373
374
|
</tr>
|
374
375
|
</table>
|
@@ -467,17 +468,18 @@
|
|
467
468
|
<td>
|
468
469
|
<pre class="code"><span class="info file"># File 'lib/lazier/datetime.rb', line 289</span>
|
469
470
|
|
470
|
-
<span class='kw'>def</span> <span class='
|
471
|
-
<span class='
|
472
|
-
<span class='op'>::</span><span class='
|
473
|
-
<span class='
|
474
|
-
<span class='
|
475
|
-
<span class='kw'>end</span>
|
476
|
-
<span class='kw'>end</span>
|
477
|
-
|
478
|
-
<span class='kw'>nil</span>
|
479
|
-
<span class='kw'>end</span>
|
480
|
-
<span class='kw'>end</span
|
471
|
+
<span class='rubyid_def def kw'>def</span> <span class='rubyid_find identifier id'>find</span><span class='lparen token'>(</span><span class='rubyid_name identifier id'>name</span><span class='comma 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>
|
472
|
+
<span class='rubyid_catch identifier id'>catch</span><span class='lparen token'>(</span><span class='symbol val'>:zone</span><span class='rparen token'>)</span> <span class='rubyid_do do kw'>do</span>
|
473
|
+
<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_all identifier id'>all</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_zone identifier id'>zone</span><span class='bitor op'>|</span>
|
474
|
+
<span class='rubyid_zone identifier id'>zone</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_zone_alias identifier id'>zone_alias</span><span class='bitor op'>|</span>
|
475
|
+
<span class='rubyid_throw identifier id'>throw</span><span class='lparen token'>(</span><span class='symbol val'>:zone</span><span class='comma token'>,</span> <span class='rubyid_zone identifier id'>zone</span><span class='rparen token'>)</span> <span class='rubyid_if if_mod kw'>if</span> <span class='lbrack token'>[</span><span class='rubyid_zone identifier id'>zone</span><span class='dot token'>.</span><span class='rubyid_to_str identifier id'>to_str</span><span class='lparen token'>(</span><span class='rubyid_zone_alias identifier id'>zone_alias</span><span class='rparen token'>)</span><span class='comma token'>,</span> <span class='rubyid_zone identifier id'>zone</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_nil nil kw'>nil</span><span class='comma token'>,</span> <span class='rubyid_zone_alias identifier id'>zone_alias</span><span class='rparen token'>)</span><span class='rbrack token'>]</span><span class='dot token'>.</span><span class='rubyid_include? fid id'>include?</span><span class='lparen token'>(</span><span class='rubyid_name identifier id'>name</span><span class='rparen token'>)</span>
|
476
|
+
<span class='rubyid_end end kw'>end</span>
|
477
|
+
<span class='rubyid_end end kw'>end</span>
|
478
|
+
|
479
|
+
<span class='rubyid_nil nil kw'>nil</span>
|
480
|
+
<span class='rubyid_end end kw'>end</span>
|
481
|
+
<span class='rubyid_end end kw'>end</span>
|
482
|
+
</pre>
|
481
483
|
</td>
|
482
484
|
</tr>
|
483
485
|
</table>
|
@@ -569,10 +571,11 @@
|
|
569
571
|
<td>
|
570
572
|
<pre class="code"><span class="info file"># File 'lib/lazier/datetime.rb', line 279</span>
|
571
573
|
|
572
|
-
<span class='kw'>def</span> <span class='
|
573
|
-
<span class='
|
574
|
-
<span class='
|
575
|
-
<span class='kw'>end</span
|
574
|
+
<span class='rubyid_def def kw'>def</span> <span class='rubyid_format_offset identifier id'>format_offset</span><span class='lparen token'>(</span><span class='rubyid_offset identifier id'>offset</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>
|
575
|
+
<span class='rubyid_offset identifier id'>offset</span> <span class='assign token'>=</span> <span class='lparen token'>(</span><span class='rubyid_offset identifier id'>offset</span> <span class='mult op'>*</span> <span class='integer val'>86400</span><span class='rparen token'>)</span><span class='dot token'>.</span><span class='rubyid_to_i identifier id'>to_i</span> <span class='rubyid_if if_mod kw'>if</span> <span class='rubyid_offset identifier id'>offset</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_Rational constant id'>Rational</span><span class='rparen token'>)</span>
|
576
|
+
<span class='rubyid_offset identifier id'>offset</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_Fixnum constant id'>Fixnum</span><span class='rparen token'>)</span> <span class='question op'>?</span> <span class='rubyid_self self kw'>self</span><span class='dot token'>.</span><span class='rubyid_seconds_to_utc_offset identifier id'>seconds_to_utc_offset</span><span class='lparen token'>(</span><span class='rubyid_offset identifier id'>offset</span><span class='comma token'>,</span> <span class='rubyid_colon identifier id'>colon</span><span class='rparen token'>)</span> <span class='colon op'>:</span> <span class='rubyid_nil nil kw'>nil</span>
|
577
|
+
<span class='rubyid_end end kw'>end</span>
|
578
|
+
</pre>
|
576
579
|
</td>
|
577
580
|
</tr>
|
578
581
|
</table>
|
@@ -682,26 +685,27 @@
|
|
682
685
|
<td>
|
683
686
|
<pre class="code"><span class="info file"># File 'lib/lazier/datetime.rb', line 306</span>
|
684
687
|
|
685
|
-
<span class='kw'>def</span> <span class='
|
686
|
-
<span class='
|
687
|
-
<span class='
|
688
|
-
<span class='ivar'>@zones_names</span> <span class='op'>||=</span> <span class='lbrace'>{</span> <span class='
|
688
|
+
<span class='rubyid_def def kw'>def</span> <span class='rubyid_list_all identifier id'>list_all</span><span class='lparen token'>(</span><span class='rubyid_with_dst identifier id'>with_dst</span> <span class='assign token'>=</span> <span class='rubyid_true true kw'>true</span><span class='comma 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>
|
689
|
+
<span class='rubyid_dst_label identifier id'>dst_label</span> <span class='opasgn op'>||=</span> <span class='string val'>"(DST)"</span>
|
690
|
+
<span class='rubyid_dst_key identifier id'>dst_key</span> <span class='assign token'>=</span> <span class='dstring node'>"DST-#{dst_label}"</span>
|
691
|
+
<span class='rubyid_@zones_names ivar id'>@zones_names</span> <span class='opasgn op'>||=</span> <span class='lbrace token'>{</span> <span class='string val'>"STANDARD"</span> <span class='assign token'>=</span><span class='gt op'>></span> <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_all identifier id'>all</span><span class='dot token'>.</span><span class='rubyid_collect identifier id'>collect</span><span class='lparen token'>(</span><span class='bitand op'>&</span><span class='symbol val'>:to_s</span><span class='rparen token'>)</span> <span class='rbrace token'>}</span>
|
689
692
|
|
690
|
-
<span class='kw'>if</span> <span class='
|
691
|
-
<span class='ivar'>@zones_names</span><span class='
|
693
|
+
<span class='rubyid_if if kw'>if</span> <span class='rubyid_with_dst identifier id'>with_dst</span> <span class='andop op'>&&</span> <span class='rubyid_@zones_names ivar id'>@zones_names</span><span class='lbrack token'>[</span><span class='rubyid_dst_key identifier id'>dst_key</span><span class='rbrack token'>]</span><span class='dot token'>.</span><span class='rubyid_blank? fid id'>blank?</span> <span class='rubyid_then then kw'>then</span>
|
694
|
+
<span class='rubyid_@zones_names ivar id'>@zones_names</span><span class='lbrack token'>[</span><span class='rubyid_dst_key identifier id'>dst_key</span><span class='rbrack token'>]</span> <span class='assign token'>=</span> <span class='lbrack token'>[</span><span class='rbrack token'>]</span>
|
692
695
|
|
693
|
-
<span class='op'>::</span><span class='
|
694
|
-
<span class='
|
695
|
-
<span class='ivar'>@zones_names</span><span class='
|
696
|
-
<span class='ivar'>@zones_names</span><span class='
|
697
|
-
<span class='kw'>end</span>
|
698
|
-
<span class='kw'>end</span>
|
696
|
+
<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_all identifier id'>all</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_zone identifier id'>zone</span><span class='bitor op'>|</span>
|
697
|
+
<span class='rubyid_zone identifier id'>zone</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_zone_alias identifier id'>zone_alias</span><span class='bitor op'>|</span>
|
698
|
+
<span class='rubyid_@zones_names ivar id'>@zones_names</span><span class='lbrack token'>[</span><span class='rubyid_dst_key identifier id'>dst_key</span><span class='rbrack token'>]</span> <span class='lshft op'><<</span> <span class='rubyid_zone identifier id'>zone</span><span class='dot token'>.</span><span class='rubyid_to_str identifier id'>to_str</span><span class='lparen token'>(</span><span class='rubyid_zone_alias identifier id'>zone_alias</span><span class='rparen token'>)</span>
|
699
|
+
<span class='rubyid_@zones_names ivar id'>@zones_names</span><span class='lbrack token'>[</span><span class='rubyid_dst_key identifier id'>dst_key</span><span class='rbrack token'>]</span> <span class='lshft op'><<</span> <span class='rubyid_zone identifier id'>zone</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_nil nil kw'>nil</span><span class='comma token'>,</span> <span class='rubyid_zone_alias identifier id'>zone_alias</span><span class='rparen token'>)</span> <span class='rubyid_if if_mod kw'>if</span> <span class='rubyid_zone identifier id'>zone</span><span class='dot token'>.</span><span class='rubyid_uses_dst? fid id'>uses_dst?</span> <span class='andop op'>&&</span> <span class='rubyid_zone_alias identifier id'>zone_alias</span> <span class='nmatch op'>!~</span> <span class='dregexp node'>/(#{Regexp.quote(dst_label)})$/</span>
|
700
|
+
<span class='rubyid_end end kw'>end</span>
|
701
|
+
<span class='rubyid_end end kw'>end</span>
|
699
702
|
|
700
|
-
<span class='ivar'>@zones_names</span><span class='
|
701
|
-
|
703
|
+
<span class='rubyid_@zones_names ivar id'>@zones_names</span><span class='lbrack token'>[</span><span class='rubyid_dst_key identifier id'>dst_key</span><span class='rbrack token'>]</span><span class='assign token'>=</span> <span class='rubyid_@zones_names ivar id'>@zones_names</span><span class='lbrack token'>[</span><span class='rubyid_dst_key identifier id'>dst_key</span><span class='rbrack token'>]</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> <span class='lbrace token'>{</span> <span class='bitor op'>|</span><span class='rubyid_a identifier id'>a</span><span class='comma token'>,</span><span class='rubyid_b identifier id'>b</span><span class='bitor op'>|</span> <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_compare identifier id'>compare</span><span class='lparen token'>(</span><span class='rubyid_a identifier id'>a</span><span class='comma token'>,</span> <span class='rubyid_b identifier id'>b</span><span class='rparen token'>)</span> <span class='rbrace token'>}</span> <span class='comment val'># Sort by name</span>
|
704
|
+
<span class='rubyid_end end kw'>end</span>
|
702
705
|
|
703
|
-
<span class='ivar'>@zones_names</span><span class='
|
704
|
-
<span class='kw'>end</span
|
706
|
+
<span class='rubyid_@zones_names ivar id'>@zones_names</span><span class='lbrack token'>[</span><span class='rubyid_with_dst identifier id'>with_dst</span> <span class='integer val'>? </span><span class='rubyid_dst_key identifier id'>dst_key</span> <span class='colon op'>:</span> <span class='string val'>"STANDARD"</span><span class='rbrack token'>]</span>
|
707
|
+
<span class='rubyid_end end kw'>end</span>
|
708
|
+
</pre>
|
705
709
|
</td>
|
706
710
|
</tr>
|
707
711
|
</table>
|
@@ -720,9 +724,9 @@
|
|
720
724
|
<div class="discussion">
|
721
725
|
<p>Returns a string representation of a timezone.</p>
|
722
726
|
|
723
|
-
<pre class="code ruby"><code><span class='
|
724
|
-
<span class='comment'># => "-0800@pacific-time-us-canada"
|
725
|
-
</
|
727
|
+
<pre class="code ruby"><code><span class='rubyid_DateTime constant id'>DateTime</span><span class='dot token'>.</span><span class='rubyid_parameterize_zone identifier id'>parameterize_zone</span><span class='lparen token'>(</span><span class='rubyid_ActiveSupport constant id'>ActiveSupport</span><span class='colon2 op'>::</span><span class='rubyid_TimeZone constant id'>TimeZone</span><span class='lbrack token'>[</span><span class='string val'>"Pacific Time (US & Canada)"</span><span class='rbrack token'>]</span><span class='rparen token'>)</span>
|
728
|
+
<span class='comment val'># => "-0800@pacific-time-us-canada"</span>
|
729
|
+
</code></pre>
|
726
730
|
|
727
731
|
|
728
732
|
</div>
|
@@ -804,17 +808,18 @@
|
|
804
808
|
<td>
|
805
809
|
<pre class="code"><span class="info file"># File 'lib/lazier/datetime.rb', line 336</span>
|
806
810
|
|
807
|
-
<span class='kw'>def</span> <span class='
|
808
|
-
<span class='
|
809
|
-
|
810
|
-
<span class='kw'>if</span> <span class='
|
811
|
-
<span class='
|
812
|
-
<span class='kw'>elsif</span> <span class='op'>!</span><span class='
|
813
|
-
<span class='
|
814
|
-
<span class='kw'>else</span>
|
815
|
-
<span class='
|
816
|
-
<span class='kw'>end</span>
|
817
|
-
<span class='kw'>end</span
|
811
|
+
<span class='rubyid_def def kw'>def</span> <span class='rubyid_parameterize_zone identifier id'>parameterize_zone</span><span class='lparen token'>(</span><span class='rubyid_tz identifier id'>tz</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='rparen token'>)</span>
|
812
|
+
<span class='rubyid_tz identifier id'>tz</span> <span class='assign token'>=</span> <span class='rubyid_tz identifier id'>tz</span><span class='dot token'>.</span><span class='rubyid_to_s identifier id'>to_s</span> <span class='rubyid_if if_mod kw'>if</span> <span class='notop op'>!</span><span class='rubyid_tz identifier id'>tz</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_String constant id'>String</span><span class='rparen token'>)</span>
|
813
|
+
|
814
|
+
<span class='rubyid_if if kw'>if</span> <span class='rubyid_tz identifier id'>tz</span> <span class='match op'>=~</span> <span class='regexp val'>/^(\([a-z]+([+-])(\d{2})(:?)(\d{2})\)\s(.+))$/i</span> <span class='rubyid_then then kw'>then</span>
|
815
|
+
<span class='rubyid_with_offset identifier id'>with_offset</span> <span class='integer val'>? </span><span class='dstring node'>"#{$2}#{$3}#{$5}@#{$6.parameterize}"</span> <span class='colon op'>:</span> <span class='rubyid_$6 nth_ref id'>$6</span><span class='dot token'>.</span><span class='rubyid_parameterize identifier id'>parameterize</span>
|
816
|
+
<span class='rubyid_elsif elsif kw'>elsif</span> <span class='notop op'>!</span><span class='rubyid_with_offset identifier id'>with_offset</span> <span class='rubyid_then then kw'>then</span>
|
817
|
+
<span class='rubyid_tz identifier id'>tz</span><span class='dot token'>.</span><span class='rubyid_gsub identifier id'>gsub</span><span class='lparen token'>(</span><span class='regexp val'>/^([+-]?(\d{2})(:?)(\d{2})@)/</span><span class='comma token'>,</span> <span class='string val'>""</span><span class='rparen token'>)</span>
|
818
|
+
<span class='rubyid_else else kw'>else</span>
|
819
|
+
<span class='rubyid_tz identifier id'>tz</span><span class='dot token'>.</span><span class='rubyid_parameterize identifier id'>parameterize</span>
|
820
|
+
<span class='rubyid_end end kw'>end</span>
|
821
|
+
<span class='rubyid_end end kw'>end</span>
|
822
|
+
</pre>
|
818
823
|
</td>
|
819
824
|
</tr>
|
820
825
|
</table>
|
@@ -889,10 +894,11 @@
|
|
889
894
|
<td>
|
890
895
|
<pre class="code"><span class="info file"># File 'lib/lazier/datetime.rb', line 269</span>
|
891
896
|
|
892
|
-
<span class='kw'>def</span> <span class='
|
893
|
-
<span class='
|
894
|
-
<span class='op'>::</span><span class='
|
895
|
-
<span class='kw'>end</span
|
897
|
+
<span class='rubyid_def def kw'>def</span> <span class='rubyid_rationalize_offset identifier id'>rationalize_offset</span><span class='lparen token'>(</span><span class='rubyid_offset identifier id'>offset</span><span class='rparen token'>)</span>
|
898
|
+
<span class='rubyid_offset identifier id'>offset</span> <span class='assign token'>=</span> <span class='rubyid_offset identifier id'>offset</span><span class='dot token'>.</span><span class='rubyid_try identifier id'>try</span><span class='lparen token'>(</span><span class='symbol val'>:offset</span><span class='rparen token'>)</span> <span class='rubyid_if if_mod kw'>if</span> <span class='notop op'>!</span><span class='rubyid_offset identifier id'>offset</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_Fixnum constant id'>Fixnum</span><span class='rparen token'>)</span>
|
899
|
+
<span class='colon3 op'>::</span><span class='rubyid_TZInfo constant id'>TZInfo</span><span class='colon2 op'>::</span><span class='rubyid_OffsetRationals constant id'>OffsetRationals</span><span class='dot token'>.</span><span class='rubyid_rational_for_offset identifier id'>rational_for_offset</span><span class='lparen token'>(</span><span class='rubyid_offset identifier id'>offset</span><span class='dot token'>.</span><span class='rubyid_to_integer identifier id'>to_integer</span><span class='rparen token'>)</span>
|
900
|
+
<span class='rubyid_end end kw'>end</span>
|
901
|
+
</pre>
|
896
902
|
</td>
|
897
903
|
</tr>
|
898
904
|
</table>
|
@@ -1020,22 +1026,23 @@
|
|
1020
1026
|
<td>
|
1021
1027
|
<pre class="code"><span class="info file"># File 'lib/lazier/datetime.rb', line 355</span>
|
1022
1028
|
|
1023
|
-
<span class='kw'>def</span> <span class='
|
1024
|
-
<span class='
|
1025
|
-
<span class='
|
1026
|
-
<span class='kw'>self</span><span class='
|
1027
|
-
<span class='
|
1028
|
-
<span class='kw'>end</span>
|
1029
|
-
|
1030
|
-
<span class='kw'>nil</span>
|
1031
|
-
<span class='kw'>end</span>
|
1032
|
-
|
1033
|
-
<span class='kw'>if</span> <span class='
|
1034
|
-
<span class='lparen'>(</span><span class='
|
1035
|
-
<span class='kw'>else</span>
|
1036
|
-
<span class='kw'>nil</span>
|
1037
|
-
<span class='kw'>end</span>
|
1038
|
-
<span class='kw'>end</span
|
1029
|
+
<span class='rubyid_def def kw'>def</span> <span class='rubyid_unparameterize_zone identifier id'>unparameterize_zone</span><span class='lparen token'>(</span><span class='rubyid_tz identifier id'>tz</span><span class='comma token'>,</span> <span class='rubyid_as_string identifier id'>as_string</span> <span class='assign token'>=</span> <span class='rubyid_false false kw'>false</span><span class='comma 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>
|
1030
|
+
<span class='rubyid_tz identifier id'>tz</span> <span class='assign token'>=</span> <span class='rubyid_self self kw'>self</span><span class='dot token'>.</span><span class='rubyid_parameterize_zone identifier id'>parameterize_zone</span><span class='lparen token'>(</span><span class='rubyid_tz identifier id'>tz</span><span class='comma token'>,</span> <span class='rubyid_false false kw'>false</span><span class='rparen token'>)</span>
|
1031
|
+
<span class='rubyid_rv identifier id'>rv</span> <span class='assign token'>=</span> <span class='rubyid_catch identifier id'>catch</span><span class='lparen token'>(</span><span class='symbol val'>:zone</span><span class='rparen token'>)</span> <span class='rubyid_do do kw'>do</span>
|
1032
|
+
<span class='rubyid_self self kw'>self</span><span class='dot token'>.</span><span class='rubyid_list_all identifier id'>list_all</span><span class='lparen token'>(</span><span class='rubyid_true true kw'>true</span><span class='comma token'>,</span> <span class='rubyid_dst_label identifier id'>dst_label</span><span class='rparen token'>)</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_zone identifier id'>zone</span><span class='bitor op'>|</span>
|
1033
|
+
<span class='rubyid_throw identifier id'>throw</span><span class='lparen token'>(</span><span class='symbol val'>:zone</span><span class='comma token'>,</span> <span class='rubyid_zone identifier id'>zone</span><span class='rparen 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_parameterize_zone identifier id'>parameterize_zone</span><span class='lparen token'>(</span><span class='rubyid_zone identifier id'>zone</span><span class='comma token'>,</span> <span class='rubyid_false false kw'>false</span><span class='rparen token'>)</span> <span class='match op'>=~</span> <span class='dregexp node'>/(#{Regexp.quote(tz)})$/</span>
|
1034
|
+
<span class='rubyid_end end kw'>end</span>
|
1035
|
+
|
1036
|
+
<span class='rubyid_nil nil kw'>nil</span>
|
1037
|
+
<span class='rubyid_end end kw'>end</span>
|
1038
|
+
|
1039
|
+
<span class='rubyid_if if kw'>if</span> <span class='rubyid_rv identifier id'>rv</span> <span class='rubyid_then then kw'>then</span>
|
1040
|
+
<span class='lparen token'>(</span><span class='rubyid_as_string identifier id'>as_string</span> <span class='integer val'>? </span><span class='rubyid_rv identifier id'>rv</span> <span class='colon op'>:</span> <span class='rubyid_self self kw'>self</span><span class='dot token'>.</span><span class='rubyid_find identifier id'>find</span><span class='lparen token'>(</span><span class='rubyid_rv identifier id'>rv</span><span class='comma token'>,</span> <span class='rubyid_dst_label identifier id'>dst_label</span><span class='rparen token'>)</span><span class='rparen token'>)</span>
|
1041
|
+
<span class='rubyid_else else kw'>else</span>
|
1042
|
+
<span class='rubyid_nil nil kw'>nil</span>
|
1043
|
+
<span class='rubyid_end end kw'>end</span>
|
1044
|
+
<span class='rubyid_end end kw'>end</span>
|
1045
|
+
</pre>
|
1039
1046
|
</td>
|
1040
1047
|
</tr>
|
1041
1048
|
</table>
|
@@ -1046,9 +1053,9 @@
|
|
1046
1053
|
</div>
|
1047
1054
|
|
1048
1055
|
<div id="footer">
|
1049
|
-
Generated on
|
1056
|
+
Generated on Wed Aug 22 16:33:57 2012 by
|
1050
1057
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
1051
|
-
0.8.2.1 (ruby-1.
|
1058
|
+
0.8.2.1 (ruby-1.8.7).
|
1052
1059
|
</div>
|
1053
1060
|
|
1054
1061
|
</body>
|
data/doc/Lazier/Version.html
CHANGED
@@ -119,7 +119,8 @@
|
|
119
119
|
|
120
120
|
</div>
|
121
121
|
</dt>
|
122
|
-
<dd><pre class="code"><span class='
|
122
|
+
<dd><pre class="code"><span class='integer val'>1</span>
|
123
|
+
</pre></dd>
|
123
124
|
|
124
125
|
<dt id="MINOR-constant" class="">MINOR =
|
125
126
|
<div class="docstring">
|
@@ -134,7 +135,8 @@
|
|
134
135
|
|
135
136
|
</div>
|
136
137
|
</dt>
|
137
|
-
<dd><pre class="code"><span class='
|
138
|
+
<dd><pre class="code"><span class='integer val'>0</span>
|
139
|
+
</pre></dd>
|
138
140
|
|
139
141
|
<dt id="PATCH-constant" class="">PATCH =
|
140
142
|
<div class="docstring">
|
@@ -149,7 +151,8 @@
|
|
149
151
|
|
150
152
|
</div>
|
151
153
|
</dt>
|
152
|
-
<dd><pre class="code"><span class='
|
154
|
+
<dd><pre class="code"><span class='integer val'>4</span>
|
155
|
+
</pre></dd>
|
153
156
|
|
154
157
|
<dt id="STRING-constant" class="">STRING =
|
155
158
|
<div class="docstring">
|
@@ -164,7 +167,8 @@
|
|
164
167
|
|
165
168
|
</div>
|
166
169
|
</dt>
|
167
|
-
<dd><pre class="code"><span class='
|
170
|
+
<dd><pre class="code"><span class='lbrack token'>[</span><span class='rubyid_MAJOR constant id'>MAJOR</span><span class='comma token'>,</span> <span class='rubyid_MINOR constant id'>MINOR</span><span class='comma token'>,</span> <span class='rubyid_PATCH constant id'>PATCH</span><span class='rbrack token'>]</span><span class='dot token'>.</span><span class='rubyid_compact identifier id'>compact</span><span class='dot token'>.</span><span class='rubyid_join identifier id'>join</span><span class='lparen token'>(</span><span class='string val'>"."</span><span class='rparen token'>)</span>
|
171
|
+
</pre></dd>
|
168
172
|
|
169
173
|
</dl>
|
170
174
|
|
@@ -180,9 +184,9 @@
|
|
180
184
|
</div>
|
181
185
|
|
182
186
|
<div id="footer">
|
183
|
-
Generated on
|
187
|
+
Generated on Wed Aug 22 16:33:56 2012 by
|
184
188
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
185
|
-
0.8.2.1 (ruby-1.
|
189
|
+
0.8.2.1 (ruby-1.8.7).
|
186
190
|
</div>
|
187
191
|
|
188
192
|
</body>
|
data/doc/_index.html
CHANGED
@@ -297,9 +297,9 @@
|
|
297
297
|
</div>
|
298
298
|
|
299
299
|
<div id="footer">
|
300
|
-
Generated on
|
300
|
+
Generated on Wed Aug 22 16:33:55 2012 by
|
301
301
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
302
|
-
0.8.2.1 (ruby-1.
|
302
|
+
0.8.2.1 (ruby-1.8.7).
|
303
303
|
</div>
|
304
304
|
|
305
305
|
</body>
|
data/doc/file.README.html
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
3
3
|
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
4
4
|
<head>
|
5
|
-
<meta http-equiv="Content-Type" content="text/html; charset=
|
5
|
+
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
6
6
|
<title>
|
7
7
|
File: README
|
8
8
|
|
@@ -72,8 +72,8 @@
|
|
72
72
|
|
73
73
|
<h2>Usage</h2>
|
74
74
|
|
75
|
-
<pre class="code ruby"><code><span class='
|
76
|
-
<span class='
|
75
|
+
<pre class="code ruby"><code><span class='rubyid_require identifier id'>require</span> <span class='string val'>"lazier"</span>
|
76
|
+
<span class='rubyid_Lazier constant id'>Lazier</span><span class='dot token'>.</span><span class='rubyid_load! fid id'>load!</span>
|
77
77
|
</code></pre>
|
78
78
|
|
79
79
|
<p>That's all!
|
@@ -98,9 +98,9 @@ Licensed under the MIT license, which can be found at <a href="http://www.openso
|
|
98
98
|
</div></div>
|
99
99
|
|
100
100
|
<div id="footer">
|
101
|
-
Generated on
|
101
|
+
Generated on Wed Aug 22 16:33:55 2012 by
|
102
102
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
103
|
-
0.8.2.1 (ruby-1.
|
103
|
+
0.8.2.1 (ruby-1.8.7).
|
104
104
|
</div>
|
105
105
|
|
106
106
|
</body>
|
data/doc/index.html
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
3
3
|
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
4
4
|
<head>
|
5
|
-
<meta http-equiv="Content-Type" content="text/html; charset=
|
5
|
+
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
6
6
|
<title>
|
7
7
|
File: README
|
8
8
|
|
@@ -72,8 +72,8 @@
|
|
72
72
|
|
73
73
|
<h2>Usage</h2>
|
74
74
|
|
75
|
-
<pre class="code ruby"><code><span class='
|
76
|
-
<span class='
|
75
|
+
<pre class="code ruby"><code><span class='rubyid_require identifier id'>require</span> <span class='string val'>"lazier"</span>
|
76
|
+
<span class='rubyid_Lazier constant id'>Lazier</span><span class='dot token'>.</span><span class='rubyid_load! fid id'>load!</span>
|
77
77
|
</code></pre>
|
78
78
|
|
79
79
|
<p>That's all!
|
@@ -98,9 +98,9 @@ Licensed under the MIT license, which can be found at <a href="http://www.openso
|
|
98
98
|
</div></div>
|
99
99
|
|
100
100
|
<div id="footer">
|
101
|
-
Generated on
|
101
|
+
Generated on Wed Aug 22 16:33:55 2012 by
|
102
102
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
103
|
-
0.8.2.1 (ruby-1.
|
103
|
+
0.8.2.1 (ruby-1.8.7).
|
104
104
|
</div>
|
105
105
|
|
106
106
|
</body>
|
@@ -103,9 +103,9 @@
|
|
103
103
|
</div>
|
104
104
|
|
105
105
|
<div id="footer">
|
106
|
-
Generated on
|
106
|
+
Generated on Wed Aug 22 16:33:55 2012 by
|
107
107
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
108
|
-
0.8.2.1 (ruby-1.
|
108
|
+
0.8.2.1 (ruby-1.8.7).
|
109
109
|
</div>
|
110
110
|
|
111
111
|
</body>
|
data/lib/lazier/version.rb
CHANGED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: lazier
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.4
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-08-
|
12
|
+
date: 2012-08-22 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: json
|
@@ -228,14 +228,14 @@ files:
|
|
228
228
|
- lib/lazier/string.rb
|
229
229
|
- lib/lazier/version.rb
|
230
230
|
- spec/coverage_helper.rb
|
231
|
-
- spec/
|
232
|
-
- spec/
|
233
|
-
- spec/
|
234
|
-
- spec/
|
235
|
-
- spec/
|
236
|
-
- spec/
|
237
|
-
- spec/
|
238
|
-
- spec/
|
231
|
+
- spec/lazier/boolean_spec.rb
|
232
|
+
- spec/lazier/datetime_spec.rb
|
233
|
+
- spec/lazier/hash_spec.rb
|
234
|
+
- spec/lazier/math_spec.rb
|
235
|
+
- spec/lazier/object_spec.rb
|
236
|
+
- spec/lazier/pathname_spec.rb
|
237
|
+
- spec/lazier/settings_spec.rb
|
238
|
+
- spec/lazier/string_spec.rb
|
239
239
|
- spec/lazier_spec.rb
|
240
240
|
- spec/spec_helper.rb
|
241
241
|
homepage: http://github.com/ShogunPanda/lazier
|
@@ -252,7 +252,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
252
252
|
version: '0'
|
253
253
|
segments:
|
254
254
|
- 0
|
255
|
-
hash:
|
255
|
+
hash: -3058840198967376123
|
256
256
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
257
257
|
none: false
|
258
258
|
requirements:
|
@@ -261,7 +261,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
261
261
|
version: '0'
|
262
262
|
segments:
|
263
263
|
- 0
|
264
|
-
hash:
|
264
|
+
hash: -3058840198967376123
|
265
265
|
requirements: []
|
266
266
|
rubyforge_project: lazier
|
267
267
|
rubygems_version: 1.8.24
|
@@ -270,14 +270,14 @@ specification_version: 3
|
|
270
270
|
summary: Several Ruby object enhancements.
|
271
271
|
test_files:
|
272
272
|
- spec/coverage_helper.rb
|
273
|
-
- spec/
|
274
|
-
- spec/
|
275
|
-
- spec/
|
276
|
-
- spec/
|
277
|
-
- spec/
|
278
|
-
- spec/
|
279
|
-
- spec/
|
280
|
-
- spec/
|
273
|
+
- spec/lazier/boolean_spec.rb
|
274
|
+
- spec/lazier/datetime_spec.rb
|
275
|
+
- spec/lazier/hash_spec.rb
|
276
|
+
- spec/lazier/math_spec.rb
|
277
|
+
- spec/lazier/object_spec.rb
|
278
|
+
- spec/lazier/pathname_spec.rb
|
279
|
+
- spec/lazier/settings_spec.rb
|
280
|
+
- spec/lazier/string_spec.rb
|
281
281
|
- spec/lazier_spec.rb
|
282
282
|
- spec/spec_helper.rb
|
283
283
|
has_rdoc:
|