lazier 3.4.0 → 3.4.1

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: c406074bef8ec89c6386eaa1b1ee8dd37641d2f6
4
- data.tar.gz: 33c02bb14c9cf848034ebe78fb7853b90b8555d2
3
+ metadata.gz: a1a1a3a3524603b0027a8ff2a9f871f8ce6af9b6
4
+ data.tar.gz: 3e8e7b22a35b18012ce462fe1f68df915181e907
5
5
  SHA512:
6
- metadata.gz: 20304d18773f4b926834cbcee80a377c14aaf7a99dc0bd9fc7b362b424910200a68e88da9014a4b1678c1373926de7aab81fec44b7f467528a6cfcd54bfe3341
7
- data.tar.gz: 3504a324c3a480db9c9ad0dc8f309eef5d0419d774367c6b8069d184a06bfca34892401044c57b164595b82aff6a017687583268a2c52dcae1798f7378278c12
6
+ metadata.gz: 26caf1b2f2fd5f208b9f56009f51dfabeb2ab5e567e1fb684ba5c0b8af1a65f9bc50334870983bf4ef4d7662b76b6130444070fa0d0bc53101d8fef4b99b26ab
7
+ data.tar.gz: 809083ed17cd447a29eab774e559a1c8ffaeb4e28babf5eeda1fec13cfc985652e1b8f98738dd0c113c791b5edc6af620295a98390441be33331814651b9abb1
data/.gitignore CHANGED
@@ -4,3 +4,7 @@ coverage/
4
4
  pkg/
5
5
  .idea/
6
6
  .yardoc/
7
+
8
+ /metrics
9
+ /.metrics
10
+ /tmp/metric_fu
data/CHANGELOG.md CHANGED
@@ -1,3 +1,7 @@
1
+ ### 3.4.1 / 2014-01-27
2
+
3
+ * Fixed return value for `Lazier::Hash#enable_dotted_access`.
4
+
1
5
  ### 3.4.0 / 2014-01-25
2
6
 
3
7
  * Added dotted notation access for Hashes. See: `Lazier::Hash#enable_dotted_access`.
data/doc/Lazier.html CHANGED
@@ -1166,7 +1166,7 @@ Licensed under the MIT license, which can be found at http://www.opensource.org/
1166
1166
  </div>
1167
1167
 
1168
1168
  <div id="footer">
1169
- Generated on Sat Jan 25 11:01:53 2014 by
1169
+ Generated on Mon Jan 27 12:18:41 2014 by
1170
1170
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
1171
1171
  0.8.7.3 (ruby-2.1.0).
1172
1172
  </div>
@@ -288,7 +288,7 @@
288
288
  </div>
289
289
 
290
290
  <div id="footer">
291
- Generated on Sat Jan 25 11:01:53 2014 by
291
+ Generated on Mon Jan 27 12:18:41 2014 by
292
292
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
293
293
  0.8.7.3 (ruby-2.1.0).
294
294
  </div>
@@ -386,7 +386,7 @@ Options are as follows:</p>
386
386
  </div>
387
387
 
388
388
  <div id="footer">
389
- Generated on Sat Jan 25 11:01:54 2014 by
389
+ Generated on Mon Jan 27 12:18:42 2014 by
390
390
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
391
391
  0.8.7.3 (ruby-2.1.0).
392
392
  </div>
@@ -721,7 +721,7 @@ DateTime.civil(2013, 6, 1).in_months(2011)
721
721
  </div>
722
722
 
723
723
  <div id="footer">
724
- Generated on Sat Jan 25 11:01:54 2014 by
724
+ Generated on Mon Jan 27 12:18:41 2014 by
725
725
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
726
726
  0.8.7.3 (ruby-2.1.0).
727
727
  </div>
@@ -1542,7 +1542,7 @@ Date.years(1, true, 2010, true)
1542
1542
  </div>
1543
1543
 
1544
1544
  <div id="footer">
1545
- Generated on Sat Jan 25 11:01:54 2014 by
1545
+ Generated on Mon Jan 27 12:18:41 2014 by
1546
1546
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
1547
1547
  0.8.7.3 (ruby-2.1.0).
1548
1548
  </div>
@@ -116,7 +116,7 @@
116
116
  </div>
117
117
 
118
118
  <div id="footer">
119
- Generated on Sat Jan 25 11:01:54 2014 by
119
+ Generated on Mon Jan 27 12:18:41 2014 by
120
120
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
121
121
  0.8.7.3 (ruby-2.1.0).
122
122
  </div>
@@ -124,7 +124,7 @@
124
124
  </div>
125
125
 
126
126
  <div id="footer">
127
- Generated on Sat Jan 25 11:01:54 2014 by
127
+ Generated on Mon Jan 27 12:18:42 2014 by
128
128
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
129
129
  0.8.7.3 (ruby-2.1.0).
130
130
  </div>
@@ -238,7 +238,7 @@
238
238
  </div>
239
239
 
240
240
  <div id="footer">
241
- Generated on Sat Jan 25 11:01:54 2014 by
241
+ Generated on Mon Jan 27 12:18:42 2014 by
242
242
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
243
243
  0.8.7.3 (ruby-2.1.0).
244
244
  </div>
data/doc/Lazier/Hash.html CHANGED
@@ -162,7 +162,7 @@
162
162
  <li class="public ">
163
163
  <span class="summary_signature">
164
164
 
165
- <a href="#enable_dotted_access-instance_method" title="#enable_dotted_access (instance method)">- (Object) <strong>enable_dotted_access</strong>(readonly = true) </a>
165
+ <a href="#enable_dotted_access-instance_method" title="#enable_dotted_access (instance method)">- (Hash) <strong>enable_dotted_access</strong>(readonly = true) </a>
166
166
 
167
167
 
168
168
 
@@ -185,7 +185,7 @@
185
185
  <li class="public ">
186
186
  <span class="summary_signature">
187
187
 
188
- <a href="#ensure_access-instance_method" title="#ensure_access (instance method)">- (Object) <strong>ensure_access</strong>(access) </a>
188
+ <a href="#ensure_access-instance_method" title="#ensure_access (instance method)">- (Hash) <strong>ensure_access</strong>(access) </a>
189
189
 
190
190
 
191
191
 
@@ -357,7 +357,7 @@
357
357
  <div class="method_details ">
358
358
  <h3 class="signature " id="enable_dotted_access-instance_method">
359
359
 
360
- - (<tt><span class='object_link'><a href="Object.html" title="Lazier::Object (module)">Object</a></span></tt>) <strong>enable_dotted_access</strong>(readonly = true)
360
+ - (<tt><span class='object_link'><a href="" title="Lazier::Hash (module)">Hash</a></span></tt>) <strong>enable_dotted_access</strong>(readonly = true)
361
361
 
362
362
 
363
363
 
@@ -393,6 +393,23 @@
393
393
 
394
394
  </ul>
395
395
 
396
+ <p class="tag_title">Returns:</p>
397
+ <ul class="return">
398
+
399
+ <li>
400
+
401
+
402
+ <span class='type'>(<tt><span class='object_link'><a href="" title="Lazier::Hash (module)">Hash</a></span></tt>)</span>
403
+
404
+
405
+
406
+ &mdash;
407
+ <div class='inline'><p>The current hash with keys enabled for dotted access.</p>
408
+ </div>
409
+
410
+ </li>
411
+
412
+ </ul>
396
413
 
397
414
  </div><table class="source_code">
398
415
  <tr>
@@ -400,7 +417,6 @@
400
417
  <pre class="lines">
401
418
 
402
419
 
403
- 41
404
420
  42
405
421
  43
406
422
  44
@@ -414,10 +430,13 @@
414
430
  52
415
431
  53
416
432
  54
417
- 55</pre>
433
+ 55
434
+ 56
435
+ 57
436
+ 58</pre>
418
437
  </td>
419
438
  <td>
420
- <pre class="code"><span class="info file"># File 'lib/lazier/hash.rb', line 41</span>
439
+ <pre class="code"><span class="info file"># File 'lib/lazier/hash.rb', line 42</span>
421
440
 
422
441
  <span class='kw'>def</span> <span class='id identifier rubyid_enable_dotted_access'>enable_dotted_access</span><span class='lparen'>(</span><span class='id identifier rubyid_readonly'>readonly</span> <span class='op'>=</span> <span class='kw'>true</span><span class='rparen'>)</span>
423
442
  <span class='id identifier rubyid_extend'>extend</span><span class='lparen'>(</span><span class='const'>Hashie</span><span class='op'>::</span><span class='const'>Extensions</span><span class='op'>::</span><span class='const'>MethodReader</span><span class='rparen'>)</span>
@@ -433,6 +452,8 @@
433
452
  <span class='kw'>end</span>
434
453
  <span class='kw'>end</span>
435
454
  <span class='kw'>end</span>
455
+
456
+ <span class='kw'>self</span>
436
457
  <span class='kw'>end</span></pre>
437
458
  </td>
438
459
  </tr>
@@ -442,7 +463,7 @@
442
463
  <div class="method_details ">
443
464
  <h3 class="signature " id="ensure_access-instance_method">
444
465
 
445
- - (<tt><span class='object_link'><a href="Object.html" title="Lazier::Object (module)">Object</a></span></tt>) <strong>ensure_access</strong>(access)
466
+ - (<tt><span class='object_link'><a href="" title="Lazier::Hash (module)">Hash</a></span></tt>) <strong>ensure_access</strong>(access)
446
467
 
447
468
 
448
469
 
@@ -476,6 +497,23 @@
476
497
 
477
498
  </ul>
478
499
 
500
+ <p class="tag_title">Returns:</p>
501
+ <ul class="return">
502
+
503
+ <li>
504
+
505
+
506
+ <span class='type'>(<tt><span class='object_link'><a href="" title="Lazier::Hash (module)">Hash</a></span></tt>)</span>
507
+
508
+
509
+
510
+ &mdash;
511
+ <div class='inline'><p>The current hash with keys modified.</p>
512
+ </div>
513
+
514
+ </li>
515
+
516
+ </ul>
479
517
 
480
518
  </div><table class="source_code">
481
519
  <tr>
@@ -483,13 +521,13 @@
483
521
  <pre class="lines">
484
522
 
485
523
 
486
- 32
487
524
  33
488
525
  34
489
- 35</pre>
526
+ 35
527
+ 36</pre>
490
528
  </td>
491
529
  <td>
492
- <pre class="code"><span class="info file"># File 'lib/lazier/hash.rb', line 32</span>
530
+ <pre class="code"><span class="info file"># File 'lib/lazier/hash.rb', line 33</span>
493
531
 
494
532
  <span class='kw'>def</span> <span class='id identifier rubyid_ensure_access'>ensure_access</span><span class='lparen'>(</span><span class='id identifier rubyid_access'>access</span><span class='rparen'>)</span>
495
533
  <span class='id identifier rubyid_method'>method</span> <span class='op'>=</span> <span class='lbrace'>{</span><span class='label'>strings:</span> <span class='symbol'>:stringify_keys</span><span class='comma'>,</span> <span class='label'>symbols:</span> <span class='symbol'>:symbolize_keys</span><span class='comma'>,</span> <span class='label'>indifferent:</span> <span class='symbol'>:with_indifferent_access</span><span class='comma'>,</span> <span class='label'>dotted:</span> <span class='symbol'>:enable_dotted_access</span><span class='rbrace'>}</span><span class='period'>.</span><span class='id identifier rubyid_fetch'>fetch</span><span class='lparen'>(</span><span class='id identifier rubyid_access'>access</span><span class='comma'>,</span> <span class='kw'>nil</span><span class='rparen'>)</span>
@@ -505,7 +543,7 @@
505
543
  </div>
506
544
 
507
545
  <div id="footer">
508
- Generated on Sat Jan 25 11:01:53 2014 by
546
+ Generated on Mon Jan 27 12:18:41 2014 by
509
547
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
510
548
  0.8.7.3 (ruby-2.1.0).
511
549
  </div>
data/doc/Lazier/I18n.html CHANGED
@@ -1070,7 +1070,7 @@
1070
1070
  </div>
1071
1071
 
1072
1072
  <div id="footer">
1073
- Generated on Sat Jan 25 11:01:53 2014 by
1073
+ Generated on Mon Jan 27 12:18:41 2014 by
1074
1074
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
1075
1075
  0.8.7.3 (ruby-2.1.0).
1076
1076
  </div>
@@ -536,7 +536,7 @@
536
536
  </div>
537
537
 
538
538
  <div id="footer">
539
- Generated on Sat Jan 25 11:01:54 2014 by
539
+ Generated on Mon Jan 27 12:18:42 2014 by
540
540
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
541
541
  0.8.7.3 (ruby-2.1.0).
542
542
  </div>
data/doc/Lazier/Math.html CHANGED
@@ -121,7 +121,7 @@
121
121
  </div>
122
122
 
123
123
  <div id="footer">
124
- Generated on Sat Jan 25 11:01:53 2014 by
124
+ Generated on Mon Jan 27 12:18:41 2014 by
125
125
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
126
126
  0.8.7.3 (ruby-2.1.0).
127
127
  </div>
@@ -321,7 +321,7 @@
321
321
  </div>
322
322
 
323
323
  <div id="footer">
324
- Generated on Sat Jan 25 11:01:53 2014 by
324
+ Generated on Mon Jan 27 12:18:41 2014 by
325
325
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
326
326
  0.8.7.3 (ruby-2.1.0).
327
327
  </div>
@@ -2203,7 +2203,7 @@
2203
2203
  </div>
2204
2204
 
2205
2205
  <div id="footer">
2206
- Generated on Sat Jan 25 11:01:53 2014 by
2206
+ Generated on Mon Jan 27 12:18:41 2014 by
2207
2207
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
2208
2208
  0.8.7.3 (ruby-2.1.0).
2209
2209
  </div>
@@ -213,7 +213,7 @@ Pathname.new("/usr/bin/ruby").components
213
213
  </div>
214
214
 
215
215
  <div id="footer">
216
- Generated on Sat Jan 25 11:01:54 2014 by
216
+ Generated on Mon Jan 27 12:18:41 2014 by
217
217
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
218
218
  0.8.7.3 (ruby-2.1.0).
219
219
  </div>
@@ -2405,7 +2405,7 @@
2405
2405
  </div>
2406
2406
 
2407
2407
  <div id="footer">
2408
- Generated on Sat Jan 25 11:01:54 2014 by
2408
+ Generated on Mon Jan 27 12:18:42 2014 by
2409
2409
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
2410
2410
  0.8.7.3 (ruby-2.1.0).
2411
2411
  </div>
@@ -563,7 +563,7 @@
563
563
  </div>
564
564
 
565
565
  <div id="footer">
566
- Generated on Sat Jan 25 11:01:53 2014 by
566
+ Generated on Mon Jan 27 12:18:41 2014 by
567
567
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
568
568
  0.8.7.3 (ruby-2.1.0).
569
569
  </div>
@@ -1663,7 +1663,7 @@
1663
1663
  </div>
1664
1664
 
1665
1665
  <div id="footer">
1666
- Generated on Sat Jan 25 11:01:54 2014 by
1666
+ Generated on Mon Jan 27 12:18:41 2014 by
1667
1667
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
1668
1668
  0.8.7.3 (ruby-2.1.0).
1669
1669
  </div>
@@ -1015,7 +1015,7 @@ DateTime.parameterize_zone(ActiveSupport::TimeZone["Pacific Time (US &amp; Canad
1015
1015
  </div>
1016
1016
 
1017
1017
  <div id="footer">
1018
- Generated on Sat Jan 25 11:01:54 2014 by
1018
+ Generated on Mon Jan 27 12:18:41 2014 by
1019
1019
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
1020
1020
  0.8.7.3 (ruby-2.1.0).
1021
1021
  </div>
@@ -149,7 +149,7 @@
149
149
 
150
150
  </div>
151
151
  </dt>
152
- <dd><pre class="code"><span class='int'>0</span></pre></dd>
152
+ <dd><pre class="code"><span class='int'>1</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 Sat Jan 25 11:01:53 2014 by
183
+ Generated on Mon Jan 27 12:18:41 2014 by
184
184
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
185
185
  0.8.7.3 (ruby-2.1.0).
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 Sat Jan 25 11:01:53 2014 by
336
+ Generated on Mon Jan 27 12:18:40 2014 by
337
337
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
338
338
  0.8.7.3 (ruby-2.1.0).
339
339
  </div>
data/doc/file.README.html CHANGED
@@ -106,7 +106,7 @@ See documentation for more informations.</p>
106
106
  </div></div>
107
107
 
108
108
  <div id="footer">
109
- Generated on Sat Jan 25 11:01:53 2014 by
109
+ Generated on Mon Jan 27 12:18:41 2014 by
110
110
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
111
111
  0.8.7.3 (ruby-2.1.0).
112
112
  </div>
data/doc/index.html CHANGED
@@ -106,7 +106,7 @@ See documentation for more informations.</p>
106
106
  </div></div>
107
107
 
108
108
  <div id="footer">
109
- Generated on Sat Jan 25 11:01:53 2014 by
109
+ Generated on Mon Jan 27 12:18:41 2014 by
110
110
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
111
111
  0.8.7.3 (ruby-2.1.0).
112
112
  </div>
@@ -103,7 +103,7 @@
103
103
  </div>
104
104
 
105
105
  <div id="footer">
106
- Generated on Sat Jan 25 11:01:53 2014 by
106
+ Generated on Mon Jan 27 12:18:41 2014 by
107
107
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
108
108
  0.8.7.3 (ruby-2.1.0).
109
109
  </div>
data/lib/lazier/hash.rb CHANGED
@@ -29,6 +29,7 @@ module Lazier
29
29
  # Makes sure that the keys of the hash are accessible in the desired way.
30
30
  #
31
31
  # @param access [Symbol|NilClass] The requested access for the keys. Can be `:strings`, `:symbols` or `:indifferent`. If `nil` the keys are not modified.
32
+ # @return [Hash] The current hash with keys modified.
32
33
  def ensure_access(access)
33
34
  method = {strings: :stringify_keys, symbols: :symbolize_keys, indifferent: :with_indifferent_access, dotted: :enable_dotted_access}.fetch(access, nil)
34
35
  method ? send(method) : self
@@ -37,7 +38,7 @@ module Lazier
37
38
  # Makes sure that the hash is accessible using dotted notation. This is also applied to every embedded hash.
38
39
  #
39
40
  # @param readonly [Boolean] If the dotted notation is only enable for reading. `true` by default.
40
- #
41
+ # @return [Hash] The current hash with keys enabled for dotted access.
41
42
  def enable_dotted_access(readonly = true)
42
43
  extend(Hashie::Extensions::MethodReader)
43
44
  extend(Hashie::Extensions::MethodQuery)
@@ -52,6 +53,8 @@ module Lazier
52
53
  end
53
54
  end
54
55
  end
56
+
57
+ self
55
58
  end
56
59
  end
57
60
  end
@@ -16,7 +16,7 @@ module Lazier
16
16
  MINOR = 4
17
17
 
18
18
  # The patch version.
19
- PATCH = 0
19
+ PATCH = 1
20
20
 
21
21
  # The current version of lazier.
22
22
  STRING = [MAJOR, MINOR, PATCH].compact.join(".")
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: 3.4.0
4
+ version: 3.4.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Shogun
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-01-25 00:00:00.000000000 Z
11
+ date: 2014-01-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: json