lazier 1.0.7 → 2.0.0
Sign up to get free protection for your applications and to get access to all the features.
- data/.travis.yml +1 -1
- data/README.md +5 -2
- data/doc/Lazier.html +472 -174
- data/doc/Lazier/Boolean.html +9 -11
- data/doc/Lazier/DateTime.html +59 -113
- data/doc/Lazier/DateTime/ClassMethods.html +87 -121
- data/doc/Lazier/Exceptions.html +3 -3
- data/doc/Lazier/Exceptions/Dump.html +3 -3
- data/doc/Lazier/Hash.html +17 -19
- data/doc/Lazier/Math.html +3 -3
- data/doc/Lazier/Math/ClassMethods.html +14 -48
- data/doc/Lazier/Object.html +127 -139
- data/doc/Lazier/Pathname.html +11 -12
- data/doc/Lazier/Settings.html +189 -169
- data/doc/Lazier/String.html +23 -27
- data/doc/Lazier/TimeZone.html +202 -249
- data/doc/Lazier/TimeZone/ClassMethods.html +110 -137
- data/doc/Lazier/Version.html +7 -11
- data/doc/_index.html +4 -4
- data/doc/file.README.html +12 -9
- data/doc/frames.html +1 -1
- data/doc/index.html +12 -9
- data/doc/method_list.html +72 -24
- data/doc/top-level-namespace.html +3 -3
- data/lazier.gemspec +8 -8
- data/lib/lazier.rb +55 -59
- data/lib/lazier/datetime.rb +74 -88
- data/lib/lazier/math.rb +2 -18
- data/lib/lazier/object.rb +14 -13
- data/lib/lazier/settings.rb +8 -25
- data/lib/lazier/version.rb +2 -2
- data/spec/lazier/datetime_spec.rb +12 -20
- data/spec/lazier/hash_spec.rb +1 -1
- data/spec/lazier/object_spec.rb +3 -3
- data/spec/lazier/settings_spec.rb +3 -3
- data/spec/lazier_spec.rb +1 -19
- metadata +145 -160
data/doc/Lazier/Pathname.html
CHANGED
@@ -6,7 +6,7 @@
|
|
6
6
|
<title>
|
7
7
|
Module: Lazier::Pathname
|
8
8
|
|
9
|
-
— Documentation by YARD 0.8.
|
9
|
+
— Documentation by YARD 0.8.3
|
10
10
|
|
11
11
|
</title>
|
12
12
|
|
@@ -159,9 +159,9 @@
|
|
159
159
|
<div class="discussion">
|
160
160
|
<p>Returns all the components that are included in this path.</p>
|
161
161
|
|
162
|
-
<pre class="code ruby"><code><span class='
|
163
|
-
<span class='comment
|
164
|
-
</code></pre>
|
162
|
+
<pre class="code ruby"><code><span class='const'>Pathname</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>/usr/bin/ruby</span><span class='tstring_end'>"</span></span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_components'>components</span>
|
163
|
+
<span class='comment'># => ["usr", "bin", "ruby"]
|
164
|
+
</span></code></pre>
|
165
165
|
|
166
166
|
|
167
167
|
</div>
|
@@ -201,12 +201,11 @@
|
|
201
201
|
<td>
|
202
202
|
<pre class="code"><span class="info file"># File 'lib/lazier/pathname.rb', line 20</span>
|
203
203
|
|
204
|
-
<span class='
|
205
|
-
<span class='
|
206
|
-
<span class='
|
207
|
-
<span class='
|
208
|
-
<span class='
|
209
|
-
</pre>
|
204
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_components'>components</span>
|
205
|
+
<span class='id identifier rubyid_rv'>rv</span> <span class='op'>=</span> <span class='lbracket'>[</span><span class='rbracket'>]</span>
|
206
|
+
<span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_each_filename'>each_filename</span> <span class='lbrace'>{</span> <span class='op'>|</span><span class='id identifier rubyid_p'>p</span><span class='op'>|</span> <span class='id identifier rubyid_rv'>rv</span> <span class='op'><<</span> <span class='id identifier rubyid_p'>p</span> <span class='rbrace'>}</span>
|
207
|
+
<span class='id identifier rubyid_rv'>rv</span>
|
208
|
+
<span class='kw'>end</span></pre>
|
210
209
|
</td>
|
211
210
|
</tr>
|
212
211
|
</table>
|
@@ -217,9 +216,9 @@
|
|
217
216
|
</div>
|
218
217
|
|
219
218
|
<div id="footer">
|
220
|
-
Generated on
|
219
|
+
Generated on Mon Jan 28 20:23:46 2013 by
|
221
220
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
222
|
-
0.8.
|
221
|
+
0.8.3 (ruby-1.9.3).
|
223
222
|
</div>
|
224
223
|
|
225
224
|
</body>
|
data/doc/Lazier/Settings.html
CHANGED
@@ -6,7 +6,7 @@
|
|
6
6
|
<title>
|
7
7
|
Class: Lazier::Settings
|
8
8
|
|
9
|
-
— Documentation by YARD 0.8.
|
9
|
+
— Documentation by YARD 0.8.3
|
10
10
|
|
11
11
|
</title>
|
12
12
|
|
@@ -119,7 +119,7 @@
|
|
119
119
|
<li class="public ">
|
120
120
|
<span class="summary_signature">
|
121
121
|
|
122
|
-
<a href="#boolean_names-instance_method" title="#boolean_names (instance method)">- (
|
122
|
+
<a href="#boolean_names-instance_method" title="#boolean_names (instance method)">- (Hash) <strong>boolean_names</strong> </a>
|
123
123
|
|
124
124
|
|
125
125
|
|
@@ -128,8 +128,6 @@
|
|
128
128
|
|
129
129
|
|
130
130
|
|
131
|
-
<span class="note title readonly">readonly</span>
|
132
|
-
|
133
131
|
|
134
132
|
|
135
133
|
|
@@ -147,7 +145,7 @@
|
|
147
145
|
<li class="public ">
|
148
146
|
<span class="summary_signature">
|
149
147
|
|
150
|
-
<a href="#date_formats-instance_method" title="#date_formats (instance method)">- (
|
148
|
+
<a href="#date_formats-instance_method" title="#date_formats (instance method)">- (Hash) <strong>date_formats</strong> </a>
|
151
149
|
|
152
150
|
|
153
151
|
|
@@ -156,8 +154,6 @@
|
|
156
154
|
|
157
155
|
|
158
156
|
|
159
|
-
<span class="note title readonly">readonly</span>
|
160
|
-
|
161
157
|
|
162
158
|
|
163
159
|
|
@@ -175,7 +171,7 @@
|
|
175
171
|
<li class="public ">
|
176
172
|
<span class="summary_signature">
|
177
173
|
|
178
|
-
<a href="#date_names-instance_method" title="#date_names (instance method)">- (
|
174
|
+
<a href="#date_names-instance_method" title="#date_names (instance method)">- (Hash) <strong>date_names</strong> </a>
|
179
175
|
|
180
176
|
|
181
177
|
|
@@ -184,8 +180,6 @@
|
|
184
180
|
|
185
181
|
|
186
182
|
|
187
|
-
<span class="note title readonly">readonly</span>
|
188
|
-
|
189
183
|
|
190
184
|
|
191
185
|
|
@@ -203,7 +197,7 @@
|
|
203
197
|
<li class="public ">
|
204
198
|
<span class="summary_signature">
|
205
199
|
|
206
|
-
<a href="#format_number-instance_method" title="#format_number (instance method)">- (
|
200
|
+
<a href="#format_number-instance_method" title="#format_number (instance method)">- (Hash) <strong>format_number</strong> </a>
|
207
201
|
|
208
202
|
|
209
203
|
|
@@ -212,8 +206,6 @@
|
|
212
206
|
|
213
207
|
|
214
208
|
|
215
|
-
<span class="note title readonly">readonly</span>
|
216
|
-
|
217
209
|
|
218
210
|
|
219
211
|
|
@@ -421,23 +413,22 @@
|
|
421
413
|
<pre class="lines">
|
422
414
|
|
423
415
|
|
416
|
+
28
|
417
|
+
29
|
424
418
|
30
|
425
419
|
31
|
426
420
|
32
|
427
|
-
33
|
428
|
-
34
|
429
|
-
35</pre>
|
421
|
+
33</pre>
|
430
422
|
</td>
|
431
423
|
<td>
|
432
|
-
<pre class="code"><span class="info file"># File 'lib/lazier/settings.rb', line
|
433
|
-
|
434
|
-
<span class='
|
435
|
-
<span class='
|
436
|
-
<span class='
|
437
|
-
<span class='
|
438
|
-
<span class='
|
439
|
-
<span class='
|
440
|
-
</pre>
|
424
|
+
<pre class="code"><span class="info file"># File 'lib/lazier/settings.rb', line 28</span>
|
425
|
+
|
426
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span>
|
427
|
+
<span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_setup_format_number'>setup_format_number</span>
|
428
|
+
<span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_setup_boolean_names'>setup_boolean_names</span>
|
429
|
+
<span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_setup_date_formats'>setup_date_formats</span>
|
430
|
+
<span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_setup_date_names'>setup_date_names</span>
|
431
|
+
<span class='kw'>end</span></pre>
|
441
432
|
</td>
|
442
433
|
</tr>
|
443
434
|
</table>
|
@@ -449,11 +440,11 @@
|
|
449
440
|
<h2>Instance Attribute Details</h2>
|
450
441
|
|
451
442
|
|
452
|
-
<span id=""></span>
|
443
|
+
<span id="boolean_names=-instance_method"></span>
|
453
444
|
<div class="method_details first">
|
454
445
|
<h3 class="signature first" id="boolean_names-instance_method">
|
455
446
|
|
456
|
-
- (<tt><span class='object_link'><a href="
|
447
|
+
- (<tt><span class='object_link'><a href="Hash.html" title="Lazier::Hash (module)">Hash</a></span></tt>) <strong>boolean_names</strong>
|
457
448
|
|
458
449
|
|
459
450
|
|
@@ -468,6 +459,23 @@
|
|
468
459
|
</div>
|
469
460
|
<div class="tags">
|
470
461
|
|
462
|
+
<p class="tag_title">Returns:</p>
|
463
|
+
<ul class="return">
|
464
|
+
|
465
|
+
<li>
|
466
|
+
|
467
|
+
|
468
|
+
<span class='type'>(<tt><span class='object_link'><a href="Hash.html" title="Lazier::Hash (module)">Hash</a></span></tt>)</span>
|
469
|
+
|
470
|
+
|
471
|
+
|
472
|
+
—
|
473
|
+
<div class='inline'><p>the current value of boolean_names</p>
|
474
|
+
</div>
|
475
|
+
|
476
|
+
</li>
|
477
|
+
|
478
|
+
</ul>
|
471
479
|
|
472
480
|
</div><table class="source_code">
|
473
481
|
<tr>
|
@@ -482,21 +490,20 @@
|
|
482
490
|
<td>
|
483
491
|
<pre class="code"><span class="info file"># File 'lib/lazier/settings.rb', line 14</span>
|
484
492
|
|
485
|
-
<span class='
|
486
|
-
<span class='
|
487
|
-
<span class='
|
488
|
-
</pre>
|
493
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_boolean_names'>boolean_names</span>
|
494
|
+
<span class='ivar'>@boolean_names</span>
|
495
|
+
<span class='kw'>end</span></pre>
|
489
496
|
</td>
|
490
497
|
</tr>
|
491
498
|
</table>
|
492
499
|
</div>
|
493
500
|
|
494
501
|
|
495
|
-
<span id=""></span>
|
502
|
+
<span id="date_formats=-instance_method"></span>
|
496
503
|
<div class="method_details ">
|
497
504
|
<h3 class="signature " id="date_formats-instance_method">
|
498
505
|
|
499
|
-
- (<tt><span class='object_link'><a href="
|
506
|
+
- (<tt><span class='object_link'><a href="Hash.html" title="Lazier::Hash (module)">Hash</a></span></tt>) <strong>date_formats</strong>
|
500
507
|
|
501
508
|
|
502
509
|
|
@@ -511,6 +518,23 @@
|
|
511
518
|
</div>
|
512
519
|
<div class="tags">
|
513
520
|
|
521
|
+
<p class="tag_title">Returns:</p>
|
522
|
+
<ul class="return">
|
523
|
+
|
524
|
+
<li>
|
525
|
+
|
526
|
+
|
527
|
+
<span class='type'>(<tt><span class='object_link'><a href="Hash.html" title="Lazier::Hash (module)">Hash</a></span></tt>)</span>
|
528
|
+
|
529
|
+
|
530
|
+
|
531
|
+
—
|
532
|
+
<div class='inline'><p>the current value of date_formats</p>
|
533
|
+
</div>
|
534
|
+
|
535
|
+
</li>
|
536
|
+
|
537
|
+
</ul>
|
514
538
|
|
515
539
|
</div><table class="source_code">
|
516
540
|
<tr>
|
@@ -518,28 +542,27 @@
|
|
518
542
|
<pre class="lines">
|
519
543
|
|
520
544
|
|
521
|
-
|
522
|
-
|
523
|
-
|
545
|
+
14
|
546
|
+
15
|
547
|
+
16</pre>
|
524
548
|
</td>
|
525
549
|
<td>
|
526
|
-
<pre class="code"><span class="info file"># File 'lib/lazier/settings.rb', line
|
550
|
+
<pre class="code"><span class="info file"># File 'lib/lazier/settings.rb', line 14</span>
|
527
551
|
|
528
|
-
<span class='
|
529
|
-
<span class='
|
530
|
-
<span class='
|
531
|
-
</pre>
|
552
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_date_formats'>date_formats</span>
|
553
|
+
<span class='ivar'>@date_formats</span>
|
554
|
+
<span class='kw'>end</span></pre>
|
532
555
|
</td>
|
533
556
|
</tr>
|
534
557
|
</table>
|
535
558
|
</div>
|
536
559
|
|
537
560
|
|
538
|
-
<span id=""></span>
|
561
|
+
<span id="date_names=-instance_method"></span>
|
539
562
|
<div class="method_details ">
|
540
563
|
<h3 class="signature " id="date_names-instance_method">
|
541
564
|
|
542
|
-
- (<tt><span class='object_link'><a href="
|
565
|
+
- (<tt><span class='object_link'><a href="Hash.html" title="Lazier::Hash (module)">Hash</a></span></tt>) <strong>date_names</strong>
|
543
566
|
|
544
567
|
|
545
568
|
|
@@ -554,6 +577,23 @@
|
|
554
577
|
</div>
|
555
578
|
<div class="tags">
|
556
579
|
|
580
|
+
<p class="tag_title">Returns:</p>
|
581
|
+
<ul class="return">
|
582
|
+
|
583
|
+
<li>
|
584
|
+
|
585
|
+
|
586
|
+
<span class='type'>(<tt><span class='object_link'><a href="Hash.html" title="Lazier::Hash (module)">Hash</a></span></tt>)</span>
|
587
|
+
|
588
|
+
|
589
|
+
|
590
|
+
—
|
591
|
+
<div class='inline'><p>the current value of date_names</p>
|
592
|
+
</div>
|
593
|
+
|
594
|
+
</li>
|
595
|
+
|
596
|
+
</ul>
|
557
597
|
|
558
598
|
</div><table class="source_code">
|
559
599
|
<tr>
|
@@ -561,28 +601,27 @@
|
|
561
601
|
<pre class="lines">
|
562
602
|
|
563
603
|
|
564
|
-
|
565
|
-
|
566
|
-
|
604
|
+
14
|
605
|
+
15
|
606
|
+
16</pre>
|
567
607
|
</td>
|
568
608
|
<td>
|
569
|
-
<pre class="code"><span class="info file"># File 'lib/lazier/settings.rb', line
|
609
|
+
<pre class="code"><span class="info file"># File 'lib/lazier/settings.rb', line 14</span>
|
570
610
|
|
571
|
-
<span class='
|
572
|
-
<span class='
|
573
|
-
<span class='
|
574
|
-
</pre>
|
611
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_date_names'>date_names</span>
|
612
|
+
<span class='ivar'>@date_names</span>
|
613
|
+
<span class='kw'>end</span></pre>
|
575
614
|
</td>
|
576
615
|
</tr>
|
577
616
|
</table>
|
578
617
|
</div>
|
579
618
|
|
580
619
|
|
581
|
-
<span id=""></span>
|
620
|
+
<span id="format_number=-instance_method"></span>
|
582
621
|
<div class="method_details ">
|
583
622
|
<h3 class="signature " id="format_number-instance_method">
|
584
623
|
|
585
|
-
- (<tt><span class='object_link'><a href="
|
624
|
+
- (<tt><span class='object_link'><a href="Hash.html" title="Lazier::Hash (module)">Hash</a></span></tt>) <strong>format_number</strong>
|
586
625
|
|
587
626
|
|
588
627
|
|
@@ -597,6 +636,23 @@
|
|
597
636
|
</div>
|
598
637
|
<div class="tags">
|
599
638
|
|
639
|
+
<p class="tag_title">Returns:</p>
|
640
|
+
<ul class="return">
|
641
|
+
|
642
|
+
<li>
|
643
|
+
|
644
|
+
|
645
|
+
<span class='type'>(<tt><span class='object_link'><a href="Hash.html" title="Lazier::Hash (module)">Hash</a></span></tt>)</span>
|
646
|
+
|
647
|
+
|
648
|
+
|
649
|
+
—
|
650
|
+
<div class='inline'><p>the current value of format_number</p>
|
651
|
+
</div>
|
652
|
+
|
653
|
+
</li>
|
654
|
+
|
655
|
+
</ul>
|
600
656
|
|
601
657
|
</div><table class="source_code">
|
602
658
|
<tr>
|
@@ -604,17 +660,16 @@
|
|
604
660
|
<pre class="lines">
|
605
661
|
|
606
662
|
|
607
|
-
|
608
|
-
|
609
|
-
|
663
|
+
14
|
664
|
+
15
|
665
|
+
16</pre>
|
610
666
|
</td>
|
611
667
|
<td>
|
612
|
-
<pre class="code"><span class="info file"># File 'lib/lazier/settings.rb', line
|
668
|
+
<pre class="code"><span class="info file"># File 'lib/lazier/settings.rb', line 14</span>
|
613
669
|
|
614
|
-
<span class='
|
615
|
-
<span class='
|
616
|
-
<span class='
|
617
|
-
</pre>
|
670
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_format_number'>format_number</span>
|
671
|
+
<span class='ivar'>@format_number</span>
|
672
|
+
<span class='kw'>end</span></pre>
|
618
673
|
</td>
|
619
674
|
</tr>
|
620
675
|
</table>
|
@@ -669,17 +724,16 @@
|
|
669
724
|
<pre class="lines">
|
670
725
|
|
671
726
|
|
672
|
-
|
673
|
-
|
674
|
-
|
727
|
+
23
|
728
|
+
24
|
729
|
+
25</pre>
|
675
730
|
</td>
|
676
731
|
<td>
|
677
|
-
<pre class="code"><span class="info file"># File 'lib/lazier/settings.rb', line
|
732
|
+
<pre class="code"><span class="info file"># File 'lib/lazier/settings.rb', line 23</span>
|
678
733
|
|
679
|
-
<span class='
|
680
|
-
<span class='
|
681
|
-
<span class='
|
682
|
-
</pre>
|
734
|
+
<span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_instance'>instance</span>
|
735
|
+
<span class='ivar'>@instance</span> <span class='op'>||=</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span>
|
736
|
+
<span class='kw'>end</span></pre>
|
683
737
|
</td>
|
684
738
|
</tr>
|
685
739
|
</table>
|
@@ -778,21 +832,20 @@
|
|
778
832
|
<pre class="lines">
|
779
833
|
|
780
834
|
|
781
|
-
|
782
|
-
|
783
|
-
|
784
|
-
|
785
|
-
|
835
|
+
53
|
836
|
+
54
|
837
|
+
55
|
838
|
+
56
|
839
|
+
57</pre>
|
786
840
|
</td>
|
787
841
|
<td>
|
788
|
-
<pre class="code"><span class="info file"># File 'lib/lazier/settings.rb', line
|
789
|
-
|
790
|
-
<span class='
|
791
|
-
<span class='
|
792
|
-
<span class='
|
793
|
-
<span class='
|
794
|
-
<span class='
|
795
|
-
</pre>
|
842
|
+
<pre class="code"><span class="info file"># File 'lib/lazier/settings.rb', line 53</span>
|
843
|
+
|
844
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_setup_boolean_names'>setup_boolean_names</span><span class='lparen'>(</span><span class='id identifier rubyid_true_name'>true_name</span> <span class='op'>=</span> <span class='kw'>nil</span><span class='comma'>,</span> <span class='id identifier rubyid_false_name'>false_name</span> <span class='op'>=</span> <span class='kw'>nil</span><span class='rparen'>)</span>
|
845
|
+
<span class='id identifier rubyid_true_name'>true_name</span> <span class='op'>||=</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>Yes</span><span class='tstring_end'>"</span></span>
|
846
|
+
<span class='id identifier rubyid_false_name'>false_name</span> <span class='op'>||=</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>No</span><span class='tstring_end'>"</span></span>
|
847
|
+
<span class='ivar'>@boolean_names</span> <span class='op'>=</span> <span class='lbrace'>{</span><span class='kw'>true</span> <span class='op'>=></span> <span class='id identifier rubyid_true_name'>true_name</span><span class='comma'>,</span> <span class='kw'>false</span> <span class='op'>=></span> <span class='id identifier rubyid_false_name'>false_name</span><span class='rbrace'>}</span>
|
848
|
+
<span class='kw'>end</span></pre>
|
796
849
|
</td>
|
797
850
|
</tr>
|
798
851
|
</table>
|
@@ -885,6 +938,13 @@
|
|
885
938
|
<pre class="lines">
|
886
939
|
|
887
940
|
|
941
|
+
65
|
942
|
+
66
|
943
|
+
67
|
944
|
+
68
|
945
|
+
69
|
946
|
+
70
|
947
|
+
71
|
888
948
|
72
|
889
949
|
73
|
890
950
|
74
|
@@ -893,45 +953,27 @@
|
|
893
953
|
77
|
894
954
|
78
|
895
955
|
79
|
896
|
-
80
|
897
|
-
81
|
898
|
-
82
|
899
|
-
83
|
900
|
-
84
|
901
|
-
85
|
902
|
-
86
|
903
|
-
87
|
904
|
-
88
|
905
|
-
89
|
906
|
-
90
|
907
|
-
91
|
908
|
-
92</pre>
|
956
|
+
80</pre>
|
909
957
|
</td>
|
910
958
|
<td>
|
911
|
-
<pre class="code"><span class="info file"># File 'lib/lazier/settings.rb', line
|
912
|
-
|
913
|
-
<span class='
|
914
|
-
<span class='
|
915
|
-
|
916
|
-
|
917
|
-
|
918
|
-
<span class='
|
919
|
-
|
920
|
-
|
921
|
-
|
922
|
-
<span class='
|
923
|
-
|
924
|
-
|
925
|
-
|
926
|
-
|
927
|
-
|
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>
|
959
|
+
<pre class="code"><span class="info file"># File 'lib/lazier/settings.rb', line 65</span>
|
960
|
+
|
961
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_setup_date_formats'>setup_date_formats</span><span class='lparen'>(</span><span class='id identifier rubyid_formats'>formats</span> <span class='op'>=</span> <span class='kw'>nil</span><span class='comma'>,</span> <span class='id identifier rubyid_replace'>replace</span> <span class='op'>=</span> <span class='kw'>false</span><span class='rparen'>)</span>
|
962
|
+
<span class='id identifier rubyid_formats'>formats</span> <span class='op'>=</span> <span class='lbrace'>{</span><span class='label'>ct_date:</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>%Y-%m-%d</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='label'>ct_time:</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>%H:%M:%S</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='label'>ct_date_time:</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>%F %T</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='label'>ct_iso_8601:</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>%FT%T%z</span><span class='tstring_end'>"</span></span> <span class='rbrace'>}</span> <span class='kw'>if</span> <span class='id identifier rubyid_formats'>formats</span><span class='period'>.</span><span class='id identifier rubyid_blank?'>blank?</span>
|
963
|
+
|
964
|
+
<span class='kw'>if</span> <span class='id identifier rubyid_formats'>formats</span><span class='period'>.</span><span class='id identifier rubyid_is_a?'>is_a?</span><span class='lparen'>(</span><span class='op'>::</span><span class='const'>Hash</span><span class='rparen'>)</span> <span class='kw'>then</span>
|
965
|
+
<span class='kw'>if</span> <span class='op'>!</span><span class='id identifier rubyid_replace'>replace</span> <span class='kw'>then</span>
|
966
|
+
<span class='ivar'>@date_formats</span> <span class='op'>||=</span> <span class='lbrace'>{</span><span class='rbrace'>}</span>
|
967
|
+
<span class='ivar'>@date_formats</span><span class='period'>.</span><span class='id identifier rubyid_merge!'>merge!</span><span class='lparen'>(</span><span class='id identifier rubyid_formats'>formats</span><span class='rparen'>)</span>
|
968
|
+
<span class='kw'>else</span>
|
969
|
+
<span class='ivar'>@date_formats</span> <span class='op'>=</span> <span class='id identifier rubyid_formats'>formats</span>
|
970
|
+
<span class='kw'>end</span>
|
971
|
+
|
972
|
+
<span class='ivar'>@date_formats</span><span class='period'>.</span><span class='id identifier rubyid_each_pair'>each_pair</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_k'>k</span><span class='comma'>,</span> <span class='id identifier rubyid_v'>v</span><span class='op'>|</span> <span class='op'>::</span><span class='const'>Time</span><span class='op'>::</span><span class='const'>DATE_FORMATS</span><span class='lbracket'>[</span><span class='id identifier rubyid_k'>k</span><span class='rbracket'>]</span> <span class='op'>=</span> <span class='id identifier rubyid_v'>v</span> <span class='kw'>end</span>
|
973
|
+
<span class='kw'>end</span>
|
974
|
+
|
975
|
+
<span class='ivar'>@date_formats</span>
|
976
|
+
<span class='kw'>end</span></pre>
|
935
977
|
</td>
|
936
978
|
</tr>
|
937
979
|
</table>
|
@@ -1062,37 +1104,26 @@
|
|
1062
1104
|
<pre class="lines">
|
1063
1105
|
|
1064
1106
|
|
1065
|
-
|
1066
|
-
|
1067
|
-
|
1068
|
-
|
1069
|
-
|
1070
|
-
|
1071
|
-
|
1072
|
-
|
1073
|
-
112
|
1074
|
-
113
|
1075
|
-
114
|
1076
|
-
115
|
1077
|
-
116</pre>
|
1107
|
+
92
|
1108
|
+
93
|
1109
|
+
94
|
1110
|
+
95
|
1111
|
+
96
|
1112
|
+
97
|
1113
|
+
98
|
1114
|
+
99</pre>
|
1078
1115
|
</td>
|
1079
1116
|
<td>
|
1080
|
-
<pre class="code"><span class="info file"># File 'lib/lazier/settings.rb', line
|
1081
|
-
|
1082
|
-
<span class='
|
1083
|
-
<span class='
|
1084
|
-
<span class='
|
1085
|
-
<span class='
|
1086
|
-
<span class='
|
1087
|
-
|
1088
|
-
<span class='
|
1089
|
-
|
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>
|
1117
|
+
<pre class="code"><span class="info file"># File 'lib/lazier/settings.rb', line 92</span>
|
1118
|
+
|
1119
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_setup_date_names'>setup_date_names</span><span class='lparen'>(</span><span class='id identifier rubyid_long_months'>long_months</span> <span class='op'>=</span> <span class='kw'>nil</span><span class='comma'>,</span> <span class='id identifier rubyid_short_months'>short_months</span> <span class='op'>=</span> <span class='kw'>nil</span><span class='comma'>,</span> <span class='id identifier rubyid_long_days'>long_days</span> <span class='op'>=</span> <span class='kw'>nil</span><span class='comma'>,</span> <span class='id identifier rubyid_short_days'>short_days</span> <span class='op'>=</span> <span class='kw'>nil</span><span class='rparen'>)</span>
|
1120
|
+
<span class='id identifier rubyid_long_months'>long_months</span> <span class='op'>=</span> <span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>January</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>February</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>March</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>April</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>May</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>June</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>July</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>August</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>September</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>October</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>November</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>December</span><span class='tstring_end'>"</span></span><span class='rbracket'>]</span> <span class='kw'>if</span> <span class='id identifier rubyid_long_months'>long_months</span><span class='period'>.</span><span class='id identifier rubyid_blank?'>blank?</span>
|
1121
|
+
<span class='id identifier rubyid_short_months'>short_months</span> <span class='op'>=</span> <span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>Jan</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>Feb</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>Mar</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>Apr</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>May</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>Jun</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>Jul</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>Aug</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>Sep</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>Oct</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>Nov</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>Dec</span><span class='tstring_end'>"</span></span><span class='rbracket'>]</span> <span class='kw'>if</span> <span class='id identifier rubyid_short_months'>short_months</span><span class='period'>.</span><span class='id identifier rubyid_blank?'>blank?</span>
|
1122
|
+
<span class='id identifier rubyid_long_days'>long_days</span> <span class='op'>=</span> <span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>Sunday</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>Monday</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>Tuesday</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>Wednesday</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>Thursday</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>Friday</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>Saturday</span><span class='tstring_end'>"</span></span><span class='rbracket'>]</span> <span class='kw'>if</span> <span class='id identifier rubyid_long_days'>long_days</span><span class='period'>.</span><span class='id identifier rubyid_blank?'>blank?</span>
|
1123
|
+
<span class='id identifier rubyid_short_days'>short_days</span> <span class='op'>=</span> <span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>Sun</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>Mon</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>Tue</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>Wed</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>Thu</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>Fri</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>Sat</span><span class='tstring_end'>"</span></span><span class='rbracket'>]</span> <span class='kw'>if</span> <span class='id identifier rubyid_short_days'>short_days</span><span class='period'>.</span><span class='id identifier rubyid_blank?'>blank?</span>
|
1124
|
+
|
1125
|
+
<span class='ivar'>@date_names</span> <span class='op'>=</span> <span class='lbrace'>{</span> <span class='label'>long_months:</span> <span class='id identifier rubyid_long_months'>long_months</span><span class='comma'>,</span> <span class='label'>short_months:</span> <span class='id identifier rubyid_short_months'>short_months</span><span class='comma'>,</span> <span class='label'>long_days:</span> <span class='id identifier rubyid_long_days'>long_days</span><span class='comma'>,</span> <span class='label'>short_days:</span> <span class='id identifier rubyid_short_days'>short_days</span> <span class='rbrace'>}</span>
|
1126
|
+
<span class='kw'>end</span></pre>
|
1096
1127
|
</td>
|
1097
1128
|
</tr>
|
1098
1129
|
</table>
|
@@ -1219,27 +1250,16 @@
|
|
1219
1250
|
<pre class="lines">
|
1220
1251
|
|
1221
1252
|
|
1222
|
-
|
1223
|
-
|
1224
|
-
|
1225
|
-
48
|
1226
|
-
49
|
1227
|
-
50
|
1228
|
-
51
|
1229
|
-
52</pre>
|
1253
|
+
43
|
1254
|
+
44
|
1255
|
+
45</pre>
|
1230
1256
|
</td>
|
1231
1257
|
<td>
|
1232
|
-
<pre class="code"><span class="info file"># File 'lib/lazier/settings.rb', line
|
1233
|
-
|
1234
|
-
<span class='
|
1235
|
-
<span class='
|
1236
|
-
|
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>
|
1258
|
+
<pre class="code"><span class="info file"># File 'lib/lazier/settings.rb', line 43</span>
|
1259
|
+
|
1260
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_setup_format_number'>setup_format_number</span><span class='lparen'>(</span><span class='id identifier rubyid_prec'>prec</span> <span class='op'>=</span> <span class='int'>2</span><span class='comma'>,</span> <span class='id identifier rubyid_decimal_separator'>decimal_separator</span> <span class='op'>=</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>.</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='id identifier rubyid_add_string'>add_string</span> <span class='op'>=</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='id identifier rubyid_k_separator'>k_separator</span> <span class='op'>=</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>,</span><span class='tstring_end'>"</span></span><span class='rparen'>)</span>
|
1261
|
+
<span class='ivar'>@format_number</span> <span class='op'>=</span> <span class='lbrace'>{</span> <span class='label'>prec:</span> <span class='id identifier rubyid_prec'>prec</span><span class='comma'>,</span> <span class='label'>decimal_separator:</span> <span class='id identifier rubyid_decimal_separator'>decimal_separator</span><span class='comma'>,</span> <span class='label'>add_string:</span> <span class='id identifier rubyid_add_string'>add_string</span><span class='comma'>,</span> <span class='label'>k_separator:</span> <span class='id identifier rubyid_k_separator'>k_separator</span><span class='rbrace'>}</span>
|
1262
|
+
<span class='kw'>end</span></pre>
|
1243
1263
|
</td>
|
1244
1264
|
</tr>
|
1245
1265
|
</table>
|
@@ -1250,9 +1270,9 @@
|
|
1250
1270
|
</div>
|
1251
1271
|
|
1252
1272
|
<div id="footer">
|
1253
|
-
Generated on
|
1273
|
+
Generated on Mon Jan 28 20:23:46 2013 by
|
1254
1274
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
1255
|
-
0.8.
|
1275
|
+
0.8.3 (ruby-1.9.3).
|
1256
1276
|
</div>
|
1257
1277
|
|
1258
1278
|
</body>
|