lazier 2.0.0 → 2.1.0
Sign up to get free protection for your applications and to get access to all the features.
- data/doc/Lazier.html +315 -60
- 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/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 +7 -7
- 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 +2 -2
- data/doc/_index.html +1 -1
- data/doc/file.README.html +1 -1
- data/doc/index.html +1 -1
- data/doc/method_list.html +96 -72
- data/doc/top-level-namespace.html +1 -1
- data/lazier.gemspec +1 -0
- data/lib/lazier.rb +30 -2
- data/lib/lazier/settings.rb +6 -6
- data/lib/lazier/version.rb +1 -1
- data/locales/en.yml +53 -0
- data/locales/it.yml +52 -0
- data/spec/lazier_spec.rb +40 -0
- metadata +19 -1
data/doc/Lazier.html
CHANGED
@@ -127,6 +127,29 @@ 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)">+ (Object) <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
|
+
|
130
153
|
<a href="#load%21-class_method" title="load! (class method)">+ (Settings) <strong>load!</strong>(*what) </a>
|
131
154
|
|
132
155
|
|
@@ -305,6 +328,52 @@ Licensed under the MIT license, which can be found at <a href="http://www.openso
|
|
305
328
|
<span class="summary_desc"><div class='inline'><p>Loads String extensions.</p>
|
306
329
|
</div></span>
|
307
330
|
|
331
|
+
</li>
|
332
|
+
|
333
|
+
|
334
|
+
<li class="public ">
|
335
|
+
<span class="summary_signature">
|
336
|
+
|
337
|
+
<a href="#localize-class_method" title="localize (class method)">+ (Object) <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
|
+
|
308
377
|
</li>
|
309
378
|
|
310
379
|
|
@@ -341,7 +410,66 @@ Licensed under the MIT license, which can be found at <a href="http://www.openso
|
|
341
410
|
|
342
411
|
|
343
412
|
<div class="method_details first">
|
344
|
-
<h3 class="signature first" id="
|
413
|
+
<h3 class="signature first" id="i18n-class_method">
|
414
|
+
|
415
|
+
+ (<tt><span class='object_link'><a href="Lazier/Object.html" title="Lazier::Object (module)">Object</a></span></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'></span>
|
437
|
+
|
438
|
+
|
439
|
+
|
440
|
+
|
441
|
+
<div class='inline'><p>The translation</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='op'>::</span><span class='const'>R18n</span><span class='period'>.</span><span class='id identifier rubyid_get'>get</span><span class='period'>.</span><span class='id identifier rubyid_try'>try</span><span class='lparen'>(</span><span class='symbol'>:t</span><span class='rparen'>)</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">
|
345
473
|
|
346
474
|
+ (<tt><span class='object_link'><a href="Lazier/Settings.html" title="Lazier::Settings (class)">Settings</a></span></tt>) <strong>load!</strong>(*what)
|
347
475
|
|
@@ -370,8 +498,9 @@ Licensed under the MIT license, which can be found at <a href="http://www.openso
|
|
370
498
|
|
371
499
|
|
372
500
|
—
|
373
|
-
<div class='inline'><p>The modules to load. Valid values are
|
374
|
-
|
501
|
+
<div class='inline'><p>The modules to load. Valid values are:</p>
|
502
|
+
|
503
|
+
<p>@option object Extensions for all objects.
|
375
504
|
@option boolean Extensions for boolean values.
|
376
505
|
@option string Extensions for strings.
|
377
506
|
@option hash Extensions for hashs.
|
@@ -408,20 +537,24 @@ Licensed under the MIT license, which can be found at <a href="http://www.openso
|
|
408
537
|
<pre class="lines">
|
409
538
|
|
410
539
|
|
411
|
-
43
|
412
|
-
44
|
413
|
-
45
|
414
540
|
46
|
415
541
|
47
|
416
542
|
48
|
417
|
-
49
|
543
|
+
49
|
544
|
+
50
|
545
|
+
51
|
546
|
+
52
|
547
|
+
53
|
548
|
+
54</pre>
|
418
549
|
</td>
|
419
550
|
<td>
|
420
|
-
<pre class="code"><span class="info file"># File 'lib/lazier.rb', line
|
551
|
+
<pre class="code"><span class="info file"># File 'lib/lazier.rb', line 46</span>
|
421
552
|
|
422
553
|
<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
|
+
|
423
556
|
<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>
|
424
|
-
<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='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>
|
557
|
+
<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>
|
425
558
|
|
426
559
|
<span class='kw'>yield</span> <span class='kw'>if</span> <span class='id identifier rubyid_block_given?'>block_given?</span>
|
427
560
|
<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>
|
@@ -456,20 +589,20 @@ Licensed under the MIT license, which can be found at <a href="http://www.openso
|
|
456
589
|
<pre class="lines">
|
457
590
|
|
458
591
|
|
459
|
-
59
|
460
|
-
60
|
461
|
-
61
|
462
|
-
62
|
463
|
-
63
|
464
592
|
64
|
465
593
|
65
|
466
594
|
66
|
467
595
|
67
|
468
596
|
68
|
469
|
-
69
|
597
|
+
69
|
598
|
+
70
|
599
|
+
71
|
600
|
+
72
|
601
|
+
73
|
602
|
+
74</pre>
|
470
603
|
</td>
|
471
604
|
<td>
|
472
|
-
<pre class="code"><span class="info file"># File 'lib/lazier.rb', line
|
605
|
+
<pre class="code"><span class="info file"># File 'lib/lazier.rb', line 64</span>
|
473
606
|
|
474
607
|
<span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_load_boolean'>load_boolean</span>
|
475
608
|
<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>
|
@@ -512,11 +645,6 @@ Licensed under the MIT license, which can be found at <a href="http://www.openso
|
|
512
645
|
<pre class="lines">
|
513
646
|
|
514
647
|
|
515
|
-
86
|
516
|
-
87
|
517
|
-
88
|
518
|
-
89
|
519
|
-
90
|
520
648
|
91
|
521
649
|
92
|
522
650
|
93
|
@@ -530,10 +658,15 @@ Licensed under the MIT license, which can be found at <a href="http://www.openso
|
|
530
658
|
101
|
531
659
|
102
|
532
660
|
103
|
533
|
-
104
|
661
|
+
104
|
662
|
+
105
|
663
|
+
106
|
664
|
+
107
|
665
|
+
108
|
666
|
+
109</pre>
|
534
667
|
</td>
|
535
668
|
<td>
|
536
|
-
<pre class="code"><span class="info file"># File 'lib/lazier.rb', line
|
669
|
+
<pre class="code"><span class="info file"># File 'lib/lazier.rb', line 91</span>
|
537
670
|
|
538
671
|
<span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_load_datetime'>load_datetime</span>
|
539
672
|
<span class='const'>Lazier</span><span class='period'>.</span><span class='id identifier rubyid_load_object'>load_object</span>
|
@@ -584,14 +717,14 @@ Licensed under the MIT license, which can be found at <a href="http://www.openso
|
|
584
717
|
<pre class="lines">
|
585
718
|
|
586
719
|
|
587
|
-
|
588
|
-
|
589
|
-
|
590
|
-
|
591
|
-
|
720
|
+
84
|
721
|
+
85
|
722
|
+
86
|
723
|
+
87
|
724
|
+
88</pre>
|
592
725
|
</td>
|
593
726
|
<td>
|
594
|
-
<pre class="code"><span class="info file"># File 'lib/lazier.rb', line
|
727
|
+
<pre class="code"><span class="info file"># File 'lib/lazier.rb', line 84</span>
|
595
728
|
|
596
729
|
<span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_load_hash'>load_hash</span>
|
597
730
|
<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>
|
@@ -628,16 +761,16 @@ Licensed under the MIT license, which can be found at <a href="http://www.openso
|
|
628
761
|
<pre class="lines">
|
629
762
|
|
630
763
|
|
631
|
-
107
|
632
|
-
108
|
633
|
-
109
|
634
|
-
110
|
635
|
-
111
|
636
764
|
112
|
637
|
-
113
|
765
|
+
113
|
766
|
+
114
|
767
|
+
115
|
768
|
+
116
|
769
|
+
117
|
770
|
+
118</pre>
|
638
771
|
</td>
|
639
772
|
<td>
|
640
|
-
<pre class="code"><span class="info file"># File 'lib/lazier.rb', line
|
773
|
+
<pre class="code"><span class="info file"># File 'lib/lazier.rb', line 112</span>
|
641
774
|
|
642
775
|
<span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_load_math'>load_math</span>
|
643
776
|
<span class='const'>Lazier</span><span class='period'>.</span><span class='id identifier rubyid_load_object'>load_object</span>
|
@@ -676,14 +809,14 @@ Licensed under the MIT license, which can be found at <a href="http://www.openso
|
|
676
809
|
<pre class="lines">
|
677
810
|
|
678
811
|
|
679
|
-
|
680
|
-
|
681
|
-
|
682
|
-
|
683
|
-
|
812
|
+
57
|
813
|
+
58
|
814
|
+
59
|
815
|
+
60
|
816
|
+
61</pre>
|
684
817
|
</td>
|
685
818
|
<td>
|
686
|
-
<pre class="code"><span class="info file"># File 'lib/lazier.rb', line
|
819
|
+
<pre class="code"><span class="info file"># File 'lib/lazier.rb', line 57</span>
|
687
820
|
|
688
821
|
<span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_load_object'>load_object</span>
|
689
822
|
<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>
|
@@ -720,16 +853,16 @@ Licensed under the MIT license, which can be found at <a href="http://www.openso
|
|
720
853
|
<pre class="lines">
|
721
854
|
|
722
855
|
|
723
|
-
116
|
724
|
-
117
|
725
|
-
118
|
726
|
-
119
|
727
|
-
120
|
728
856
|
121
|
729
|
-
122
|
857
|
+
122
|
858
|
+
123
|
859
|
+
124
|
860
|
+
125
|
861
|
+
126
|
862
|
+
127</pre>
|
730
863
|
</td>
|
731
864
|
<td>
|
732
|
-
<pre class="code"><span class="info file"># File 'lib/lazier.rb', line
|
865
|
+
<pre class="code"><span class="info file"># File 'lib/lazier.rb', line 121</span>
|
733
866
|
|
734
867
|
<span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_load_pathname'>load_pathname</span>
|
735
868
|
<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>
|
@@ -768,14 +901,14 @@ Licensed under the MIT license, which can be found at <a href="http://www.openso
|
|
768
901
|
<pre class="lines">
|
769
902
|
|
770
903
|
|
771
|
-
|
772
|
-
|
773
|
-
|
774
|
-
|
775
|
-
|
904
|
+
77
|
905
|
+
78
|
906
|
+
79
|
907
|
+
80
|
908
|
+
81</pre>
|
776
909
|
</td>
|
777
910
|
<td>
|
778
|
-
<pre class="code"><span class="info file"># File 'lib/lazier.rb', line
|
911
|
+
<pre class="code"><span class="info file"># File 'lib/lazier.rb', line 77</span>
|
779
912
|
|
780
913
|
<span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_load_string'>load_string</span>
|
781
914
|
<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>
|
@@ -785,6 +918,126 @@ Licensed under the MIT license, which can be found at <a href="http://www.openso
|
|
785
918
|
</td>
|
786
919
|
</tr>
|
787
920
|
</table>
|
921
|
+
</div>
|
922
|
+
|
923
|
+
<div class="method_details ">
|
924
|
+
<h3 class="signature " id="localize-class_method">
|
925
|
+
|
926
|
+
+ (<tt><span class='object_link'><a href="Lazier/Object.html" title="Lazier::Object (module)">Object</a></span></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
|
+
|
963
|
+
</div><table class="source_code">
|
964
|
+
<tr>
|
965
|
+
<td>
|
966
|
+
<pre class="lines">
|
967
|
+
|
968
|
+
|
969
|
+
140
|
970
|
+
141
|
971
|
+
142
|
972
|
+
143</pre>
|
973
|
+
</td>
|
974
|
+
<td>
|
975
|
+
<pre class="code"><span class="info file"># File 'lib/lazier.rb', line 140</span>
|
976
|
+
|
977
|
+
<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>
|
978
|
+
<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>
|
979
|
+
<span class='id identifier rubyid_locale'>locale</span> <span class='op'>?</span> <span class='op'>::</span><span class='const'>R18n</span><span class='period'>.</span><span class='id identifier rubyid_set'>set</span><span class='lparen'>(</span><span class='id identifier rubyid_locale'>locale</span><span class='comma'>,</span> <span class='ivar'>@i18n_locales_path</span><span class='rparen'>)</span> <span class='op'>:</span> <span class='op'>::</span><span class='const'>R18n</span><span class='period'>.</span><span class='id identifier rubyid_set'>set</span><span class='lparen'>(</span><span class='symbol'>:en</span><span class='comma'>,</span> <span class='ivar'>@i18n_locales_path</span><span class='rparen'>)</span>
|
980
|
+
<span class='kw'>end</span></pre>
|
981
|
+
</td>
|
982
|
+
</tr>
|
983
|
+
</table>
|
984
|
+
</div>
|
985
|
+
|
986
|
+
<div class="method_details ">
|
987
|
+
<h3 class="signature " id="localized?-class_method">
|
988
|
+
|
989
|
+
+ (<tt><span class='object_link'><a href="Lazier/Boolean.html" title="Lazier::Boolean (module)">Boolean</a></span></tt>) <strong>localized?</strong>
|
990
|
+
|
991
|
+
|
992
|
+
|
993
|
+
|
994
|
+
|
995
|
+
</h3><div class="docstring">
|
996
|
+
<div class="discussion">
|
997
|
+
<p>Check whether the i18n support have been enabled.</p>
|
998
|
+
|
999
|
+
|
1000
|
+
</div>
|
1001
|
+
</div>
|
1002
|
+
<div class="tags">
|
1003
|
+
|
1004
|
+
<p class="tag_title">Returns:</p>
|
1005
|
+
<ul class="return">
|
1006
|
+
|
1007
|
+
<li>
|
1008
|
+
|
1009
|
+
|
1010
|
+
<span class='type'>(<tt><span class='object_link'><a href="Lazier/Boolean.html" title="Lazier::Boolean (module)">Boolean</a></span></tt>)</span>
|
1011
|
+
|
1012
|
+
|
1013
|
+
|
1014
|
+
—
|
1015
|
+
<div class='inline'><p>Whether the i18n support have been enabled or not.</p>
|
1016
|
+
</div>
|
1017
|
+
|
1018
|
+
</li>
|
1019
|
+
|
1020
|
+
</ul>
|
1021
|
+
|
1022
|
+
</div><table class="source_code">
|
1023
|
+
<tr>
|
1024
|
+
<td>
|
1025
|
+
<pre class="lines">
|
1026
|
+
|
1027
|
+
|
1028
|
+
148
|
1029
|
+
149
|
1030
|
+
150</pre>
|
1031
|
+
</td>
|
1032
|
+
<td>
|
1033
|
+
<pre class="code"><span class="info file"># File 'lib/lazier.rb', line 148</span>
|
1034
|
+
|
1035
|
+
<span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_localized?'>localized?</span>
|
1036
|
+
<span class='ivar'>@i18n_locales_path</span><span class='period'>.</span><span class='id identifier rubyid_present?'>present?</span>
|
1037
|
+
<span class='kw'>end</span></pre>
|
1038
|
+
</td>
|
1039
|
+
</tr>
|
1040
|
+
</table>
|
788
1041
|
</div>
|
789
1042
|
|
790
1043
|
<div class="method_details ">
|
@@ -798,7 +1051,7 @@ Licensed under the MIT license, which can be found at <a href="http://www.openso
|
|
798
1051
|
|
799
1052
|
</h3><div class="docstring">
|
800
1053
|
<div class="discussion">
|
801
|
-
<p>Returns the settings for the extensions
|
1054
|
+
<p>Returns the settings for the extensions.</p>
|
802
1055
|
|
803
1056
|
|
804
1057
|
</div>
|
@@ -829,14 +1082,16 @@ Licensed under the MIT license, which can be found at <a href="http://www.openso
|
|
829
1082
|
<pre class="lines">
|
830
1083
|
|
831
1084
|
|
832
|
-
28
|
833
1085
|
29
|
834
|
-
30
|
1086
|
+
30
|
1087
|
+
31
|
1088
|
+
32</pre>
|
835
1089
|
</td>
|
836
1090
|
<td>
|
837
|
-
<pre class="code"><span class="info file"># File 'lib/lazier.rb', line
|
1091
|
+
<pre class="code"><span class="info file"># File 'lib/lazier.rb', line 29</span>
|
838
1092
|
|
839
1093
|
<span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_settings'>settings</span>
|
1094
|
+
<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>
|
840
1095
|
<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>
|
841
1096
|
<span class='kw'>end</span></pre>
|
842
1097
|
</td>
|
@@ -849,7 +1104,7 @@ Licensed under the MIT license, which can be found at <a href="http://www.openso
|
|
849
1104
|
</div>
|
850
1105
|
|
851
1106
|
<div id="footer">
|
852
|
-
Generated on
|
1107
|
+
Generated on Tue Jan 29 08:05:14 2013 by
|
853
1108
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
854
1109
|
0.8.3 (ruby-1.9.3).
|
855
1110
|
</div>
|