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.
Files changed (51) hide show
  1. checksums.yaml +4 -4
  2. data/.travis-gemfile +2 -2
  3. data/CHANGELOG.md +4 -0
  4. data/Gemfile +6 -6
  5. data/README.md +1 -1
  6. data/doc/Lazier.html +185 -70
  7. data/doc/Lazier/Boolean.html +5 -5
  8. data/doc/Lazier/Configuration.html +78 -16
  9. data/doc/Lazier/DateTime.html +13 -12
  10. data/doc/Lazier/DateTime/ClassMethods.html +6 -6
  11. data/doc/Lazier/Exceptions.html +3 -3
  12. data/doc/Lazier/Exceptions/Debug.html +3 -3
  13. data/doc/Lazier/Exceptions/MissingTranslation.html +9 -9
  14. data/doc/Lazier/Exceptions/TranslationExceptionHandler.html +73 -9
  15. data/doc/Lazier/Hash.html +7 -7
  16. data/doc/Lazier/I18n.html +41 -41
  17. data/doc/Lazier/Math.html +4 -4
  18. data/doc/Lazier/Math/ClassMethods.html +7 -7
  19. data/doc/Lazier/Object.html +29 -26
  20. data/doc/Lazier/Pathname.html +11 -12
  21. data/doc/Lazier/Settings.html +63 -63
  22. data/doc/Lazier/String.html +122 -21
  23. data/doc/Lazier/TimeZone.html +128 -32
  24. data/doc/Lazier/TimeZone/ClassMethods.html +5 -5
  25. data/doc/Lazier/Version.html +4 -4
  26. data/doc/_index.html +4 -4
  27. data/doc/class_list.html +5 -1
  28. data/doc/file.README.html +4 -4
  29. data/doc/file_list.html +5 -1
  30. data/doc/frames.html +1 -1
  31. data/doc/index.html +4 -4
  32. data/doc/js/full_list.js +4 -1
  33. data/doc/method_list.html +91 -81
  34. data/doc/top-level-namespace.html +3 -3
  35. data/lib/lazier.rb +18 -17
  36. data/lib/lazier/boolean.rb +1 -1
  37. data/lib/lazier/configuration.rb +6 -6
  38. data/lib/lazier/datetime.rb +11 -11
  39. data/lib/lazier/exceptions.rb +7 -2
  40. data/lib/lazier/hash.rb +4 -4
  41. data/lib/lazier/i18n.rb +7 -7
  42. data/lib/lazier/math.rb +3 -3
  43. data/lib/lazier/object.rb +17 -15
  44. data/lib/lazier/pathname.rb +3 -5
  45. data/lib/lazier/settings.rb +10 -10
  46. data/lib/lazier/string.rb +10 -1
  47. data/lib/lazier/timezone.rb +23 -25
  48. data/lib/lazier/version.rb +1 -1
  49. data/spec/lazier/string_spec.rb +14 -0
  50. data/spec/spec_helper.rb +1 -8
  51. metadata +2 -2
@@ -6,7 +6,7 @@
6
6
  <title>
7
7
  Module: Lazier::TimeZone
8
8
 
9
- &mdash; Documentation by YARD 0.8.7.4
9
+ &mdash; 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 timezone objects.</p>
93
+ <p>Extensions for <code>TimeZone</code> objects.</p>
94
94
 
95
95
 
96
96
  </div>
@@ -183,7 +183,7 @@
183
183
 
184
184
 
185
185
 
186
- <span class="summary_desc"><div class='inline'><p>Returns a list of valid aliases (city names) for this timezone (basing on offset).</p>
186
+ <span class="summary_desc"><div class='inline'><p>Returns a list of valid aliases (city names) for this timezone (basing on the offset).</p>
187
187
  </div></span>
188
188
 
189
189
  </li>
@@ -417,7 +417,7 @@
417
417
 
418
418
  </h3><div class="docstring">
419
419
  <div class="discussion">
420
- <p>Returns a list of valid aliases (city names) for this timezone (basing on offset).</p>
420
+ <p>Returns a list of valid aliases (city names) for this timezone (basing on the offset).</p>
421
421
 
422
422
 
423
423
  </div>
@@ -623,7 +623,7 @@
623
623
 
624
624
 
625
625
  &mdash;
626
- <div class='inline'><p>If to return the name with DST indication.</p>
626
+ <div class='inline'><p>Whether to return the name with DST indication.</p>
627
627
  </div>
628
628
 
629
629
  </li>
@@ -737,7 +737,7 @@
737
737
 
738
738
 
739
739
  &mdash;
740
- <div class='inline'><p>If to return the offset as a Rational.</p>
740
+ <div class='inline'><p>Whether to return the offset as a Rational.</p>
741
741
  </div>
742
742
 
743
743
  </li>
@@ -747,7 +747,7 @@
747
747
  <span class='name'>date</span>
748
748
 
749
749
 
750
- <span class='type'>(<tt><span class='object_link'><a href="DateTime.html" title="Lazier::DateTime (module)">DateTime</a></span></tt>)</span>
750
+ <span class='type'>(<tt><span class='object_link'><a href="DateTime.html" title="Lazier::DateTime (module)">DateTime</a></span>|NilClass</tt>)</span>
751
751
 
752
752
 
753
753
  <em class="default">(defaults to: <tt>nil</tt>)</em>
@@ -834,7 +834,7 @@
834
834
 
835
835
 
836
836
  &mdash;
837
- <div class='inline'><p>If to return the offset as a Rational.</p>
837
+ <div class='inline'><p>Whether to return the offset as a Rational.</p>
838
838
  </div>
839
839
 
840
840
  </li>
@@ -844,7 +844,7 @@
844
844
  <span class='name'>year</span>
845
845
 
846
846
 
847
- <span class='type'>(<tt>Fixnum</tt>)</span>
847
+ <span class='type'>(<tt>Fixnum|NilClass</tt>)</span>
848
848
 
849
849
 
850
850
  <em class="default">(defaults to: <tt>nil</tt>)</em>
@@ -924,7 +924,7 @@
924
924
  <span class='name'>year</span>
925
925
 
926
926
 
927
- <span class='type'>(<tt>Fixnum</tt>)</span>
927
+ <span class='type'>(<tt>Fixnum|NilClass</tt>)</span>
928
928
 
929
929
 
930
930
  <em class="default">(defaults to: <tt>nil</tt>)</em>
@@ -1019,7 +1019,7 @@
1019
1019
 
1020
1020
 
1021
1021
  &mdash;
1022
- <div class='inline'><p>If to return the offset as a Rational.</p>
1022
+ <div class='inline'><p>Whether to return he offset as a <code>Rational</code>.</p>
1023
1023
  </div>
1024
1024
 
1025
1025
  </li>
@@ -1034,7 +1034,7 @@
1034
1034
 
1035
1035
 
1036
1036
  &mdash;
1037
- <div class='inline'><p>If to return the offset when the DST is active.</p>
1037
+ <div class='inline'><p>Whether to return the offset when the DST is active.</p>
1038
1038
  </div>
1039
1039
 
1040
1040
  </li>
@@ -1044,7 +1044,7 @@
1044
1044
  <span class='name'>year</span>
1045
1045
 
1046
1046
 
1047
- <span class='type'>(<tt>Fixnum</tt>)</span>
1047
+ <span class='type'>(<tt>Fixnum|NilClass</tt>)</span>
1048
1048
 
1049
1049
 
1050
1050
 
@@ -1143,7 +1143,7 @@
1143
1143
 
1144
1144
 
1145
1145
  &mdash;
1146
- <div class='inline'><p>If to represent with (DST) active.</p>
1146
+ <div class='inline'><p>Whether to represent with (DST) active.</p>
1147
1147
  </div>
1148
1148
 
1149
1149
  </li>
@@ -1159,23 +1159,119 @@
1159
1159
 
1160
1160
  &mdash;
1161
1161
  <div class='inline'><p>Parameters for the formatting:</p>
1162
-
1163
- <ul>
1164
- <li><strong>label</strong> (<code>String</code>): The label to use. Default to the current alias.</li>
1165
- <li><strong>dst_label</strong> (<code>String</code>): Label for the DST indication. Defaults to ` (DST)`.</li>
1166
- <li><strong>utc_label</strong> (<code>String</code>): Label for the UTC name. Defaults to <code>GMT</code>. *Only used when <code>parameterized</code> is <code>false</code>.</li>
1167
- <li><strong>year</strong> (<code>Fixnum</code>): The year to which refer to. Defaults to the current year.</li>
1168
- <li><strong>parameterized</strong> (<code>Boolean</code>): If to represent as parameterized.</li>
1169
- <li><strong>with_offset</strong> (<code>Boolean</code>): If to include offset into the representation. *Only used when <code>parameterized</code> is <code>true</code>.</li>
1170
- <li><strong>offset_position</strong> (<code>Symbol</code>): Where to put the offset. Valid values are <code>:begin</code> or <code>:end</code>. *Only used when <code>parameterized</code> is <code>false</code>.</li>
1171
- <li><strong>colon</strong> (<code>Boolean</code>): If include a colon in the offset. *Only used when <code>parameterized</code> is <code>false</code>.</li>
1172
- </ul>
1173
1162
  </div>
1174
1163
 
1175
1164
  </li>
1176
1165
 
1177
1166
  </ul>
1178
1167
 
1168
+
1169
+
1170
+
1171
+
1172
+
1173
+ <p class="tag_title">Options Hash (<tt>**args</tt>):</p>
1174
+ <ul class="option">
1175
+
1176
+ <li>
1177
+ <span class="name">label</span>
1178
+ <span class="type">(<tt><span class='object_link'><a href="String.html" title="Lazier::String (module)">String</a></span></tt>)</span>
1179
+ <span class="default">
1180
+
1181
+ </span>
1182
+
1183
+ &mdash; <div class='inline'><p>: The label to use. Default to the current alias.</p>
1184
+ </div>
1185
+
1186
+ </li>
1187
+
1188
+ <li>
1189
+ <span class="name">dst_label</span>
1190
+ <span class="type">(<tt><span class='object_link'><a href="String.html" title="Lazier::String (module)">String</a></span></tt>)</span>
1191
+ <span class="default">
1192
+
1193
+ </span>
1194
+
1195
+ &mdash; <div class='inline'><p>: Label for the DST indication. Defaults to ` (DST)`.</p>
1196
+ </div>
1197
+
1198
+ </li>
1199
+
1200
+ <li>
1201
+ <span class="name">utc_label</span>
1202
+ <span class="type">(<tt><span class='object_link'><a href="String.html" title="Lazier::String (module)">String</a></span></tt>)</span>
1203
+ <span class="default">
1204
+
1205
+ </span>
1206
+
1207
+ &mdash; <div class='inline'><p>: Label for the UTC name. Defaults to <code>GMT</code>. *Only used when <code>parameterized</code> is <code>false</code>.</p>
1208
+ </div>
1209
+
1210
+ </li>
1211
+
1212
+ <li>
1213
+ <span class="name">year</span>
1214
+ <span class="type">(<tt>Fixnum</tt>)</span>
1215
+ <span class="default">
1216
+
1217
+ </span>
1218
+
1219
+ &mdash; <div class='inline'><p>: The year to which refer to. Defaults to the current year.</p>
1220
+ </div>
1221
+
1222
+ </li>
1223
+
1224
+ <li>
1225
+ <span class="name">parameterized</span>
1226
+ <span class="type">(<tt><span class='object_link'><a href="Boolean.html" title="Lazier::Boolean (module)">Boolean</a></span></tt>)</span>
1227
+ <span class="default">
1228
+
1229
+ </span>
1230
+
1231
+ &mdash; <div class='inline'><p>: Whether to represent as parameterized.</p>
1232
+ </div>
1233
+
1234
+ </li>
1235
+
1236
+ <li>
1237
+ <span class="name">with_offset</span>
1238
+ <span class="type">(<tt><span class='object_link'><a href="Boolean.html" title="Lazier::Boolean (module)">Boolean</a></span></tt>)</span>
1239
+ <span class="default">
1240
+
1241
+ </span>
1242
+
1243
+ &mdash; <div class='inline'><p>: Whether to include offset into the representation. *Only used when <code>parameterized</code> is <code>true</code>.</p>
1244
+ </div>
1245
+
1246
+ </li>
1247
+
1248
+ <li>
1249
+ <span class="name">offset_position</span>
1250
+ <span class="type">(<tt>Symbol</tt>)</span>
1251
+ <span class="default">
1252
+
1253
+ </span>
1254
+
1255
+ &mdash; <div class='inline'><p>: Where to put the offset. Valid values are <code>:begin</code> or <code>:end</code>. *Only used when <code>parameterized</code> is <code>false</code>.</p>
1256
+ </div>
1257
+
1258
+ </li>
1259
+
1260
+ <li>
1261
+ <span class="name">colon</span>
1262
+ <span class="type">(<tt><span class='object_link'><a href="Boolean.html" title="Lazier::Boolean (module)">Boolean</a></span></tt>)</span>
1263
+ <span class="default">
1264
+
1265
+ </span>
1266
+
1267
+ &mdash; <div class='inline'><p>: If include a colon in the offset. *Only used when <code>parameterized</code> is <code>false</code>.</p>
1268
+ </div>
1269
+
1270
+ </li>
1271
+
1272
+ </ul>
1273
+
1274
+
1179
1275
  <p class="tag_title">Returns:</p>
1180
1276
  <ul class="return">
1181
1277
 
@@ -1200,6 +1296,8 @@
1200
1296
  <pre class="lines">
1201
1297
 
1202
1298
 
1299
+ 266
1300
+ 267
1203
1301
  268
1204
1302
  269
1205
1303
  270
@@ -1208,12 +1306,10 @@
1208
1306
  273
1209
1307
  274
1210
1308
  275
1211
- 276
1212
- 277
1213
- 278</pre>
1309
+ 276</pre>
1214
1310
  </td>
1215
1311
  <td>
1216
- <pre class="code"><span class="info file"># File 'lib/lazier/timezone.rb', line 268</span>
1312
+ <pre class="code"><span class="info file"># File 'lib/lazier/timezone.rb', line 266</span>
1217
1313
 
1218
1314
  <span class='kw'>def</span> <span class='id identifier rubyid_to_str'>to_str</span><span class='lparen'>(</span><span class='id identifier rubyid_dst'>dst</span> <span class='op'>=</span> <span class='kw'>false</span><span class='comma'>,</span> <span class='op'>**</span><span class='id identifier rubyid_args'>args</span><span class='rparen'>)</span>
1219
1315
  <span class='comment'># PI: Ignore reek on this.
@@ -1256,7 +1352,7 @@
1256
1352
  <span class='name'>reference</span>
1257
1353
 
1258
1354
 
1259
- <span class='type'>(<tt>Date|<span class='object_link'><a href="DateTime.html" title="Lazier::DateTime (module)">DateTime</a></span></tt>)</span>
1355
+ <span class='type'>(<tt>Date|<span class='object_link'><a href="DateTime.html" title="Lazier::DateTime (module)">DateTime</a></span>|NilClass</tt>)</span>
1260
1356
 
1261
1357
 
1262
1358
  <em class="default">(defaults to: <tt>nil</tt>)</em>
@@ -1322,9 +1418,9 @@
1322
1418
  </div>
1323
1419
 
1324
1420
  <div id="footer">
1325
- Generated on Thu Oct 2 10:38:44 2014 by
1421
+ Generated on Sun Nov 2 11:08:44 2014 by
1326
1422
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
1327
- 0.8.7.4 (ruby-2.1.3).
1423
+ 0.8.7.6 (ruby-2.1.3).
1328
1424
  </div>
1329
1425
 
1330
1426
  </body>
@@ -6,7 +6,7 @@
6
6
  <title>
7
7
  Module: Lazier::TimeZone::ClassMethods
8
8
 
9
- &mdash; Documentation by YARD 0.8.7.4
9
+ &mdash; Documentation by YARD 0.8.7.6
10
10
 
11
11
  </title>
12
12
 
@@ -518,7 +518,7 @@
518
518
 
519
519
 
520
520
  &mdash;
521
- <div class='inline'><p>If to put the colon in the output string.</p>
521
+ <div class='inline'><p>Whether to put the colon in the output string.</p>
522
522
  </div>
523
523
 
524
524
  </li>
@@ -757,7 +757,7 @@ DateTime.parameterize_zone(ActiveSupport::TimeZone["Pacific Time (US &amp; Canad
757
757
 
758
758
 
759
759
  &mdash;
760
- <div class='inline'><p>If to include offset into the representation.</p>
760
+ <div class='inline'><p>Whether to include offset into the representation.</p>
761
761
  </div>
762
762
 
763
763
  </li>
@@ -1005,9 +1005,9 @@ Returns an offset in rational value.</p>
1005
1005
  </div>
1006
1006
 
1007
1007
  <div id="footer">
1008
- Generated on Thu Oct 2 10:38:44 2014 by
1008
+ Generated on Sun Nov 2 11:08:45 2014 by
1009
1009
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
1010
- 0.8.7.4 (ruby-2.1.3).
1010
+ 0.8.7.6 (ruby-2.1.3).
1011
1011
  </div>
1012
1012
 
1013
1013
  </body>
@@ -6,7 +6,7 @@
6
6
  <title>
7
7
  Module: Lazier::Version
8
8
 
9
- &mdash; Documentation by YARD 0.8.7.4
9
+ &mdash; Documentation by YARD 0.8.7.6
10
10
 
11
11
  </title>
12
12
 
@@ -134,7 +134,7 @@
134
134
 
135
135
  </div>
136
136
  </dt>
137
- <dd><pre class="code"><span class='int'>1</span></pre></dd>
137
+ <dd><pre class="code"><span class='int'>2</span></pre></dd>
138
138
 
139
139
  <dt id="PATCH-constant" class="">PATCH =
140
140
  <div class="docstring">
@@ -180,9 +180,9 @@
180
180
  </div>
181
181
 
182
182
  <div id="footer">
183
- Generated on Thu Oct 2 10:38:44 2014 by
183
+ Generated on Sun Nov 2 11:08:44 2014 by
184
184
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
185
- 0.8.7.4 (ruby-2.1.3).
185
+ 0.8.7.6 (ruby-2.1.3).
186
186
  </div>
187
187
 
188
188
  </body>
@@ -4,7 +4,7 @@
4
4
  <head>
5
5
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
6
6
  <title>
7
- Documentation by YARD 0.8.7.4
7
+ Documentation by YARD 0.8.7.6
8
8
 
9
9
  </title>
10
10
 
@@ -56,7 +56,7 @@
56
56
 
57
57
  <iframe id="search_frame"></iframe>
58
58
 
59
- <div id="content"><h1 class="noborder title">Documentation by YARD 0.8.7.4</h1>
59
+ <div id="content"><h1 class="noborder title">Documentation by YARD 0.8.7.6</h1>
60
60
  <div id="listing">
61
61
  <h1 class="alphaindex">Alphabetic Index</h1>
62
62
 
@@ -333,9 +333,9 @@
333
333
  </div>
334
334
 
335
335
  <div id="footer">
336
- Generated on Thu Oct 2 10:38:44 2014 by
336
+ Generated on Sun Nov 2 11:08:44 2014 by
337
337
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
338
- 0.8.7.4 (ruby-2.1.3).
338
+ 0.8.7.6 (ruby-2.1.3).
339
339
  </div>
340
340
 
341
341
  </body>
@@ -20,7 +20,11 @@
20
20
  </head>
21
21
  <body>
22
22
  <script type="text/javascript" charset="utf-8">
23
- if (window.top.frames.main) {
23
+ var hasFrames = false;
24
+ try {
25
+ hasFrames = window.top.frames.main ? true : false;
26
+ } catch (e) { }
27
+ if (hasFrames) {
24
28
  document.getElementById('base_target').target = 'main';
25
29
  document.body.className = 'frames';
26
30
  }
@@ -6,7 +6,7 @@
6
6
  <title>
7
7
  File: README
8
8
 
9
- &mdash; Documentation by YARD 0.8.7.4
9
+ &mdash; Documentation by YARD 0.8.7.6
10
10
 
11
11
  </title>
12
12
 
@@ -88,7 +88,7 @@ See documentation for more informations.</p>
88
88
 
89
89
  <h2 id="supported-implementations">Supported implementations.</h2>
90
90
 
91
- <p>A Ruby 2.1 implementation is required. So far, only MRI supports all Ruby 2.1 requirements.</p>
91
+ <p>A Ruby 2.1 implementation is required.</p>
92
92
 
93
93
  <h2 id="contributing-to-lazier">Contributing to lazier</h2>
94
94
 
@@ -110,9 +110,9 @@ See documentation for more informations.</p>
110
110
  </div></div>
111
111
 
112
112
  <div id="footer">
113
- Generated on Thu Oct 2 10:38:44 2014 by
113
+ Generated on Sun Nov 2 11:08:44 2014 by
114
114
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
115
- 0.8.7.4 (ruby-2.1.3).
115
+ 0.8.7.6 (ruby-2.1.3).
116
116
  </div>
117
117
 
118
118
  </body>
@@ -20,7 +20,11 @@
20
20
  </head>
21
21
  <body>
22
22
  <script type="text/javascript" charset="utf-8">
23
- if (window.top.frames.main) {
23
+ var hasFrames = false;
24
+ try {
25
+ hasFrames = window.top.frames.main ? true : false;
26
+ } catch (e) { }
27
+ if (hasFrames) {
24
28
  document.getElementById('base_target').target = 'main';
25
29
  document.body.className = 'frames';
26
30
  }
@@ -4,7 +4,7 @@
4
4
  <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
5
5
  <head>
6
6
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
7
- <title>Documentation by YARD 0.8.7.4</title>
7
+ <title>Documentation by YARD 0.8.7.6</title>
8
8
  </head>
9
9
  <script type="text/javascript" charset="utf-8">
10
10
  window.onload = function() {