lazier 2.3.1 → 2.4.0
Sign up to get free protection for your applications and to get access to all the features.
- data/doc/Lazier.html +34 -305
- data/doc/Lazier/Boolean.html +1 -1
- data/doc/Lazier/DateTime.html +1 -1
- data/doc/Lazier/DateTime/ClassMethods.html +1 -1
- 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 +404 -0
- 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 +242 -77
- data/doc/Lazier/String.html +1 -1
- data/doc/Lazier/TimeZone.html +1 -1
- data/doc/Lazier/TimeZone/ClassMethods.html +1 -1
- data/doc/Lazier/Version.html +1 -1
- data/doc/_index.html +23 -8
- data/doc/class_list.html +1 -1
- data/doc/file.README.html +1 -1
- data/doc/index.html +1 -1
- data/doc/method_list.html +73 -57
- data/doc/top-level-namespace.html +1 -1
- data/lib/lazier.rb +1 -27
- data/lib/lazier/i18n.rb +42 -0
- data/lib/lazier/settings.rb +25 -6
- data/lib/lazier/version.rb +2 -2
- data/spec/lazier/datetime_spec.rb +4 -4
- data/spec/lazier/i18n_spec.rb +63 -0
- data/spec/lazier/settings_spec.rb +2 -0
- data/spec/lazier_spec.rb +0 -34
- metadata +5 -1
data/doc/Lazier.html
CHANGED
@@ -80,7 +80,7 @@
|
|
80
80
|
|
81
81
|
<dt class="r1 last">Defined in:</dt>
|
82
82
|
<dd class="r1 last">lib/lazier.rb<span class="defines">,<br />
|
83
|
-
lib/lazier/math.rb,<br /> lib/lazier/hash.rb,<br /> lib/lazier/string.rb,<br /> lib/lazier/object.rb,<br /> lib/lazier/boolean.rb,<br /> lib/lazier/version.rb,<br /> lib/lazier/pathname.rb,<br /> lib/lazier/settings.rb,<br /> lib/lazier/datetime.rb,<br /> lib/lazier/exceptions.rb</span>
|
83
|
+
lib/lazier/math.rb,<br /> lib/lazier/i18n.rb,<br /> lib/lazier/hash.rb,<br /> lib/lazier/string.rb,<br /> lib/lazier/object.rb,<br /> lib/lazier/boolean.rb,<br /> lib/lazier/version.rb,<br /> lib/lazier/pathname.rb,<br /> lib/lazier/settings.rb,<br /> lib/lazier/datetime.rb,<br /> lib/lazier/exceptions.rb</span>
|
84
84
|
</dd>
|
85
85
|
|
86
86
|
</dl>
|
@@ -101,7 +101,7 @@ Licensed under the MIT license, which can be found at <a href="http://www.openso
|
|
101
101
|
<p class="children">
|
102
102
|
|
103
103
|
|
104
|
-
<strong class="modules">Modules:</strong> <span class='object_link'><a href="Lazier/Boolean.html" title="Lazier::Boolean (module)">Boolean</a></span>, <span class='object_link'><a href="Lazier/DateTime.html" title="Lazier::DateTime (module)">DateTime</a></span>, <span class='object_link'><a href="Lazier/Exceptions.html" title="Lazier::Exceptions (module)">Exceptions</a></span>, <span class='object_link'><a href="Lazier/Hash.html" title="Lazier::Hash (module)">Hash</a></span>, <span class='object_link'><a href="Lazier/Math.html" title="Lazier::Math (module)">Math</a></span>, <span class='object_link'><a href="Lazier/Object.html" title="Lazier::Object (module)">Object</a></span>, <span class='object_link'><a href="Lazier/Pathname.html" title="Lazier::Pathname (module)">Pathname</a></span>, <span class='object_link'><a href="Lazier/String.html" title="Lazier::String (module)">String</a></span>, <span class='object_link'><a href="Lazier/TimeZone.html" title="Lazier::TimeZone (module)">TimeZone</a></span>, <span class='object_link'><a href="Lazier/Version.html" title="Lazier::Version (module)">Version</a></span>
|
104
|
+
<strong class="modules">Modules:</strong> <span class='object_link'><a href="Lazier/Boolean.html" title="Lazier::Boolean (module)">Boolean</a></span>, <span class='object_link'><a href="Lazier/DateTime.html" title="Lazier::DateTime (module)">DateTime</a></span>, <span class='object_link'><a href="Lazier/Exceptions.html" title="Lazier::Exceptions (module)">Exceptions</a></span>, <span class='object_link'><a href="Lazier/Hash.html" title="Lazier::Hash (module)">Hash</a></span>, <span class='object_link'><a href="Lazier/I18n.html" title="Lazier::I18n (module)">I18n</a></span>, <span class='object_link'><a href="Lazier/Math.html" title="Lazier::Math (module)">Math</a></span>, <span class='object_link'><a href="Lazier/Object.html" title="Lazier::Object (module)">Object</a></span>, <span class='object_link'><a href="Lazier/Pathname.html" title="Lazier::Pathname (module)">Pathname</a></span>, <span class='object_link'><a href="Lazier/String.html" title="Lazier::String (module)">String</a></span>, <span class='object_link'><a href="Lazier/TimeZone.html" title="Lazier::TimeZone (module)">TimeZone</a></span>, <span class='object_link'><a href="Lazier/Version.html" title="Lazier::Version (module)">Version</a></span>
|
105
105
|
|
106
106
|
|
107
107
|
|
@@ -127,29 +127,6 @@ Licensed under the MIT license, which can be found at <a href="http://www.openso
|
|
127
127
|
<li class="public ">
|
128
128
|
<span class="summary_signature">
|
129
129
|
|
130
|
-
<a href="#i18n-class_method" title="i18n (class method)">+ (R18N::Translation) <strong>i18n</strong> </a>
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
</span>
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
<span class="summary_desc"><div class='inline'><p>Get the list of available translation for the current locale.</p>
|
145
|
-
</div></span>
|
146
|
-
|
147
|
-
</li>
|
148
|
-
|
149
|
-
|
150
|
-
<li class="public ">
|
151
|
-
<span class="summary_signature">
|
152
|
-
|
153
130
|
<a href="#load%21-class_method" title="load! (class method)">+ (Settings) <strong>load!</strong>(*what) </a>
|
154
131
|
|
155
132
|
|
@@ -328,52 +305,6 @@ Licensed under the MIT license, which can be found at <a href="http://www.openso
|
|
328
305
|
<span class="summary_desc"><div class='inline'><p>Loads String extensions.</p>
|
329
306
|
</div></span>
|
330
307
|
|
331
|
-
</li>
|
332
|
-
|
333
|
-
|
334
|
-
<li class="public ">
|
335
|
-
<span class="summary_signature">
|
336
|
-
|
337
|
-
<a href="#localize-class_method" title="localize (class method)">+ (R18n::Translation) <strong>localize</strong>(locale = nil) </a>
|
338
|
-
|
339
|
-
|
340
|
-
|
341
|
-
</span>
|
342
|
-
|
343
|
-
|
344
|
-
|
345
|
-
|
346
|
-
|
347
|
-
|
348
|
-
|
349
|
-
|
350
|
-
|
351
|
-
<span class="summary_desc"><div class='inline'><p>Set the current locale for messages.</p>
|
352
|
-
</div></span>
|
353
|
-
|
354
|
-
</li>
|
355
|
-
|
356
|
-
|
357
|
-
<li class="public ">
|
358
|
-
<span class="summary_signature">
|
359
|
-
|
360
|
-
<a href="#localized%3F-class_method" title="localized? (class method)">+ (Boolean) <strong>localized?</strong> </a>
|
361
|
-
|
362
|
-
|
363
|
-
|
364
|
-
</span>
|
365
|
-
|
366
|
-
|
367
|
-
|
368
|
-
|
369
|
-
|
370
|
-
|
371
|
-
|
372
|
-
|
373
|
-
|
374
|
-
<span class="summary_desc"><div class='inline'><p>Check whether the i18n support have been enabled.</p>
|
375
|
-
</div></span>
|
376
|
-
|
377
308
|
</li>
|
378
309
|
|
379
310
|
|
@@ -410,66 +341,7 @@ Licensed under the MIT license, which can be found at <a href="http://www.openso
|
|
410
341
|
|
411
342
|
|
412
343
|
<div class="method_details first">
|
413
|
-
<h3 class="signature first" id="
|
414
|
-
|
415
|
-
+ (<tt>R18N::Translation</tt>) <strong>i18n</strong>
|
416
|
-
|
417
|
-
|
418
|
-
|
419
|
-
|
420
|
-
|
421
|
-
</h3><div class="docstring">
|
422
|
-
<div class="discussion">
|
423
|
-
<p>Get the list of available translation for the current locale.</p>
|
424
|
-
|
425
|
-
|
426
|
-
</div>
|
427
|
-
</div>
|
428
|
-
<div class="tags">
|
429
|
-
|
430
|
-
<p class="tag_title">Returns:</p>
|
431
|
-
<ul class="return">
|
432
|
-
|
433
|
-
<li>
|
434
|
-
|
435
|
-
|
436
|
-
<span class='type'>(<tt>R18N::Translation</tt>)</span>
|
437
|
-
|
438
|
-
|
439
|
-
|
440
|
-
—
|
441
|
-
<div class='inline'><p>The translation object.</p>
|
442
|
-
</div>
|
443
|
-
|
444
|
-
</li>
|
445
|
-
|
446
|
-
</ul>
|
447
|
-
|
448
|
-
</div><table class="source_code">
|
449
|
-
<tr>
|
450
|
-
<td>
|
451
|
-
<pre class="lines">
|
452
|
-
|
453
|
-
|
454
|
-
132
|
455
|
-
133
|
456
|
-
134
|
457
|
-
135</pre>
|
458
|
-
</td>
|
459
|
-
<td>
|
460
|
-
<pre class="code"><span class="info file"># File 'lib/lazier.rb', line 132</span>
|
461
|
-
|
462
|
-
<span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_i18n'>i18n</span>
|
463
|
-
<span class='const'>Lazier</span><span class='period'>.</span><span class='id identifier rubyid_localize'>localize</span> <span class='kw'>if</span> <span class='op'>!</span><span class='const'>Lazier</span><span class='period'>.</span><span class='id identifier rubyid_localized?'>localized?</span>
|
464
|
-
<span class='ivar'>@i18n</span>
|
465
|
-
<span class='kw'>end</span></pre>
|
466
|
-
</td>
|
467
|
-
</tr>
|
468
|
-
</table>
|
469
|
-
</div>
|
470
|
-
|
471
|
-
<div class="method_details ">
|
472
|
-
<h3 class="signature " id="load!-class_method">
|
344
|
+
<h3 class="signature first" id="load!-class_method">
|
473
345
|
|
474
346
|
+ (<tt><span class='object_link'><a href="Lazier/Settings.html" title="Lazier::Settings (class)">Settings</a></span></tt>) <strong>load!</strong>(*what)
|
475
347
|
|
@@ -543,16 +415,12 @@ Licensed under the MIT license, which can be found at <a href="http://www.openso
|
|
543
415
|
49
|
544
416
|
50
|
545
417
|
51
|
546
|
-
52
|
547
|
-
53
|
548
|
-
54</pre>
|
418
|
+
52</pre>
|
549
419
|
</td>
|
550
420
|
<td>
|
551
421
|
<pre class="code"><span class="info file"># File 'lib/lazier.rb', line 46</span>
|
552
422
|
|
553
423
|
<span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_load!'>load!</span><span class='lparen'>(</span><span class='op'>*</span><span class='id identifier rubyid_what'>what</span><span class='rparen'>)</span>
|
554
|
-
<span class='op'>::</span><span class='const'>Lazier</span><span class='period'>.</span><span class='id identifier rubyid_localize'>localize</span> <span class='kw'>if</span> <span class='op'>!</span><span class='const'>Lazier</span><span class='period'>.</span><span class='id identifier rubyid_localized?'>localized?</span>
|
555
|
-
|
556
424
|
<span class='id identifier rubyid_what'>what</span> <span class='op'>=</span> <span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>object</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>boolean</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>string</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>hash</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>datetime</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>math</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>pathname</span><span class='tstring_end'>"</span></span><span class='rbracket'>]</span> <span class='kw'>if</span> <span class='id identifier rubyid_what'>what</span><span class='period'>.</span><span class='id identifier rubyid_count'>count</span> <span class='op'>==</span> <span class='int'>0</span>
|
557
425
|
<span class='id identifier rubyid_what'>what</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_w'>w</span><span class='op'>|</span> <span class='op'>::</span><span class='const'>Lazier</span><span class='period'>.</span><span class='id identifier rubyid_send'>send</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>load_</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_w'>w</span><span class='rbrace'>}</span><span class='tstring_end'>"</span></span><span class='rparen'>)</span> <span class='rbrace'>}</span>
|
558
426
|
|
@@ -589,6 +457,8 @@ Licensed under the MIT license, which can be found at <a href="http://www.openso
|
|
589
457
|
<pre class="lines">
|
590
458
|
|
591
459
|
|
460
|
+
62
|
461
|
+
63
|
592
462
|
64
|
593
463
|
65
|
594
464
|
66
|
@@ -597,12 +467,10 @@ Licensed under the MIT license, which can be found at <a href="http://www.openso
|
|
597
467
|
69
|
598
468
|
70
|
599
469
|
71
|
600
|
-
72
|
601
|
-
73
|
602
|
-
74</pre>
|
470
|
+
72</pre>
|
603
471
|
</td>
|
604
472
|
<td>
|
605
|
-
<pre class="code"><span class="info file"># File 'lib/lazier.rb', line
|
473
|
+
<pre class="code"><span class="info file"># File 'lib/lazier.rb', line 62</span>
|
606
474
|
|
607
475
|
<span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_load_boolean'>load_boolean</span>
|
608
476
|
<span class='op'>::</span><span class='const'>TrueClass</span><span class='period'>.</span><span class='id identifier rubyid_class_eval'>class_eval</span> <span class='kw'>do</span>
|
@@ -645,6 +513,8 @@ Licensed under the MIT license, which can be found at <a href="http://www.openso
|
|
645
513
|
<pre class="lines">
|
646
514
|
|
647
515
|
|
516
|
+
89
|
517
|
+
90
|
648
518
|
91
|
649
519
|
92
|
650
520
|
93
|
@@ -661,12 +531,10 @@ Licensed under the MIT license, which can be found at <a href="http://www.openso
|
|
661
531
|
104
|
662
532
|
105
|
663
533
|
106
|
664
|
-
107
|
665
|
-
108
|
666
|
-
109</pre>
|
534
|
+
107</pre>
|
667
535
|
</td>
|
668
536
|
<td>
|
669
|
-
<pre class="code"><span class="info file"># File 'lib/lazier.rb', line
|
537
|
+
<pre class="code"><span class="info file"># File 'lib/lazier.rb', line 89</span>
|
670
538
|
|
671
539
|
<span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_load_datetime'>load_datetime</span>
|
672
540
|
<span class='const'>Lazier</span><span class='period'>.</span><span class='id identifier rubyid_load_object'>load_object</span>
|
@@ -717,14 +585,14 @@ Licensed under the MIT license, which can be found at <a href="http://www.openso
|
|
717
585
|
<pre class="lines">
|
718
586
|
|
719
587
|
|
588
|
+
82
|
589
|
+
83
|
720
590
|
84
|
721
591
|
85
|
722
|
-
86
|
723
|
-
87
|
724
|
-
88</pre>
|
592
|
+
86</pre>
|
725
593
|
</td>
|
726
594
|
<td>
|
727
|
-
<pre class="code"><span class="info file"># File 'lib/lazier.rb', line
|
595
|
+
<pre class="code"><span class="info file"># File 'lib/lazier.rb', line 82</span>
|
728
596
|
|
729
597
|
<span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_load_hash'>load_hash</span>
|
730
598
|
<span class='op'>::</span><span class='const'>Hash</span><span class='period'>.</span><span class='id identifier rubyid_class_eval'>class_eval</span> <span class='kw'>do</span>
|
@@ -761,16 +629,16 @@ Licensed under the MIT license, which can be found at <a href="http://www.openso
|
|
761
629
|
<pre class="lines">
|
762
630
|
|
763
631
|
|
632
|
+
110
|
633
|
+
111
|
764
634
|
112
|
765
635
|
113
|
766
636
|
114
|
767
637
|
115
|
768
|
-
116
|
769
|
-
117
|
770
|
-
118</pre>
|
638
|
+
116</pre>
|
771
639
|
</td>
|
772
640
|
<td>
|
773
|
-
<pre class="code"><span class="info file"># File 'lib/lazier.rb', line
|
641
|
+
<pre class="code"><span class="info file"># File 'lib/lazier.rb', line 110</span>
|
774
642
|
|
775
643
|
<span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_load_math'>load_math</span>
|
776
644
|
<span class='const'>Lazier</span><span class='period'>.</span><span class='id identifier rubyid_load_object'>load_object</span>
|
@@ -809,14 +677,14 @@ Licensed under the MIT license, which can be found at <a href="http://www.openso
|
|
809
677
|
<pre class="lines">
|
810
678
|
|
811
679
|
|
680
|
+
55
|
681
|
+
56
|
812
682
|
57
|
813
683
|
58
|
814
|
-
59
|
815
|
-
60
|
816
|
-
61</pre>
|
684
|
+
59</pre>
|
817
685
|
</td>
|
818
686
|
<td>
|
819
|
-
<pre class="code"><span class="info file"># File 'lib/lazier.rb', line
|
687
|
+
<pre class="code"><span class="info file"># File 'lib/lazier.rb', line 55</span>
|
820
688
|
|
821
689
|
<span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_load_object'>load_object</span>
|
822
690
|
<span class='op'>::</span><span class='const'>Object</span><span class='period'>.</span><span class='id identifier rubyid_class_eval'>class_eval</span> <span class='kw'>do</span>
|
@@ -853,16 +721,16 @@ Licensed under the MIT license, which can be found at <a href="http://www.openso
|
|
853
721
|
<pre class="lines">
|
854
722
|
|
855
723
|
|
724
|
+
119
|
725
|
+
120
|
856
726
|
121
|
857
727
|
122
|
858
728
|
123
|
859
729
|
124
|
860
|
-
125
|
861
|
-
126
|
862
|
-
127</pre>
|
730
|
+
125</pre>
|
863
731
|
</td>
|
864
732
|
<td>
|
865
|
-
<pre class="code"><span class="info file"># File 'lib/lazier.rb', line
|
733
|
+
<pre class="code"><span class="info file"># File 'lib/lazier.rb', line 119</span>
|
866
734
|
|
867
735
|
<span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_load_pathname'>load_pathname</span>
|
868
736
|
<span class='id identifier rubyid_require'>require</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>pathname</span><span class='tstring_end'>"</span></span>
|
@@ -901,14 +769,14 @@ Licensed under the MIT license, which can be found at <a href="http://www.openso
|
|
901
769
|
<pre class="lines">
|
902
770
|
|
903
771
|
|
772
|
+
75
|
773
|
+
76
|
904
774
|
77
|
905
775
|
78
|
906
|
-
79
|
907
|
-
80
|
908
|
-
81</pre>
|
776
|
+
79</pre>
|
909
777
|
</td>
|
910
778
|
<td>
|
911
|
-
<pre class="code"><span class="info file"># File 'lib/lazier.rb', line
|
779
|
+
<pre class="code"><span class="info file"># File 'lib/lazier.rb', line 75</span>
|
912
780
|
|
913
781
|
<span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_load_string'>load_string</span>
|
914
782
|
<span class='op'>::</span><span class='const'>String</span><span class='period'>.</span><span class='id identifier rubyid_class_eval'>class_eval</span> <span class='kw'>do</span>
|
@@ -918,143 +786,6 @@ Licensed under the MIT license, which can be found at <a href="http://www.openso
|
|
918
786
|
</td>
|
919
787
|
</tr>
|
920
788
|
</table>
|
921
|
-
</div>
|
922
|
-
|
923
|
-
<div class="method_details ">
|
924
|
-
<h3 class="signature " id="localize-class_method">
|
925
|
-
|
926
|
-
+ (<tt>R18n::Translation</tt>) <strong>localize</strong>(locale = nil)
|
927
|
-
|
928
|
-
|
929
|
-
|
930
|
-
|
931
|
-
|
932
|
-
</h3><div class="docstring">
|
933
|
-
<div class="discussion">
|
934
|
-
<p>Set the current locale for messages.</p>
|
935
|
-
|
936
|
-
|
937
|
-
</div>
|
938
|
-
</div>
|
939
|
-
<div class="tags">
|
940
|
-
<p class="tag_title">Parameters:</p>
|
941
|
-
<ul class="param">
|
942
|
-
|
943
|
-
<li>
|
944
|
-
|
945
|
-
<span class='name'>locale</span>
|
946
|
-
|
947
|
-
|
948
|
-
<span class='type'>(<tt><span class='object_link'><a href="Lazier/String.html" title="Lazier::String (module)">String</a></span></tt>)</span>
|
949
|
-
|
950
|
-
|
951
|
-
<em class="default">(defaults to: <tt>nil</tt>)</em>
|
952
|
-
|
953
|
-
|
954
|
-
—
|
955
|
-
<div class='inline'><p>The new locale. Default is the current system locale.</p>
|
956
|
-
</div>
|
957
|
-
|
958
|
-
</li>
|
959
|
-
|
960
|
-
</ul>
|
961
|
-
|
962
|
-
<p class="tag_title">Returns:</p>
|
963
|
-
<ul class="return">
|
964
|
-
|
965
|
-
<li>
|
966
|
-
|
967
|
-
|
968
|
-
<span class='type'>(<tt>R18n::Translation</tt>)</span>
|
969
|
-
|
970
|
-
|
971
|
-
|
972
|
-
—
|
973
|
-
<div class='inline'><p>The new translation object.</p>
|
974
|
-
</div>
|
975
|
-
|
976
|
-
</li>
|
977
|
-
|
978
|
-
</ul>
|
979
|
-
|
980
|
-
</div><table class="source_code">
|
981
|
-
<tr>
|
982
|
-
<td>
|
983
|
-
<pre class="lines">
|
984
|
-
|
985
|
-
|
986
|
-
141
|
987
|
-
142
|
988
|
-
143
|
989
|
-
144</pre>
|
990
|
-
</td>
|
991
|
-
<td>
|
992
|
-
<pre class="code"><span class="info file"># File 'lib/lazier.rb', line 141</span>
|
993
|
-
|
994
|
-
<span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_localize'>localize</span><span class='lparen'>(</span><span class='id identifier rubyid_locale'>locale</span> <span class='op'>=</span> <span class='kw'>nil</span><span class='rparen'>)</span>
|
995
|
-
<span class='ivar'>@i18n_locales_path</span> <span class='op'>||=</span> <span class='op'>::</span><span class='const'>File</span><span class='period'>.</span><span class='id identifier rubyid_absolute_path'>absolute_path</span><span class='lparen'>(</span><span class='op'>::</span><span class='const'>Pathname</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='op'>::</span><span class='const'>File</span><span class='period'>.</span><span class='id identifier rubyid_dirname'>dirname</span><span class='lparen'>(</span><span class='kw'>__FILE__</span><span class='rparen'>)</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_to_s'>to_s</span> <span class='op'>+</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>/../locales/</span><span class='tstring_end'>"</span></span><span class='rparen'>)</span>
|
996
|
-
<span class='ivar'>@i18n</span> <span class='op'>=</span> <span class='const'>R18n</span><span class='op'>::</span><span class='const'>I18n</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='lbracket'>[</span><span class='id identifier rubyid_locale'>locale</span><span class='comma'>,</span> <span class='const'>ENV</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>LANG</span><span class='tstring_end'>"</span></span><span class='rbracket'>]</span><span class='comma'>,</span> <span class='const'>R18n</span><span class='op'>::</span><span class='const'>I18n</span><span class='period'>.</span><span class='id identifier rubyid_system_locale'>system_locale</span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_compact'>compact</span><span class='comma'>,</span> <span class='ivar'>@i18n_locales_path</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_t'>t</span><span class='period'>.</span><span class='id identifier rubyid_lazier'>lazier</span>
|
997
|
-
<span class='kw'>end</span></pre>
|
998
|
-
</td>
|
999
|
-
</tr>
|
1000
|
-
</table>
|
1001
|
-
</div>
|
1002
|
-
|
1003
|
-
<div class="method_details ">
|
1004
|
-
<h3 class="signature " id="localized?-class_method">
|
1005
|
-
|
1006
|
-
+ (<tt><span class='object_link'><a href="Lazier/Boolean.html" title="Lazier::Boolean (module)">Boolean</a></span></tt>) <strong>localized?</strong>
|
1007
|
-
|
1008
|
-
|
1009
|
-
|
1010
|
-
|
1011
|
-
|
1012
|
-
</h3><div class="docstring">
|
1013
|
-
<div class="discussion">
|
1014
|
-
<p>Check whether the i18n support have been enabled.</p>
|
1015
|
-
|
1016
|
-
|
1017
|
-
</div>
|
1018
|
-
</div>
|
1019
|
-
<div class="tags">
|
1020
|
-
|
1021
|
-
<p class="tag_title">Returns:</p>
|
1022
|
-
<ul class="return">
|
1023
|
-
|
1024
|
-
<li>
|
1025
|
-
|
1026
|
-
|
1027
|
-
<span class='type'>(<tt><span class='object_link'><a href="Lazier/Boolean.html" title="Lazier::Boolean (module)">Boolean</a></span></tt>)</span>
|
1028
|
-
|
1029
|
-
|
1030
|
-
|
1031
|
-
—
|
1032
|
-
<div class='inline'><p>Whether the i18n support have been enabled or not.</p>
|
1033
|
-
</div>
|
1034
|
-
|
1035
|
-
</li>
|
1036
|
-
|
1037
|
-
</ul>
|
1038
|
-
|
1039
|
-
</div><table class="source_code">
|
1040
|
-
<tr>
|
1041
|
-
<td>
|
1042
|
-
<pre class="lines">
|
1043
|
-
|
1044
|
-
|
1045
|
-
149
|
1046
|
-
150
|
1047
|
-
151</pre>
|
1048
|
-
</td>
|
1049
|
-
<td>
|
1050
|
-
<pre class="code"><span class="info file"># File 'lib/lazier.rb', line 149</span>
|
1051
|
-
|
1052
|
-
<span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_localized?'>localized?</span>
|
1053
|
-
<span class='ivar'>@i18n</span><span class='period'>.</span><span class='id identifier rubyid_present?'>present?</span>
|
1054
|
-
<span class='kw'>end</span></pre>
|
1055
|
-
</td>
|
1056
|
-
</tr>
|
1057
|
-
</table>
|
1058
789
|
</div>
|
1059
790
|
|
1060
791
|
<div class="method_details ">
|
@@ -1099,16 +830,14 @@ Licensed under the MIT license, which can be found at <a href="http://www.openso
|
|
1099
830
|
<pre class="lines">
|
1100
831
|
|
1101
832
|
|
1102
|
-
29
|
1103
833
|
30
|
1104
834
|
31
|
1105
835
|
32</pre>
|
1106
836
|
</td>
|
1107
837
|
<td>
|
1108
|
-
<pre class="code"><span class="info file"># File 'lib/lazier.rb', line
|
838
|
+
<pre class="code"><span class="info file"># File 'lib/lazier.rb', line 30</span>
|
1109
839
|
|
1110
840
|
<span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_settings'>settings</span>
|
1111
|
-
<span class='op'>::</span><span class='const'>Lazier</span><span class='period'>.</span><span class='id identifier rubyid_localize'>localize</span> <span class='kw'>if</span> <span class='op'>!</span><span class='const'>Lazier</span><span class='period'>.</span><span class='id identifier rubyid_localized?'>localized?</span>
|
1112
841
|
<span class='op'>::</span><span class='const'>Lazier</span><span class='op'>::</span><span class='const'>Settings</span><span class='period'>.</span><span class='id identifier rubyid_instance'>instance</span>
|
1113
842
|
<span class='kw'>end</span></pre>
|
1114
843
|
</td>
|
@@ -1121,7 +850,7 @@ Licensed under the MIT license, which can be found at <a href="http://www.openso
|
|
1121
850
|
</div>
|
1122
851
|
|
1123
852
|
<div id="footer">
|
1124
|
-
Generated on Tue Jan 29
|
853
|
+
Generated on Tue Jan 29 20:37:32 2013 by
|
1125
854
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
1126
855
|
0.8.3 (ruby-1.9.3).
|
1127
856
|
</div>
|