lazier 4.0.6 → 4.1.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/CHANGELOG.md +4 -0
- data/doc/Lazier.html +188 -28
- data/doc/Lazier/Boolean.html +1 -1
- data/doc/Lazier/Configuration.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/Debug.html +1 -1
- data/doc/Lazier/Exceptions/MissingTranslation.html +1 -1
- data/doc/Lazier/Exceptions/TranslationExceptionHandler.html +1 -1
- data/doc/Lazier/Hash.html +1 -1
- data/doc/Lazier/I18n.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 +1 -1
- 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 +3 -3
- data/doc/_index.html +1 -1
- data/doc/file.README.html +1 -1
- data/doc/index.html +1 -1
- data/doc/method_list.html +21 -9
- data/doc/top-level-namespace.html +1 -1
- data/lazier.gemspec +0 -1
- data/lib/lazier.rb +14 -1
- data/lib/lazier/version.rb +2 -2
- data/spec/lazier_spec.rb +14 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 277583fb9b09fef0d3a4dc69aa24e5e5249635c1
|
4
|
+
data.tar.gz: 42ff9e00f10b055f440966b472d526414e0bcca7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a390fe4c68ecac659ca9a95338027753d985f31c5bee642c674b4a11aa71985a2d67d5151ce4e04215ea20086e1d3761f5716a64f1bb3cd28c222a8a7fe3a204
|
7
|
+
data.tar.gz: 8d55abd0bf5882c08b7fa9e7ea050047fb3d24adf970485d8dcbfcd3b31b15a9b1bb5067bf1254697f4238e0d1d923425e0a3883bd56ca99b59f7733d1de2c91
|
data/CHANGELOG.md
CHANGED
data/doc/Lazier.html
CHANGED
@@ -373,6 +373,52 @@ Licensed under the MIT license, which can be found at http://www.opensource.org/
|
|
373
373
|
<span class="summary_desc"><div class='inline'><p>Loads String extensions.</p>
|
374
374
|
</div></span>
|
375
375
|
|
376
|
+
</li>
|
377
|
+
|
378
|
+
|
379
|
+
<li class="public ">
|
380
|
+
<span class="summary_signature">
|
381
|
+
|
382
|
+
<a href="#loaded_modules-class_method" title="loaded_modules (class method)">+ (Array) <strong>loaded_modules</strong> </a>
|
383
|
+
|
384
|
+
|
385
|
+
|
386
|
+
</span>
|
387
|
+
|
388
|
+
|
389
|
+
|
390
|
+
|
391
|
+
|
392
|
+
|
393
|
+
|
394
|
+
|
395
|
+
|
396
|
+
<span class="summary_desc"><div class='inline'><p>Returns the list of loaded Lazier modules.</p>
|
397
|
+
</div></span>
|
398
|
+
|
399
|
+
</li>
|
400
|
+
|
401
|
+
|
402
|
+
<li class="public ">
|
403
|
+
<span class="summary_signature">
|
404
|
+
|
405
|
+
<a href="#modules_loaded%3F-class_method" title="modules_loaded? (class method)">+ (Boolean) <strong>modules_loaded?</strong>(*modules) </a>
|
406
|
+
|
407
|
+
|
408
|
+
|
409
|
+
</span>
|
410
|
+
|
411
|
+
|
412
|
+
|
413
|
+
|
414
|
+
|
415
|
+
|
416
|
+
|
417
|
+
|
418
|
+
|
419
|
+
<span class="summary_desc"><div class='inline'><p>Checks if <em>all</em> of the specified modules have been loaded.</p>
|
420
|
+
</div></span>
|
421
|
+
|
376
422
|
</li>
|
377
423
|
|
378
424
|
|
@@ -523,13 +569,13 @@ otherwise the duration alone as a number.</p>
|
|
523
569
|
<pre class="lines">
|
524
570
|
|
525
571
|
|
526
|
-
|
527
|
-
|
528
|
-
|
529
|
-
|
572
|
+
160
|
573
|
+
161
|
574
|
+
162
|
575
|
+
163</pre>
|
530
576
|
</td>
|
531
577
|
<td>
|
532
|
-
<pre class="code"><span class="info file"># File 'lib/lazier.rb', line
|
578
|
+
<pre class="code"><span class="info file"># File 'lib/lazier.rb', line 160</span>
|
533
579
|
|
534
580
|
<span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_benchmark'>benchmark</span><span class='lparen'>(</span><span class='label'>message:</span> <span class='kw'>nil</span><span class='comma'>,</span> <span class='label'>precision:</span> <span class='int'>0</span><span class='comma'>,</span> <span class='op'>&</span><span class='id identifier rubyid_block'>block</span><span class='rparen'>)</span>
|
535
581
|
<span class='id identifier rubyid_rv'>rv</span> <span class='op'>=</span> <span class='const'>Benchmark</span><span class='period'>.</span><span class='id identifier rubyid_ms'>ms</span><span class='lparen'>(</span><span class='op'>&</span><span class='id identifier rubyid_block'>block</span><span class='rparen'>)</span>
|
@@ -636,18 +682,18 @@ Otherwise the class of the object will returned.</p>
|
|
636
682
|
<pre class="lines">
|
637
683
|
|
638
684
|
|
639
|
-
|
640
|
-
|
641
|
-
|
642
|
-
|
643
|
-
|
644
|
-
|
645
|
-
|
646
|
-
|
647
|
-
|
685
|
+
143
|
686
|
+
144
|
687
|
+
145
|
688
|
+
146
|
689
|
+
147
|
690
|
+
148
|
691
|
+
149
|
692
|
+
150
|
693
|
+
151</pre>
|
648
694
|
</td>
|
649
695
|
<td>
|
650
|
-
<pre class="code"><span class="info file"># File 'lib/lazier.rb', line
|
696
|
+
<pre class="code"><span class="info file"># File 'lib/lazier.rb', line 143</span>
|
651
697
|
|
652
698
|
<span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_find_class'>find_class</span><span class='lparen'>(</span><span class='id identifier rubyid_cls'>cls</span><span class='comma'>,</span> <span class='id identifier rubyid_scope'>scope</span> <span class='op'>=</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>::@</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='id identifier rubyid_only_in_scope'>only_in_scope</span> <span class='op'>=</span> <span class='kw'>false</span><span class='rparen'>)</span>
|
653
699
|
<span class='kw'>if</span> <span class='lbracket'>[</span><span class='op'>::</span><span class='const'>String</span><span class='comma'>,</span> <span class='op'>::</span><span class='const'>Symbol</span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_include?'>include?</span><span class='lparen'>(</span><span class='id identifier rubyid_cls'>cls</span><span class='period'>.</span><span class='id identifier rubyid_class'>class</span><span class='rparen'>)</span>
|
@@ -1080,6 +1126,120 @@ Otherwise the class of the object will returned.</p>
|
|
1080
1126
|
</td>
|
1081
1127
|
</tr>
|
1082
1128
|
</table>
|
1129
|
+
</div>
|
1130
|
+
|
1131
|
+
<div class="method_details ">
|
1132
|
+
<h3 class="signature " id="loaded_modules-class_method">
|
1133
|
+
|
1134
|
+
+ (<tt>Array</tt>) <strong>loaded_modules</strong>
|
1135
|
+
|
1136
|
+
|
1137
|
+
|
1138
|
+
|
1139
|
+
|
1140
|
+
</h3><div class="docstring">
|
1141
|
+
<div class="discussion">
|
1142
|
+
<p>Returns the list of loaded Lazier modules.</p>
|
1143
|
+
|
1144
|
+
|
1145
|
+
</div>
|
1146
|
+
</div>
|
1147
|
+
<div class="tags">
|
1148
|
+
|
1149
|
+
<p class="tag_title">Returns:</p>
|
1150
|
+
<ul class="return">
|
1151
|
+
|
1152
|
+
<li>
|
1153
|
+
|
1154
|
+
|
1155
|
+
<span class='type'>(<tt>Array</tt>)</span>
|
1156
|
+
|
1157
|
+
|
1158
|
+
|
1159
|
+
—
|
1160
|
+
<div class='inline'><p>The list of loaded Lazier modules.</p>
|
1161
|
+
</div>
|
1162
|
+
|
1163
|
+
</li>
|
1164
|
+
|
1165
|
+
</ul>
|
1166
|
+
|
1167
|
+
</div><table class="source_code">
|
1168
|
+
<tr>
|
1169
|
+
<td>
|
1170
|
+
<pre class="lines">
|
1171
|
+
|
1172
|
+
|
1173
|
+
125
|
1174
|
+
126
|
1175
|
+
127</pre>
|
1176
|
+
</td>
|
1177
|
+
<td>
|
1178
|
+
<pre class="code"><span class="info file"># File 'lib/lazier.rb', line 125</span>
|
1179
|
+
|
1180
|
+
<span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_loaded_modules'>loaded_modules</span>
|
1181
|
+
<span class='ivar'>@loaded</span> <span class='op'>||</span> <span class='lbracket'>[</span><span class='rbracket'>]</span>
|
1182
|
+
<span class='kw'>end</span></pre>
|
1183
|
+
</td>
|
1184
|
+
</tr>
|
1185
|
+
</table>
|
1186
|
+
</div>
|
1187
|
+
|
1188
|
+
<div class="method_details ">
|
1189
|
+
<h3 class="signature " id="modules_loaded?-class_method">
|
1190
|
+
|
1191
|
+
+ (<tt><span class='object_link'><a href="Lazier/Boolean.html" title="Lazier::Boolean (module)">Boolean</a></span></tt>) <strong>modules_loaded?</strong>(*modules)
|
1192
|
+
|
1193
|
+
|
1194
|
+
|
1195
|
+
|
1196
|
+
|
1197
|
+
</h3><div class="docstring">
|
1198
|
+
<div class="discussion">
|
1199
|
+
<p>Checks if <em>all</em> of the specified modules have been loaded.</p>
|
1200
|
+
|
1201
|
+
|
1202
|
+
</div>
|
1203
|
+
</div>
|
1204
|
+
<div class="tags">
|
1205
|
+
|
1206
|
+
<p class="tag_title">Returns:</p>
|
1207
|
+
<ul class="return">
|
1208
|
+
|
1209
|
+
<li>
|
1210
|
+
|
1211
|
+
|
1212
|
+
<span class='type'>(<tt><span class='object_link'><a href="Lazier/Boolean.html" title="Lazier::Boolean (module)">Boolean</a></span></tt>)</span>
|
1213
|
+
|
1214
|
+
|
1215
|
+
|
1216
|
+
—
|
1217
|
+
<div class='inline'><p><code>true</code> if the <em>all</em> of the specified modules has already been loaded, <code>false</code> otherwise.</p>
|
1218
|
+
</div>
|
1219
|
+
|
1220
|
+
</li>
|
1221
|
+
|
1222
|
+
</ul>
|
1223
|
+
|
1224
|
+
</div><table class="source_code">
|
1225
|
+
<tr>
|
1226
|
+
<td>
|
1227
|
+
<pre class="lines">
|
1228
|
+
|
1229
|
+
|
1230
|
+
132
|
1231
|
+
133
|
1232
|
+
134</pre>
|
1233
|
+
</td>
|
1234
|
+
<td>
|
1235
|
+
<pre class="code"><span class="info file"># File 'lib/lazier.rb', line 132</span>
|
1236
|
+
|
1237
|
+
<span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_modules_loaded?'>modules_loaded?</span><span class='lparen'>(</span><span class='op'>*</span><span class='id identifier rubyid_modules'>modules</span><span class='rparen'>)</span>
|
1238
|
+
<span class='lparen'>(</span><span class='id identifier rubyid_modules'>modules</span><span class='period'>.</span><span class='id identifier rubyid_flatten'>flatten</span><span class='period'>.</span><span class='id identifier rubyid_uniq'>uniq</span><span class='period'>.</span><span class='id identifier rubyid_compact'>compact</span><span class='period'>.</span><span class='id identifier rubyid_map'>map</span><span class='lparen'>(</span><span class='op'>&</span><span class='symbol'>:to_sym</span><span class='rparen'>)</span> <span class='op'>-</span> <span class='ivar'>@loaded</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_blank?'>blank?</span>
|
1239
|
+
<span class='kw'>end</span></pre>
|
1240
|
+
</td>
|
1241
|
+
</tr>
|
1242
|
+
</table>
|
1083
1243
|
</div>
|
1084
1244
|
|
1085
1245
|
<div class="method_details ">
|
@@ -1137,20 +1297,20 @@ Otherwise the class of the object will returned.</p>
|
|
1137
1297
|
<pre class="lines">
|
1138
1298
|
|
1139
1299
|
|
1140
|
-
|
1141
|
-
|
1142
|
-
|
1143
|
-
|
1144
|
-
|
1145
|
-
|
1146
|
-
|
1147
|
-
|
1148
|
-
|
1149
|
-
|
1150
|
-
|
1300
|
+
169
|
1301
|
+
170
|
1302
|
+
171
|
1303
|
+
172
|
1304
|
+
173
|
1305
|
+
174
|
1306
|
+
175
|
1307
|
+
176
|
1308
|
+
177
|
1309
|
+
178
|
1310
|
+
179</pre>
|
1151
1311
|
</td>
|
1152
1312
|
<td>
|
1153
|
-
<pre class="code"><span class="info file"># File 'lib/lazier.rb', line
|
1313
|
+
<pre class="code"><span class="info file"># File 'lib/lazier.rb', line 169</span>
|
1154
1314
|
|
1155
1315
|
<span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_platform'>platform</span><span class='lparen'>(</span><span class='id identifier rubyid_force'>force</span> <span class='op'>=</span> <span class='kw'>false</span><span class='rparen'>)</span>
|
1156
1316
|
<span class='ivar'>@platform</span> <span class='op'>=</span> <span class='kw'>nil</span> <span class='kw'>if</span> <span class='id identifier rubyid_force'>force</span>
|
@@ -1230,7 +1390,7 @@ Otherwise the class of the object will returned.</p>
|
|
1230
1390
|
</div>
|
1231
1391
|
|
1232
1392
|
<div id="footer">
|
1233
|
-
Generated on
|
1393
|
+
Generated on Thu Oct 2 10:38:44 2014 by
|
1234
1394
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
1235
1395
|
0.8.7.4 (ruby-2.1.3).
|
1236
1396
|
</div>
|
data/doc/Lazier/Boolean.html
CHANGED
@@ -288,7 +288,7 @@
|
|
288
288
|
</div>
|
289
289
|
|
290
290
|
<div id="footer">
|
291
|
-
Generated on
|
291
|
+
Generated on Thu Oct 2 10:38:44 2014 by
|
292
292
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
293
293
|
0.8.7.4 (ruby-2.1.3).
|
294
294
|
</div>
|
@@ -360,7 +360,7 @@ Options are as follows:</p>
|
|
360
360
|
</div>
|
361
361
|
|
362
362
|
<div id="footer">
|
363
|
-
Generated on
|
363
|
+
Generated on Thu Oct 2 10:38:45 2014 by
|
364
364
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
365
365
|
0.8.7.4 (ruby-2.1.3).
|
366
366
|
</div>
|
data/doc/Lazier/DateTime.html
CHANGED
@@ -466,7 +466,7 @@ DateTime.civil(2013, 6, 1).in_months(2011)
|
|
466
466
|
</div>
|
467
467
|
|
468
468
|
<div id="footer">
|
469
|
-
Generated on
|
469
|
+
Generated on Thu Oct 2 10:38:44 2014 by
|
470
470
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
471
471
|
0.8.7.4 (ruby-2.1.3).
|
472
472
|
</div>
|
@@ -864,7 +864,7 @@ Date.years(1, true, 2010, true)
|
|
864
864
|
</div>
|
865
865
|
|
866
866
|
<div id="footer">
|
867
|
-
Generated on
|
867
|
+
Generated on Thu Oct 2 10:38:44 2014 by
|
868
868
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
869
869
|
0.8.7.4 (ruby-2.1.3).
|
870
870
|
</div>
|
data/doc/Lazier/Exceptions.html
CHANGED
@@ -116,7 +116,7 @@
|
|
116
116
|
</div>
|
117
117
|
|
118
118
|
<div id="footer">
|
119
|
-
Generated on
|
119
|
+
Generated on Thu Oct 2 10:38:44 2014 by
|
120
120
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
121
121
|
0.8.7.4 (ruby-2.1.3).
|
122
122
|
</div>
|
@@ -124,7 +124,7 @@
|
|
124
124
|
</div>
|
125
125
|
|
126
126
|
<div id="footer">
|
127
|
-
Generated on
|
127
|
+
Generated on Thu Oct 2 10:38:44 2014 by
|
128
128
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
129
129
|
0.8.7.4 (ruby-2.1.3).
|
130
130
|
</div>
|
@@ -242,7 +242,7 @@
|
|
242
242
|
</div>
|
243
243
|
|
244
244
|
<div id="footer">
|
245
|
-
Generated on
|
245
|
+
Generated on Thu Oct 2 10:38:44 2014 by
|
246
246
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
247
247
|
0.8.7.4 (ruby-2.1.3).
|
248
248
|
</div>
|
@@ -204,7 +204,7 @@
|
|
204
204
|
</div>
|
205
205
|
|
206
206
|
<div id="footer">
|
207
|
-
Generated on
|
207
|
+
Generated on Thu Oct 2 10:38:44 2014 by
|
208
208
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
209
209
|
0.8.7.4 (ruby-2.1.3).
|
210
210
|
</div>
|
data/doc/Lazier/Hash.html
CHANGED
@@ -552,7 +552,7 @@
|
|
552
552
|
</div>
|
553
553
|
|
554
554
|
<div id="footer">
|
555
|
-
Generated on
|
555
|
+
Generated on Thu Oct 2 10:38:44 2014 by
|
556
556
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
557
557
|
0.8.7.4 (ruby-2.1.3).
|
558
558
|
</div>
|
data/doc/Lazier/I18n.html
CHANGED
@@ -2567,7 +2567,7 @@
|
|
2567
2567
|
</div>
|
2568
2568
|
|
2569
2569
|
<div id="footer">
|
2570
|
-
Generated on
|
2570
|
+
Generated on Thu Oct 2 10:38:44 2014 by
|
2571
2571
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
2572
2572
|
0.8.7.4 (ruby-2.1.3).
|
2573
2573
|
</div>
|
data/doc/Lazier/Math.html
CHANGED
@@ -121,7 +121,7 @@
|
|
121
121
|
</div>
|
122
122
|
|
123
123
|
<div id="footer">
|
124
|
-
Generated on
|
124
|
+
Generated on Thu Oct 2 10:38:44 2014 by
|
125
125
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
126
126
|
0.8.7.4 (ruby-2.1.3).
|
127
127
|
</div>
|
@@ -321,7 +321,7 @@
|
|
321
321
|
</div>
|
322
322
|
|
323
323
|
<div id="footer">
|
324
|
-
Generated on
|
324
|
+
Generated on Thu Oct 2 10:38:44 2014 by
|
325
325
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
326
326
|
0.8.7.4 (ruby-2.1.3).
|
327
327
|
</div>
|
data/doc/Lazier/Object.html
CHANGED
@@ -2331,7 +2331,7 @@ Passing <code>nil</code> is equal to pass an empty Hash.</p>
|
|
2331
2331
|
</div>
|
2332
2332
|
|
2333
2333
|
<div id="footer">
|
2334
|
-
Generated on
|
2334
|
+
Generated on Thu Oct 2 10:38:44 2014 by
|
2335
2335
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
2336
2336
|
0.8.7.4 (ruby-2.1.3).
|
2337
2337
|
</div>
|
data/doc/Lazier/Pathname.html
CHANGED
@@ -213,7 +213,7 @@ Pathname.new("/usr/bin/ruby").components
|
|
213
213
|
</div>
|
214
214
|
|
215
215
|
<div id="footer">
|
216
|
-
Generated on
|
216
|
+
Generated on Thu Oct 2 10:38:44 2014 by
|
217
217
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
218
218
|
0.8.7.4 (ruby-2.1.3).
|
219
219
|
</div>
|
data/doc/Lazier/Settings.html
CHANGED
@@ -2413,7 +2413,7 @@
|
|
2413
2413
|
</div>
|
2414
2414
|
|
2415
2415
|
<div id="footer">
|
2416
|
-
Generated on
|
2416
|
+
Generated on Thu Oct 2 10:38:44 2014 by
|
2417
2417
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
2418
2418
|
0.8.7.4 (ruby-2.1.3).
|
2419
2419
|
</div>
|
data/doc/Lazier/String.html
CHANGED
@@ -563,7 +563,7 @@
|
|
563
563
|
</div>
|
564
564
|
|
565
565
|
<div id="footer">
|
566
|
-
Generated on
|
566
|
+
Generated on Thu Oct 2 10:38:44 2014 by
|
567
567
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
568
568
|
0.8.7.4 (ruby-2.1.3).
|
569
569
|
</div>
|
data/doc/Lazier/TimeZone.html
CHANGED
@@ -1322,7 +1322,7 @@
|
|
1322
1322
|
</div>
|
1323
1323
|
|
1324
1324
|
<div id="footer">
|
1325
|
-
Generated on
|
1325
|
+
Generated on Thu Oct 2 10:38:44 2014 by
|
1326
1326
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
1327
1327
|
0.8.7.4 (ruby-2.1.3).
|
1328
1328
|
</div>
|
@@ -1005,7 +1005,7 @@ Returns an offset in rational value.</p>
|
|
1005
1005
|
</div>
|
1006
1006
|
|
1007
1007
|
<div id="footer">
|
1008
|
-
Generated on
|
1008
|
+
Generated on Thu Oct 2 10:38:44 2014 by
|
1009
1009
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
1010
1010
|
0.8.7.4 (ruby-2.1.3).
|
1011
1011
|
</div>
|
data/doc/Lazier/Version.html
CHANGED
@@ -134,7 +134,7 @@
|
|
134
134
|
|
135
135
|
</div>
|
136
136
|
</dt>
|
137
|
-
<dd><pre class="code"><span class='int'>
|
137
|
+
<dd><pre class="code"><span class='int'>1</span></pre></dd>
|
138
138
|
|
139
139
|
<dt id="PATCH-constant" class="">PATCH =
|
140
140
|
<div class="docstring">
|
@@ -149,7 +149,7 @@
|
|
149
149
|
|
150
150
|
</div>
|
151
151
|
</dt>
|
152
|
-
<dd><pre class="code"><span class='int'>
|
152
|
+
<dd><pre class="code"><span class='int'>0</span></pre></dd>
|
153
153
|
|
154
154
|
<dt id="STRING-constant" class="">STRING =
|
155
155
|
<div class="docstring">
|
@@ -180,7 +180,7 @@
|
|
180
180
|
</div>
|
181
181
|
|
182
182
|
<div id="footer">
|
183
|
-
Generated on
|
183
|
+
Generated on Thu Oct 2 10:38:44 2014 by
|
184
184
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
185
185
|
0.8.7.4 (ruby-2.1.3).
|
186
186
|
</div>
|
data/doc/_index.html
CHANGED
@@ -333,7 +333,7 @@
|
|
333
333
|
</div>
|
334
334
|
|
335
335
|
<div id="footer">
|
336
|
-
Generated on
|
336
|
+
Generated on Thu Oct 2 10:38:44 2014 by
|
337
337
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
338
338
|
0.8.7.4 (ruby-2.1.3).
|
339
339
|
</div>
|
data/doc/file.README.html
CHANGED
@@ -110,7 +110,7 @@ See documentation for more informations.</p>
|
|
110
110
|
</div></div>
|
111
111
|
|
112
112
|
<div id="footer">
|
113
|
-
Generated on
|
113
|
+
Generated on Thu Oct 2 10:38:44 2014 by
|
114
114
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
115
115
|
0.8.7.4 (ruby-2.1.3).
|
116
116
|
</div>
|
data/doc/index.html
CHANGED
@@ -110,7 +110,7 @@ See documentation for more informations.</p>
|
|
110
110
|
</div></div>
|
111
111
|
|
112
112
|
<div id="footer">
|
113
|
-
Generated on
|
113
|
+
Generated on Thu Oct 2 10:38:44 2014 by
|
114
114
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
115
115
|
0.8.7.4 (ruby-2.1.3).
|
116
116
|
</div>
|
data/doc/method_list.html
CHANGED
@@ -276,8 +276,8 @@
|
|
276
276
|
|
277
277
|
|
278
278
|
<li class="r1 ">
|
279
|
-
<span class='object_link'><a href="Lazier/
|
280
|
-
<small>Lazier::
|
279
|
+
<span class='object_link'><a href="Lazier/Settings.html#initialize-instance_method" title="Lazier::Settings#initialize (method)">#initialize</a></span>
|
280
|
+
<small>Lazier::Settings</small>
|
281
281
|
</li>
|
282
282
|
|
283
283
|
|
@@ -288,14 +288,14 @@
|
|
288
288
|
|
289
289
|
|
290
290
|
<li class="r1 ">
|
291
|
-
<span class='object_link'><a href="Lazier/
|
292
|
-
<small>Lazier::
|
291
|
+
<span class='object_link'><a href="Lazier/Configuration.html#initialize-instance_method" title="Lazier::Configuration#initialize (method)">#initialize</a></span>
|
292
|
+
<small>Lazier::Configuration</small>
|
293
293
|
</li>
|
294
294
|
|
295
295
|
|
296
296
|
<li class="r2 ">
|
297
|
-
<span class='object_link'><a href="Lazier/
|
298
|
-
<small>Lazier::
|
297
|
+
<span class='object_link'><a href="Lazier/I18n.html#initialize-instance_method" title="Lazier::I18n#initialize (method)">#initialize</a></span>
|
298
|
+
<small>Lazier::I18n</small>
|
299
299
|
</li>
|
300
300
|
|
301
301
|
|
@@ -372,29 +372,41 @@
|
|
372
372
|
|
373
373
|
|
374
374
|
<li class="r1 ">
|
375
|
+
<span class='object_link'><a href="Lazier.html#loaded_modules-class_method" title="Lazier.loaded_modules (method)">loaded_modules</a></span>
|
376
|
+
<small>Lazier</small>
|
377
|
+
</li>
|
378
|
+
|
379
|
+
|
380
|
+
<li class="r2 ">
|
375
381
|
<span class='object_link'><a href="Lazier/I18n.html#locale-instance_method" title="Lazier::I18n#locale (method)">#locale</a></span>
|
376
382
|
<small>Lazier::I18n</small>
|
377
383
|
</li>
|
378
384
|
|
379
385
|
|
380
|
-
<li class="
|
386
|
+
<li class="r1 ">
|
381
387
|
<span class='object_link'><a href="Lazier/I18n.html#locales-instance_method" title="Lazier::I18n#locales (method)">#locales</a></span>
|
382
388
|
<small>Lazier::I18n</small>
|
383
389
|
</li>
|
384
390
|
|
385
391
|
|
386
|
-
<li class="
|
392
|
+
<li class="r2 ">
|
387
393
|
<span class='object_link'><a href="Lazier/Math/ClassMethods.html#max-instance_method" title="Lazier::Math::ClassMethods#max (method)">#max</a></span>
|
388
394
|
<small>Lazier::Math::ClassMethods</small>
|
389
395
|
</li>
|
390
396
|
|
391
397
|
|
392
|
-
<li class="
|
398
|
+
<li class="r1 ">
|
393
399
|
<span class='object_link'><a href="Lazier/Math/ClassMethods.html#min-instance_method" title="Lazier::Math::ClassMethods#min (method)">#min</a></span>
|
394
400
|
<small>Lazier::Math::ClassMethods</small>
|
395
401
|
</li>
|
396
402
|
|
397
403
|
|
404
|
+
<li class="r2 ">
|
405
|
+
<span class='object_link'><a href="Lazier.html#modules_loaded%3F-class_method" title="Lazier.modules_loaded? (method)">modules_loaded?</a></span>
|
406
|
+
<small>Lazier</small>
|
407
|
+
</li>
|
408
|
+
|
409
|
+
|
398
410
|
<li class="r1 ">
|
399
411
|
<span class='object_link'><a href="Lazier/DateTime/ClassMethods.html#months-instance_method" title="Lazier::DateTime::ClassMethods#months (method)">#months</a></span>
|
400
412
|
<small>Lazier::DateTime::ClassMethods</small>
|
@@ -103,7 +103,7 @@
|
|
103
103
|
</div>
|
104
104
|
|
105
105
|
<div id="footer">
|
106
|
-
Generated on
|
106
|
+
Generated on Thu Oct 2 10:38:44 2014 by
|
107
107
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
108
108
|
0.8.7.4 (ruby-2.1.3).
|
109
109
|
</div>
|
data/lazier.gemspec
CHANGED
data/lib/lazier.rb
CHANGED
@@ -119,6 +119,20 @@ module Lazier
|
|
119
119
|
perform_load(:pathname, ::Pathname, ::Lazier::Pathname)
|
120
120
|
end
|
121
121
|
|
122
|
+
# Returns the list of loaded Lazier modules.
|
123
|
+
#
|
124
|
+
# @return [Array] The list of loaded Lazier modules.
|
125
|
+
def self.loaded_modules
|
126
|
+
@loaded || []
|
127
|
+
end
|
128
|
+
|
129
|
+
# Checks if *all* of the specified modules have been loaded.
|
130
|
+
#
|
131
|
+
# @return [Boolean] `true` if the *all* of the specified modules has already been loaded, `false` otherwise.
|
132
|
+
def self.modules_loaded?(*modules)
|
133
|
+
(modules.flatten.uniq.compact.map(&:to_sym) - @loaded).blank?
|
134
|
+
end
|
135
|
+
|
122
136
|
# Finds a class to instantiate.
|
123
137
|
#
|
124
138
|
# @param cls [Symbol|String|Object] If a `String` or a `Symbol` or a `Class`, then it will be the class to instantiate.
|
@@ -183,7 +197,6 @@ module Lazier
|
|
183
197
|
end
|
184
198
|
|
185
199
|
# :nodoc:
|
186
|
-
# TODO@PI: On 4.1, make loaded accessible publicly and add a Lazier.loaded? method.
|
187
200
|
def self.perform_load(mod, target = nil, extension = nil, &block)
|
188
201
|
@loaded ||= []
|
189
202
|
|
data/lib/lazier/version.rb
CHANGED
data/spec/lazier_spec.rb
CHANGED
@@ -42,6 +42,20 @@ describe Lazier do
|
|
42
42
|
end
|
43
43
|
end
|
44
44
|
|
45
|
+
describe ".loaded" do
|
46
|
+
it "should return the list of loaded modules" do
|
47
|
+
expect(Lazier.loaded_modules).to eq([:boolean, :object, :string, :hash, :datetime, :math, :pathname])
|
48
|
+
end
|
49
|
+
end
|
50
|
+
|
51
|
+
describe ".modules_loaded?" do
|
52
|
+
it "should return true if all specified modules are loaded" do
|
53
|
+
expect(Lazier.modules_loaded?(:boolean)).to be_truthy
|
54
|
+
expect(Lazier.modules_loaded?(:boolean, [:string, "object"])).to be_truthy
|
55
|
+
expect(Lazier.modules_loaded?(:boolean, :foo)).to be_falsey
|
56
|
+
end
|
57
|
+
end
|
58
|
+
|
45
59
|
describe ".find_class" do
|
46
60
|
before(:each) do
|
47
61
|
stub_const("::LazierTest::TestClass", Class.new)
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: lazier
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 4.0
|
4
|
+
version: 4.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Shogun
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-
|
11
|
+
date: 2014-10-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|