lazier 4.1.0 → 4.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.travis-gemfile +2 -2
- data/CHANGELOG.md +4 -0
- data/Gemfile +6 -6
- data/README.md +1 -1
- data/doc/Lazier.html +185 -70
- data/doc/Lazier/Boolean.html +5 -5
- data/doc/Lazier/Configuration.html +78 -16
- data/doc/Lazier/DateTime.html +13 -12
- data/doc/Lazier/DateTime/ClassMethods.html +6 -6
- data/doc/Lazier/Exceptions.html +3 -3
- data/doc/Lazier/Exceptions/Debug.html +3 -3
- data/doc/Lazier/Exceptions/MissingTranslation.html +9 -9
- data/doc/Lazier/Exceptions/TranslationExceptionHandler.html +73 -9
- data/doc/Lazier/Hash.html +7 -7
- data/doc/Lazier/I18n.html +41 -41
- data/doc/Lazier/Math.html +4 -4
- data/doc/Lazier/Math/ClassMethods.html +7 -7
- data/doc/Lazier/Object.html +29 -26
- data/doc/Lazier/Pathname.html +11 -12
- data/doc/Lazier/Settings.html +63 -63
- data/doc/Lazier/String.html +122 -21
- data/doc/Lazier/TimeZone.html +128 -32
- data/doc/Lazier/TimeZone/ClassMethods.html +5 -5
- data/doc/Lazier/Version.html +4 -4
- data/doc/_index.html +4 -4
- data/doc/class_list.html +5 -1
- data/doc/file.README.html +4 -4
- data/doc/file_list.html +5 -1
- data/doc/frames.html +1 -1
- data/doc/index.html +4 -4
- data/doc/js/full_list.js +4 -1
- data/doc/method_list.html +91 -81
- data/doc/top-level-namespace.html +3 -3
- data/lib/lazier.rb +18 -17
- data/lib/lazier/boolean.rb +1 -1
- data/lib/lazier/configuration.rb +6 -6
- data/lib/lazier/datetime.rb +11 -11
- data/lib/lazier/exceptions.rb +7 -2
- data/lib/lazier/hash.rb +4 -4
- data/lib/lazier/i18n.rb +7 -7
- data/lib/lazier/math.rb +3 -3
- data/lib/lazier/object.rb +17 -15
- data/lib/lazier/pathname.rb +3 -5
- data/lib/lazier/settings.rb +10 -10
- data/lib/lazier/string.rb +10 -1
- data/lib/lazier/timezone.rb +23 -25
- data/lib/lazier/version.rb +1 -1
- data/spec/lazier/string_spec.rb +14 -0
- data/spec/spec_helper.rb +1 -8
- metadata +2 -2
data/doc/Lazier/Hash.html
CHANGED
@@ -6,7 +6,7 @@
|
|
6
6
|
<title>
|
7
7
|
Module: Lazier::Hash
|
8
8
|
|
9
|
-
— Documentation by YARD 0.8.7.
|
9
|
+
— Documentation by YARD 0.8.7.6
|
10
10
|
|
11
11
|
</title>
|
12
12
|
|
@@ -90,7 +90,7 @@
|
|
90
90
|
|
91
91
|
<h2>Overview</h2><div class="docstring">
|
92
92
|
<div class="discussion">
|
93
|
-
<p>Extensions for Hash objects.</p>
|
93
|
+
<p>Extensions for <code>Hash</code> objects.</p>
|
94
94
|
|
95
95
|
|
96
96
|
</div>
|
@@ -272,7 +272,7 @@
|
|
272
272
|
|
273
273
|
|
274
274
|
—
|
275
|
-
<div class='inline'><p
|
275
|
+
<div class='inline'><p>If present all the keys which evaluates to true will be removed. Otherwise all blank values will be removed.</p>
|
276
276
|
</div>
|
277
277
|
|
278
278
|
</li>
|
@@ -348,7 +348,7 @@
|
|
348
348
|
|
349
349
|
|
350
350
|
—
|
351
|
-
<div class='inline'><p
|
351
|
+
<div class='inline'><p>If present all the keys which evaluates to true will be removed. Otherwise all blank values will be removed.</p>
|
352
352
|
</div>
|
353
353
|
|
354
354
|
</li>
|
@@ -499,7 +499,7 @@
|
|
499
499
|
|
500
500
|
|
501
501
|
—
|
502
|
-
<div class='inline'><p>The requested access for the keys. Can be <code>:strings</code>, <code>:symbols</code> or <code>:indifferent</code>. If <code>nil</code> the keys are not modified.</p>
|
502
|
+
<div class='inline'><p>The requested access for the keys. Can be <code>:dotted</code>, <code>:strings</code>, <code>:symbols</code> or <code>:indifferent</code>. If <code>nil</code> the keys are not modified.</p>
|
503
503
|
</div>
|
504
504
|
|
505
505
|
</li>
|
@@ -552,9 +552,9 @@
|
|
552
552
|
</div>
|
553
553
|
|
554
554
|
<div id="footer">
|
555
|
-
Generated on
|
555
|
+
Generated on Sun Nov 2 11:08:44 2014 by
|
556
556
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
557
|
-
0.8.7.
|
557
|
+
0.8.7.6 (ruby-2.1.3).
|
558
558
|
</div>
|
559
559
|
|
560
560
|
</body>
|
data/doc/Lazier/I18n.html
CHANGED
@@ -6,7 +6,7 @@
|
|
6
6
|
<title>
|
7
7
|
Class: Lazier::I18n
|
8
8
|
|
9
|
-
— Documentation by YARD 0.8.7.
|
9
|
+
— Documentation by YARD 0.8.7.6
|
10
10
|
|
11
11
|
</title>
|
12
12
|
|
@@ -472,7 +472,7 @@
|
|
472
472
|
<span class='name'>locale</span>
|
473
473
|
|
474
474
|
|
475
|
-
<span class='type'>(<tt>Symbol</tt>)</span>
|
475
|
+
<span class='type'>(<tt>Symbol|NilClass</tt>)</span>
|
476
476
|
|
477
477
|
|
478
478
|
<em class="default">(defaults to: <tt>nil</tt>)</em>
|
@@ -504,7 +504,7 @@
|
|
504
504
|
<span class='name'>path</span>
|
505
505
|
|
506
506
|
|
507
|
-
<span class='type'>(<tt><span class='object_link'><a href="String.html" title="Lazier::String (module)">String</a></span
|
507
|
+
<span class='type'>(<tt><span class='object_link'><a href="String.html" title="Lazier::String (module)">String</a></span>|NilClass</tt>)</span>
|
508
508
|
|
509
509
|
|
510
510
|
|
@@ -762,10 +762,10 @@
|
|
762
762
|
|
763
763
|
<span class='comment'># Returns the singleton instance of the settings.
|
764
764
|
</span> <span class='comment'>#
|
765
|
-
</span> <span class='comment'># @param locale [Symbol] The locale to use for translations. Default is the current system locale.
|
765
|
+
</span> <span class='comment'># @param locale [Symbol|NilClass] The locale to use for translations. Default is the current system locale.
|
766
766
|
</span> <span class='comment'># @param root [Symbol] The root level of the translation.
|
767
|
-
</span> <span class='comment'># @param path [String] The path where the translations are stored.
|
768
|
-
</span> <span class='comment'># @param force [Boolean]
|
767
|
+
</span> <span class='comment'># @param path [String|NilClass] The path where the translations are stored.
|
768
|
+
</span> <span class='comment'># @param force [Boolean] Whether to force recreation of the instance.
|
769
769
|
</span> <span class='comment'># @return [I18n] The singleton instance of the i18n.
|
770
770
|
</span> <span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_instance'>instance</span><span class='lparen'>(</span><span class='id identifier rubyid_locale'>locale</span> <span class='op'>=</span> <span class='kw'>nil</span><span class='comma'>,</span> <span class='label'>root:</span> <span class='symbol'>:lazier</span><span class='comma'>,</span> <span class='label'>path:</span> <span class='kw'>nil</span><span class='comma'>,</span> <span class='label'>force:</span> <span class='kw'>false</span><span class='rparen'>)</span>
|
771
771
|
<span class='ivar'>@instance</span> <span class='op'>=</span> <span class='kw'>nil</span> <span class='kw'>if</span> <span class='id identifier rubyid_force'>force</span>
|
@@ -774,9 +774,9 @@
|
|
774
774
|
|
775
775
|
<span class='comment'># Creates a new I18n object.
|
776
776
|
</span> <span class='comment'>#
|
777
|
-
</span> <span class='comment'># @param locale [Symbol] The locale to use. Defaults to the current locale.
|
777
|
+
</span> <span class='comment'># @param locale [Symbol|NilClass] The locale to use. Defaults to the current locale.
|
778
778
|
</span> <span class='comment'># @param root [Symbol] The root level of the translation.
|
779
|
-
</span> <span class='comment'># @param path [String] The path where the translations are stored.
|
779
|
+
</span> <span class='comment'># @param path [String|NilClass] The path where the translations are stored.
|
780
780
|
</span> <span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span><span class='lparen'>(</span><span class='id identifier rubyid_locale'>locale</span> <span class='op'>=</span> <span class='kw'>nil</span><span class='comma'>,</span> <span class='label'>root:</span> <span class='symbol'>:lazier</span><span class='comma'>,</span> <span class='label'>path:</span> <span class='kw'>nil</span><span class='rparen'>)</span>
|
781
781
|
<span class='const'>Lazier</span><span class='period'>.</span><span class='id identifier rubyid_load_object'>load_object</span>
|
782
782
|
<span class='id identifier rubyid_path'>path</span> <span class='op'>||=</span> <span class='const'>Lazier</span><span class='op'>::</span><span class='const'>ROOT</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>
|
@@ -796,7 +796,7 @@
|
|
796
796
|
|
797
797
|
<span class='comment'># Gets the list of available translation for a locale.
|
798
798
|
</span> <span class='comment'>#
|
799
|
-
</span> <span class='comment'># @param locale [Symbol] The locale to list. Defaults to the current locale.
|
799
|
+
</span> <span class='comment'># @param locale [Symbol|NilClass] The locale to list. Defaults to the current locale.
|
800
800
|
</span> <span class='comment'># @return [Hash] The available translations for the specified locale.
|
801
801
|
</span> <span class='kw'>def</span> <span class='id identifier rubyid_translations'>translations</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>
|
802
802
|
<span class='id identifier rubyid_locale'>locale</span> <span class='op'>||=</span> <span class='ivar'>@locale</span>
|
@@ -837,8 +837,8 @@
|
|
837
837
|
|
838
838
|
<span class='comment'># Localize a message in a specific locale.
|
839
839
|
</span> <span class='comment'>#
|
840
|
-
</span> <span class='comment'># @param message [String|Symbol] The message to localize.
|
841
840
|
</span> <span class='comment'># @param locale [String|Symbol] The new locale to use for localization.
|
841
|
+
</span> <span class='comment'># @param message [String|Symbol] The message to localize.
|
842
842
|
</span> <span class='comment'># @param args [Array] Optional arguments to localize the message.
|
843
843
|
</span> <span class='comment'># @return [String] The localized message.
|
844
844
|
</span> <span class='kw'>def</span> <span class='id identifier rubyid_translate_in_locale'>translate_in_locale</span><span class='lparen'>(</span><span class='id identifier rubyid_locale'>locale</span><span class='comma'>,</span> <span class='id identifier rubyid_message'>message</span><span class='comma'>,</span> <span class='op'>*</span><span class='id identifier rubyid_args'>args</span><span class='rparen'>)</span>
|
@@ -1111,10 +1111,10 @@
|
|
1111
1111
|
|
1112
1112
|
<span class='comment'># Returns the singleton instance of the settings.
|
1113
1113
|
</span> <span class='comment'>#
|
1114
|
-
</span> <span class='comment'># @param locale [Symbol] The locale to use for translations. Default is the current system locale.
|
1114
|
+
</span> <span class='comment'># @param locale [Symbol|NilClass] The locale to use for translations. Default is the current system locale.
|
1115
1115
|
</span> <span class='comment'># @param root [Symbol] The root level of the translation.
|
1116
|
-
</span> <span class='comment'># @param path [String] The path where the translations are stored.
|
1117
|
-
</span> <span class='comment'># @param force [Boolean]
|
1116
|
+
</span> <span class='comment'># @param path [String|NilClass] The path where the translations are stored.
|
1117
|
+
</span> <span class='comment'># @param force [Boolean] Whether to force recreation of the instance.
|
1118
1118
|
</span> <span class='comment'># @return [I18n] The singleton instance of the i18n.
|
1119
1119
|
</span> <span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_instance'>instance</span><span class='lparen'>(</span><span class='id identifier rubyid_locale'>locale</span> <span class='op'>=</span> <span class='kw'>nil</span><span class='comma'>,</span> <span class='label'>root:</span> <span class='symbol'>:lazier</span><span class='comma'>,</span> <span class='label'>path:</span> <span class='kw'>nil</span><span class='comma'>,</span> <span class='label'>force:</span> <span class='kw'>false</span><span class='rparen'>)</span>
|
1120
1120
|
<span class='ivar'>@instance</span> <span class='op'>=</span> <span class='kw'>nil</span> <span class='kw'>if</span> <span class='id identifier rubyid_force'>force</span>
|
@@ -1123,9 +1123,9 @@
|
|
1123
1123
|
|
1124
1124
|
<span class='comment'># Creates a new I18n object.
|
1125
1125
|
</span> <span class='comment'>#
|
1126
|
-
</span> <span class='comment'># @param locale [Symbol] The locale to use. Defaults to the current locale.
|
1126
|
+
</span> <span class='comment'># @param locale [Symbol|NilClass] The locale to use. Defaults to the current locale.
|
1127
1127
|
</span> <span class='comment'># @param root [Symbol] The root level of the translation.
|
1128
|
-
</span> <span class='comment'># @param path [String] The path where the translations are stored.
|
1128
|
+
</span> <span class='comment'># @param path [String|NilClass] The path where the translations are stored.
|
1129
1129
|
</span> <span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span><span class='lparen'>(</span><span class='id identifier rubyid_locale'>locale</span> <span class='op'>=</span> <span class='kw'>nil</span><span class='comma'>,</span> <span class='label'>root:</span> <span class='symbol'>:lazier</span><span class='comma'>,</span> <span class='label'>path:</span> <span class='kw'>nil</span><span class='rparen'>)</span>
|
1130
1130
|
<span class='const'>Lazier</span><span class='period'>.</span><span class='id identifier rubyid_load_object'>load_object</span>
|
1131
1131
|
<span class='id identifier rubyid_path'>path</span> <span class='op'>||=</span> <span class='const'>Lazier</span><span class='op'>::</span><span class='const'>ROOT</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>
|
@@ -1145,7 +1145,7 @@
|
|
1145
1145
|
|
1146
1146
|
<span class='comment'># Gets the list of available translation for a locale.
|
1147
1147
|
</span> <span class='comment'>#
|
1148
|
-
</span> <span class='comment'># @param locale [Symbol] The locale to list. Defaults to the current locale.
|
1148
|
+
</span> <span class='comment'># @param locale [Symbol|NilClass] The locale to list. Defaults to the current locale.
|
1149
1149
|
</span> <span class='comment'># @return [Hash] The available translations for the specified locale.
|
1150
1150
|
</span> <span class='kw'>def</span> <span class='id identifier rubyid_translations'>translations</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>
|
1151
1151
|
<span class='id identifier rubyid_locale'>locale</span> <span class='op'>||=</span> <span class='ivar'>@locale</span>
|
@@ -1186,8 +1186,8 @@
|
|
1186
1186
|
|
1187
1187
|
<span class='comment'># Localize a message in a specific locale.
|
1188
1188
|
</span> <span class='comment'>#
|
1189
|
-
</span> <span class='comment'># @param message [String|Symbol] The message to localize.
|
1190
1189
|
</span> <span class='comment'># @param locale [String|Symbol] The new locale to use for localization.
|
1190
|
+
</span> <span class='comment'># @param message [String|Symbol] The message to localize.
|
1191
1191
|
</span> <span class='comment'># @param args [Array] Optional arguments to localize the message.
|
1192
1192
|
</span> <span class='comment'># @return [String] The localized message.
|
1193
1193
|
</span> <span class='kw'>def</span> <span class='id identifier rubyid_translate_in_locale'>translate_in_locale</span><span class='lparen'>(</span><span class='id identifier rubyid_locale'>locale</span><span class='comma'>,</span> <span class='id identifier rubyid_message'>message</span><span class='comma'>,</span> <span class='op'>*</span><span class='id identifier rubyid_args'>args</span><span class='rparen'>)</span>
|
@@ -1460,10 +1460,10 @@
|
|
1460
1460
|
|
1461
1461
|
<span class='comment'># Returns the singleton instance of the settings.
|
1462
1462
|
</span> <span class='comment'>#
|
1463
|
-
</span> <span class='comment'># @param locale [Symbol] The locale to use for translations. Default is the current system locale.
|
1463
|
+
</span> <span class='comment'># @param locale [Symbol|NilClass] The locale to use for translations. Default is the current system locale.
|
1464
1464
|
</span> <span class='comment'># @param root [Symbol] The root level of the translation.
|
1465
|
-
</span> <span class='comment'># @param path [String] The path where the translations are stored.
|
1466
|
-
</span> <span class='comment'># @param force [Boolean]
|
1465
|
+
</span> <span class='comment'># @param path [String|NilClass] The path where the translations are stored.
|
1466
|
+
</span> <span class='comment'># @param force [Boolean] Whether to force recreation of the instance.
|
1467
1467
|
</span> <span class='comment'># @return [I18n] The singleton instance of the i18n.
|
1468
1468
|
</span> <span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_instance'>instance</span><span class='lparen'>(</span><span class='id identifier rubyid_locale'>locale</span> <span class='op'>=</span> <span class='kw'>nil</span><span class='comma'>,</span> <span class='label'>root:</span> <span class='symbol'>:lazier</span><span class='comma'>,</span> <span class='label'>path:</span> <span class='kw'>nil</span><span class='comma'>,</span> <span class='label'>force:</span> <span class='kw'>false</span><span class='rparen'>)</span>
|
1469
1469
|
<span class='ivar'>@instance</span> <span class='op'>=</span> <span class='kw'>nil</span> <span class='kw'>if</span> <span class='id identifier rubyid_force'>force</span>
|
@@ -1472,9 +1472,9 @@
|
|
1472
1472
|
|
1473
1473
|
<span class='comment'># Creates a new I18n object.
|
1474
1474
|
</span> <span class='comment'>#
|
1475
|
-
</span> <span class='comment'># @param locale [Symbol] The locale to use. Defaults to the current locale.
|
1475
|
+
</span> <span class='comment'># @param locale [Symbol|NilClass] The locale to use. Defaults to the current locale.
|
1476
1476
|
</span> <span class='comment'># @param root [Symbol] The root level of the translation.
|
1477
|
-
</span> <span class='comment'># @param path [String] The path where the translations are stored.
|
1477
|
+
</span> <span class='comment'># @param path [String|NilClass] The path where the translations are stored.
|
1478
1478
|
</span> <span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span><span class='lparen'>(</span><span class='id identifier rubyid_locale'>locale</span> <span class='op'>=</span> <span class='kw'>nil</span><span class='comma'>,</span> <span class='label'>root:</span> <span class='symbol'>:lazier</span><span class='comma'>,</span> <span class='label'>path:</span> <span class='kw'>nil</span><span class='rparen'>)</span>
|
1479
1479
|
<span class='const'>Lazier</span><span class='period'>.</span><span class='id identifier rubyid_load_object'>load_object</span>
|
1480
1480
|
<span class='id identifier rubyid_path'>path</span> <span class='op'>||=</span> <span class='const'>Lazier</span><span class='op'>::</span><span class='const'>ROOT</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>
|
@@ -1494,7 +1494,7 @@
|
|
1494
1494
|
|
1495
1495
|
<span class='comment'># Gets the list of available translation for a locale.
|
1496
1496
|
</span> <span class='comment'>#
|
1497
|
-
</span> <span class='comment'># @param locale [Symbol] The locale to list. Defaults to the current locale.
|
1497
|
+
</span> <span class='comment'># @param locale [Symbol|NilClass] The locale to list. Defaults to the current locale.
|
1498
1498
|
</span> <span class='comment'># @return [Hash] The available translations for the specified locale.
|
1499
1499
|
</span> <span class='kw'>def</span> <span class='id identifier rubyid_translations'>translations</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>
|
1500
1500
|
<span class='id identifier rubyid_locale'>locale</span> <span class='op'>||=</span> <span class='ivar'>@locale</span>
|
@@ -1535,8 +1535,8 @@
|
|
1535
1535
|
|
1536
1536
|
<span class='comment'># Localize a message in a specific locale.
|
1537
1537
|
</span> <span class='comment'>#
|
1538
|
-
</span> <span class='comment'># @param message [String|Symbol] The message to localize.
|
1539
1538
|
</span> <span class='comment'># @param locale [String|Symbol] The new locale to use for localization.
|
1539
|
+
</span> <span class='comment'># @param message [String|Symbol] The message to localize.
|
1540
1540
|
</span> <span class='comment'># @param args [Array] Optional arguments to localize the message.
|
1541
1541
|
</span> <span class='comment'># @return [String] The localized message.
|
1542
1542
|
</span> <span class='kw'>def</span> <span class='id identifier rubyid_translate_in_locale'>translate_in_locale</span><span class='lparen'>(</span><span class='id identifier rubyid_locale'>locale</span><span class='comma'>,</span> <span class='id identifier rubyid_message'>message</span><span class='comma'>,</span> <span class='op'>*</span><span class='id identifier rubyid_args'>args</span><span class='rparen'>)</span>
|
@@ -1809,10 +1809,10 @@
|
|
1809
1809
|
|
1810
1810
|
<span class='comment'># Returns the singleton instance of the settings.
|
1811
1811
|
</span> <span class='comment'>#
|
1812
|
-
</span> <span class='comment'># @param locale [Symbol] The locale to use for translations. Default is the current system locale.
|
1812
|
+
</span> <span class='comment'># @param locale [Symbol|NilClass] The locale to use for translations. Default is the current system locale.
|
1813
1813
|
</span> <span class='comment'># @param root [Symbol] The root level of the translation.
|
1814
|
-
</span> <span class='comment'># @param path [String] The path where the translations are stored.
|
1815
|
-
</span> <span class='comment'># @param force [Boolean]
|
1814
|
+
</span> <span class='comment'># @param path [String|NilClass] The path where the translations are stored.
|
1815
|
+
</span> <span class='comment'># @param force [Boolean] Whether to force recreation of the instance.
|
1816
1816
|
</span> <span class='comment'># @return [I18n] The singleton instance of the i18n.
|
1817
1817
|
</span> <span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_instance'>instance</span><span class='lparen'>(</span><span class='id identifier rubyid_locale'>locale</span> <span class='op'>=</span> <span class='kw'>nil</span><span class='comma'>,</span> <span class='label'>root:</span> <span class='symbol'>:lazier</span><span class='comma'>,</span> <span class='label'>path:</span> <span class='kw'>nil</span><span class='comma'>,</span> <span class='label'>force:</span> <span class='kw'>false</span><span class='rparen'>)</span>
|
1818
1818
|
<span class='ivar'>@instance</span> <span class='op'>=</span> <span class='kw'>nil</span> <span class='kw'>if</span> <span class='id identifier rubyid_force'>force</span>
|
@@ -1821,9 +1821,9 @@
|
|
1821
1821
|
|
1822
1822
|
<span class='comment'># Creates a new I18n object.
|
1823
1823
|
</span> <span class='comment'>#
|
1824
|
-
</span> <span class='comment'># @param locale [Symbol] The locale to use. Defaults to the current locale.
|
1824
|
+
</span> <span class='comment'># @param locale [Symbol|NilClass] The locale to use. Defaults to the current locale.
|
1825
1825
|
</span> <span class='comment'># @param root [Symbol] The root level of the translation.
|
1826
|
-
</span> <span class='comment'># @param path [String] The path where the translations are stored.
|
1826
|
+
</span> <span class='comment'># @param path [String|NilClass] The path where the translations are stored.
|
1827
1827
|
</span> <span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span><span class='lparen'>(</span><span class='id identifier rubyid_locale'>locale</span> <span class='op'>=</span> <span class='kw'>nil</span><span class='comma'>,</span> <span class='label'>root:</span> <span class='symbol'>:lazier</span><span class='comma'>,</span> <span class='label'>path:</span> <span class='kw'>nil</span><span class='rparen'>)</span>
|
1828
1828
|
<span class='const'>Lazier</span><span class='period'>.</span><span class='id identifier rubyid_load_object'>load_object</span>
|
1829
1829
|
<span class='id identifier rubyid_path'>path</span> <span class='op'>||=</span> <span class='const'>Lazier</span><span class='op'>::</span><span class='const'>ROOT</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>
|
@@ -1843,7 +1843,7 @@
|
|
1843
1843
|
|
1844
1844
|
<span class='comment'># Gets the list of available translation for a locale.
|
1845
1845
|
</span> <span class='comment'>#
|
1846
|
-
</span> <span class='comment'># @param locale [Symbol] The locale to list. Defaults to the current locale.
|
1846
|
+
</span> <span class='comment'># @param locale [Symbol|NilClass] The locale to list. Defaults to the current locale.
|
1847
1847
|
</span> <span class='comment'># @return [Hash] The available translations for the specified locale.
|
1848
1848
|
</span> <span class='kw'>def</span> <span class='id identifier rubyid_translations'>translations</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>
|
1849
1849
|
<span class='id identifier rubyid_locale'>locale</span> <span class='op'>||=</span> <span class='ivar'>@locale</span>
|
@@ -1884,8 +1884,8 @@
|
|
1884
1884
|
|
1885
1885
|
<span class='comment'># Localize a message in a specific locale.
|
1886
1886
|
</span> <span class='comment'>#
|
1887
|
-
</span> <span class='comment'># @param message [String|Symbol] The message to localize.
|
1888
1887
|
</span> <span class='comment'># @param locale [String|Symbol] The new locale to use for localization.
|
1888
|
+
</span> <span class='comment'># @param message [String|Symbol] The message to localize.
|
1889
1889
|
</span> <span class='comment'># @param args [Array] Optional arguments to localize the message.
|
1890
1890
|
</span> <span class='comment'># @return [String] The localized message.
|
1891
1891
|
</span> <span class='kw'>def</span> <span class='id identifier rubyid_translate_in_locale'>translate_in_locale</span><span class='lparen'>(</span><span class='id identifier rubyid_locale'>locale</span><span class='comma'>,</span> <span class='id identifier rubyid_message'>message</span><span class='comma'>,</span> <span class='op'>*</span><span class='id identifier rubyid_args'>args</span><span class='rparen'>)</span>
|
@@ -1985,7 +1985,7 @@
|
|
1985
1985
|
<span class='name'>locale</span>
|
1986
1986
|
|
1987
1987
|
|
1988
|
-
<span class='type'>(<tt>Symbol</tt>)</span>
|
1988
|
+
<span class='type'>(<tt>Symbol|NilClass</tt>)</span>
|
1989
1989
|
|
1990
1990
|
|
1991
1991
|
<em class="default">(defaults to: <tt>nil</tt>)</em>
|
@@ -2017,7 +2017,7 @@
|
|
2017
2017
|
<span class='name'>path</span>
|
2018
2018
|
|
2019
2019
|
|
2020
|
-
<span class='type'>(<tt><span class='object_link'><a href="String.html" title="Lazier::String (module)">String</a></span
|
2020
|
+
<span class='type'>(<tt><span class='object_link'><a href="String.html" title="Lazier::String (module)">String</a></span>|NilClass</tt>)</span>
|
2021
2021
|
|
2022
2022
|
|
2023
2023
|
|
@@ -2037,7 +2037,7 @@
|
|
2037
2037
|
|
2038
2038
|
|
2039
2039
|
—
|
2040
|
-
<div class='inline'><p>
|
2040
|
+
<div class='inline'><p>Whether to force recreation of the instance.</p>
|
2041
2041
|
</div>
|
2042
2042
|
|
2043
2043
|
</li>
|
@@ -2325,7 +2325,7 @@
|
|
2325
2325
|
|
2326
2326
|
<li>
|
2327
2327
|
|
2328
|
-
<span class='name'>
|
2328
|
+
<span class='name'>locale</span>
|
2329
2329
|
|
2330
2330
|
|
2331
2331
|
<span class='type'>(<tt><span class='object_link'><a href="String.html" title="Lazier::String (module)">String</a></span>|Symbol</tt>)</span>
|
@@ -2333,14 +2333,14 @@
|
|
2333
2333
|
|
2334
2334
|
|
2335
2335
|
—
|
2336
|
-
<div class='inline'><p>The
|
2336
|
+
<div class='inline'><p>The new locale to use for localization.</p>
|
2337
2337
|
</div>
|
2338
2338
|
|
2339
2339
|
</li>
|
2340
2340
|
|
2341
2341
|
<li>
|
2342
2342
|
|
2343
|
-
<span class='name'>
|
2343
|
+
<span class='name'>message</span>
|
2344
2344
|
|
2345
2345
|
|
2346
2346
|
<span class='type'>(<tt><span class='object_link'><a href="String.html" title="Lazier::String (module)">String</a></span>|Symbol</tt>)</span>
|
@@ -2348,7 +2348,7 @@
|
|
2348
2348
|
|
2349
2349
|
|
2350
2350
|
—
|
2351
|
-
<div class='inline'><p>The
|
2351
|
+
<div class='inline'><p>The message to localize.</p>
|
2352
2352
|
</div>
|
2353
2353
|
|
2354
2354
|
</li>
|
@@ -2434,7 +2434,7 @@
|
|
2434
2434
|
<span class='name'>locale</span>
|
2435
2435
|
|
2436
2436
|
|
2437
|
-
<span class='type'>(<tt>Symbol</tt>)</span>
|
2437
|
+
<span class='type'>(<tt>Symbol|NilClass</tt>)</span>
|
2438
2438
|
|
2439
2439
|
|
2440
2440
|
<em class="default">(defaults to: <tt>nil</tt>)</em>
|
@@ -2567,9 +2567,9 @@
|
|
2567
2567
|
</div>
|
2568
2568
|
|
2569
2569
|
<div id="footer">
|
2570
|
-
Generated on
|
2570
|
+
Generated on Sun Nov 2 11:08:45 2014 by
|
2571
2571
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
2572
|
-
0.8.7.
|
2572
|
+
0.8.7.6 (ruby-2.1.3).
|
2573
2573
|
</div>
|
2574
2574
|
|
2575
2575
|
</body>
|
data/doc/Lazier/Math.html
CHANGED
@@ -6,7 +6,7 @@
|
|
6
6
|
<title>
|
7
7
|
Module: Lazier::Math
|
8
8
|
|
9
|
-
— Documentation by YARD 0.8.7.
|
9
|
+
— Documentation by YARD 0.8.7.6
|
10
10
|
|
11
11
|
</title>
|
12
12
|
|
@@ -90,7 +90,7 @@
|
|
90
90
|
|
91
91
|
<h2>Overview</h2><div class="docstring">
|
92
92
|
<div class="discussion">
|
93
|
-
<p>Utility methods for Math module.</p>
|
93
|
+
<p>Utility methods for <code>Math</code> module.</p>
|
94
94
|
|
95
95
|
|
96
96
|
</div>
|
@@ -121,9 +121,9 @@
|
|
121
121
|
</div>
|
122
122
|
|
123
123
|
<div id="footer">
|
124
|
-
Generated on
|
124
|
+
Generated on Sun Nov 2 11:08:44 2014 by
|
125
125
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
126
|
-
0.8.7.
|
126
|
+
0.8.7.6 (ruby-2.1.3).
|
127
127
|
</div>
|
128
128
|
|
129
129
|
</body>
|
@@ -6,7 +6,7 @@
|
|
6
6
|
<title>
|
7
7
|
Module: Lazier::Math::ClassMethods
|
8
8
|
|
9
|
-
— Documentation by YARD 0.8.7.
|
9
|
+
— Documentation by YARD 0.8.7.6
|
10
10
|
|
11
11
|
</title>
|
12
12
|
|
@@ -126,7 +126,7 @@
|
|
126
126
|
|
127
127
|
|
128
128
|
|
129
|
-
<span class="summary_desc"><div class='inline'><p>Returns the maximum value
|
129
|
+
<span class="summary_desc"><div class='inline'><p>Returns the maximum value between the arguments.</p>
|
130
130
|
</div></span>
|
131
131
|
|
132
132
|
</li>
|
@@ -149,7 +149,7 @@
|
|
149
149
|
|
150
150
|
|
151
151
|
|
152
|
-
<span class="summary_desc"><div class='inline'><p>Returns the minimum value
|
152
|
+
<span class="summary_desc"><div class='inline'><p>Returns the minimum value between the arguments.</p>
|
153
153
|
</div></span>
|
154
154
|
|
155
155
|
</li>
|
@@ -175,7 +175,7 @@
|
|
175
175
|
|
176
176
|
</h3><div class="docstring">
|
177
177
|
<div class="discussion">
|
178
|
-
<p>Returns the maximum value
|
178
|
+
<p>Returns the maximum value between the arguments.</p>
|
179
179
|
|
180
180
|
|
181
181
|
</div>
|
@@ -251,7 +251,7 @@
|
|
251
251
|
|
252
252
|
</h3><div class="docstring">
|
253
253
|
<div class="discussion">
|
254
|
-
<p>Returns the minimum value
|
254
|
+
<p>Returns the minimum value between the arguments.</p>
|
255
255
|
|
256
256
|
|
257
257
|
</div>
|
@@ -321,9 +321,9 @@
|
|
321
321
|
</div>
|
322
322
|
|
323
323
|
<div id="footer">
|
324
|
-
Generated on
|
324
|
+
Generated on Sun Nov 2 11:08:44 2014 by
|
325
325
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
326
|
-
0.8.7.
|
326
|
+
0.8.7.6 (ruby-2.1.3).
|
327
327
|
</div>
|
328
328
|
|
329
329
|
</body>
|
data/doc/Lazier/Object.html
CHANGED
@@ -6,7 +6,7 @@
|
|
6
6
|
<title>
|
7
7
|
Module: Lazier::Object
|
8
8
|
|
9
|
-
— Documentation by YARD 0.8.7.
|
9
|
+
— Documentation by YARD 0.8.7.6
|
10
10
|
|
11
11
|
</title>
|
12
12
|
|
@@ -344,7 +344,7 @@
|
|
344
344
|
<li class="public ">
|
345
345
|
<span class="summary_signature">
|
346
346
|
|
347
|
-
<a href="#format_number-instance_method" title="#format_number (instance method)">- (String) <strong>format_number</strong>(precision: nil, decimal_separator: nil, add_string: nil, k_separator: nil) </a>
|
347
|
+
<a href="#format_number-instance_method" title="#format_number (instance method)">- (String|NilClass) <strong>format_number</strong>(precision: nil, decimal_separator: nil, add_string: nil, k_separator: nil) </a>
|
348
348
|
|
349
349
|
|
350
350
|
|
@@ -381,7 +381,7 @@
|
|
381
381
|
|
382
382
|
|
383
383
|
|
384
|
-
<span class="summary_desc"><div class='inline'><p>Prepares an object to be printed in list summaries, like
|
384
|
+
<span class="summary_desc"><div class='inline'><p>Prepares an object to be printed in list summaries, like.</p>
|
385
385
|
</div></span>
|
386
386
|
|
387
387
|
</li>
|
@@ -824,7 +824,7 @@
|
|
824
824
|
|
825
825
|
|
826
826
|
—
|
827
|
-
<div class='inline'><p>
|
827
|
+
<div class='inline'><p>Whether to remove duplicates from the array before sanitizing.</p>
|
828
828
|
</div>
|
829
829
|
|
830
830
|
</li>
|
@@ -839,7 +839,7 @@
|
|
839
839
|
|
840
840
|
|
841
841
|
—
|
842
|
-
<div class='inline'><p>
|
842
|
+
<div class='inline'><p>Whether to compact the array before sanitizing.</p>
|
843
843
|
</div>
|
844
844
|
|
845
845
|
</li>
|
@@ -854,7 +854,7 @@
|
|
854
854
|
|
855
855
|
|
856
856
|
—
|
857
|
-
<div class='inline'><p>
|
857
|
+
<div class='inline'><p>Whether to flatten the array before sanitizing.</p>
|
858
858
|
</div>
|
859
859
|
|
860
860
|
</li>
|
@@ -864,7 +864,7 @@
|
|
864
864
|
<span class='name'>sanitizer</span>
|
865
865
|
|
866
866
|
|
867
|
-
<span class='type'>(<tt>Symbol|
|
867
|
+
<span class='type'>(<tt>Symbol|NilClass</tt>)</span>
|
868
868
|
|
869
869
|
|
870
870
|
|
@@ -1003,7 +1003,7 @@ Passing <code>nil</code> is equal to pass an empty Hash.</p>
|
|
1003
1003
|
<span class='name'>sanitizer</span>
|
1004
1004
|
|
1005
1005
|
|
1006
|
-
<span class='type'>(<tt>Symbol|
|
1006
|
+
<span class='type'>(<tt>Symbol|NilClass</tt>)</span>
|
1007
1007
|
|
1008
1008
|
|
1009
1009
|
|
@@ -1267,7 +1267,7 @@ Passing <code>nil</code> is equal to pass an empty Hash.</p>
|
|
1267
1267
|
<span class='name'>true_name</span>
|
1268
1268
|
|
1269
1269
|
|
1270
|
-
<span class='type'>(<tt><span class='object_link'><a href="String.html" title="Lazier::String (module)">String</a></span
|
1270
|
+
<span class='type'>(<tt><span class='object_link'><a href="String.html" title="Lazier::String (module)">String</a></span>|NilClass</tt>)</span>
|
1271
1271
|
|
1272
1272
|
|
1273
1273
|
|
@@ -1282,7 +1282,7 @@ Passing <code>nil</code> is equal to pass an empty Hash.</p>
|
|
1282
1282
|
<span class='name'>false_name</span>
|
1283
1283
|
|
1284
1284
|
|
1285
|
-
<span class='type'>(<tt><span class='object_link'><a href="String.html" title="Lazier::String (module)">String</a></span
|
1285
|
+
<span class='type'>(<tt><span class='object_link'><a href="String.html" title="Lazier::String (module)">String</a></span>|NilClass</tt>)</span>
|
1286
1286
|
|
1287
1287
|
|
1288
1288
|
|
@@ -1345,7 +1345,7 @@ Passing <code>nil</code> is equal to pass an empty Hash.</p>
|
|
1345
1345
|
<div class="method_details ">
|
1346
1346
|
<h3 class="signature " id="format_number-instance_method">
|
1347
1347
|
|
1348
|
-
- (<tt><span class='object_link'><a href="String.html" title="Lazier::String (module)">String</a></span
|
1348
|
+
- (<tt><span class='object_link'><a href="String.html" title="Lazier::String (module)">String</a></span>|NilClass</tt>) <strong>format_number</strong>(precision: nil, decimal_separator: nil, add_string: nil, k_separator: nil)
|
1349
1349
|
|
1350
1350
|
|
1351
1351
|
|
@@ -1367,7 +1367,7 @@ Passing <code>nil</code> is equal to pass an empty Hash.</p>
|
|
1367
1367
|
<span class='name'>precision</span>
|
1368
1368
|
|
1369
1369
|
|
1370
|
-
<span class='type'>(<tt>Fixnum</tt>)</span>
|
1370
|
+
<span class='type'>(<tt>Fixnum|NilClass</tt>)</span>
|
1371
1371
|
|
1372
1372
|
|
1373
1373
|
|
@@ -1382,7 +1382,7 @@ Passing <code>nil</code> is equal to pass an empty Hash.</p>
|
|
1382
1382
|
<span class='name'>decimal_separator</span>
|
1383
1383
|
|
1384
1384
|
|
1385
|
-
<span class='type'>(<tt><span class='object_link'><a href="String.html" title="Lazier::String (module)">String</a></span
|
1385
|
+
<span class='type'>(<tt><span class='object_link'><a href="String.html" title="Lazier::String (module)">String</a></span>|NilClass</tt>)</span>
|
1386
1386
|
|
1387
1387
|
|
1388
1388
|
|
@@ -1397,7 +1397,7 @@ Passing <code>nil</code> is equal to pass an empty Hash.</p>
|
|
1397
1397
|
<span class='name'>add_string</span>
|
1398
1398
|
|
1399
1399
|
|
1400
|
-
<span class='type'>(<tt><span class='object_link'><a href="String.html" title="Lazier::String (module)">String</a></span
|
1400
|
+
<span class='type'>(<tt><span class='object_link'><a href="String.html" title="Lazier::String (module)">String</a></span>|NilClass</tt>)</span>
|
1401
1401
|
|
1402
1402
|
|
1403
1403
|
|
@@ -1412,7 +1412,7 @@ Passing <code>nil</code> is equal to pass an empty Hash.</p>
|
|
1412
1412
|
<span class='name'>k_separator</span>
|
1413
1413
|
|
1414
1414
|
|
1415
|
-
<span class='type'>(<tt><span class='object_link'><a href="String.html" title="Lazier::String (module)">String</a></span
|
1415
|
+
<span class='type'>(<tt><span class='object_link'><a href="String.html" title="Lazier::String (module)">String</a></span>|NilClass</tt>)</span>
|
1416
1416
|
|
1417
1417
|
|
1418
1418
|
|
@@ -1430,12 +1430,12 @@ Passing <code>nil</code> is equal to pass an empty Hash.</p>
|
|
1430
1430
|
<li>
|
1431
1431
|
|
1432
1432
|
|
1433
|
-
<span class='type'>(<tt><span class='object_link'><a href="String.html" title="Lazier::String (module)">String</a></span
|
1433
|
+
<span class='type'>(<tt><span class='object_link'><a href="String.html" title="Lazier::String (module)">String</a></span>|NilClass</tt>)</span>
|
1434
1434
|
|
1435
1435
|
|
1436
1436
|
|
1437
1437
|
—
|
1438
|
-
<div class='inline'><p>The string representation of the object.</p>
|
1438
|
+
<div class='inline'><p>The string representation of the object or <code>nil</code>, if the object is not a number.</p>
|
1439
1439
|
</div>
|
1440
1440
|
|
1441
1441
|
</li>
|
@@ -1501,7 +1501,10 @@ Passing <code>nil</code> is equal to pass an empty Hash.</p>
|
|
1501
1501
|
|
1502
1502
|
</h3><div class="docstring">
|
1503
1503
|
<div class="discussion">
|
1504
|
-
<p>Prepares an object to be printed in list summaries, like
|
1504
|
+
<p>Prepares an object to be printed in list summaries, like</p>
|
1505
|
+
|
1506
|
+
<pre class="code ruby"><code class="ruby">[01/04] Opening this...
|
1507
|
+
</code></pre>
|
1505
1508
|
|
1506
1509
|
|
1507
1510
|
</div>
|
@@ -1535,7 +1538,7 @@ Passing <code>nil</code> is equal to pass an empty Hash.</p>
|
|
1535
1538
|
|
1536
1539
|
|
1537
1540
|
—
|
1538
|
-
<div class='inline'><p>The
|
1541
|
+
<div class='inline'><p>The character to use to fill the label.</p>
|
1539
1542
|
</div>
|
1540
1543
|
|
1541
1544
|
</li>
|
@@ -1550,7 +1553,7 @@ Passing <code>nil</code> is equal to pass an empty Hash.</p>
|
|
1550
1553
|
|
1551
1554
|
|
1552
1555
|
—
|
1553
|
-
<div class='inline'><p>The method to use to format the label. Must accept the <code>length</code> and the
|
1556
|
+
<div class='inline'><p>The method to use to format the label. Must accept the <code>length</code> and the <code>filler</code> arguments.</p>
|
1554
1557
|
</div>
|
1555
1558
|
|
1556
1559
|
</li>
|
@@ -1581,12 +1584,12 @@ Passing <code>nil</code> is equal to pass an empty Hash.</p>
|
|
1581
1584
|
<pre class="lines">
|
1582
1585
|
|
1583
1586
|
|
1584
|
-
|
1585
|
-
|
1586
|
-
|
1587
|
+
225
|
1588
|
+
226
|
1589
|
+
227</pre>
|
1587
1590
|
</td>
|
1588
1591
|
<td>
|
1589
|
-
<pre class="code"><span class="info file"># File 'lib/lazier/object.rb', line
|
1592
|
+
<pre class="code"><span class="info file"># File 'lib/lazier/object.rb', line 225</span>
|
1590
1593
|
|
1591
1594
|
<span class='kw'>def</span> <span class='id identifier rubyid_indexize'>indexize</span><span class='lparen'>(</span><span class='label'>length:</span> <span class='int'>2</span><span class='comma'>,</span> <span class='label'>filler:</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>0</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='label'>formatter:</span> <span class='symbol'>:rjust</span><span class='rparen'>)</span>
|
1592
1595
|
<span class='id identifier rubyid_ensure_string'>ensure_string</span><span class='period'>.</span><span class='id identifier rubyid_send'>send</span><span class='lparen'>(</span><span class='id identifier rubyid_formatter'>formatter</span><span class='comma'>,</span> <span class='id identifier rubyid_length'>length</span><span class='comma'>,</span> <span class='id identifier rubyid_filler'>filler</span><span class='rparen'>)</span>
|
@@ -2331,9 +2334,9 @@ Passing <code>nil</code> is equal to pass an empty Hash.</p>
|
|
2331
2334
|
</div>
|
2332
2335
|
|
2333
2336
|
<div id="footer">
|
2334
|
-
Generated on
|
2337
|
+
Generated on Sun Nov 2 11:08:44 2014 by
|
2335
2338
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
2336
|
-
0.8.7.
|
2339
|
+
0.8.7.6 (ruby-2.1.3).
|
2337
2340
|
</div>
|
2338
2341
|
|
2339
2342
|
</body>
|