lazier 1.0.2 → 1.0.3

Sign up to get free protection for your applications and to get access to all the features.
data/doc/Lazier.html CHANGED
@@ -548,7 +548,7 @@ Licensed under the MIT license, which can be found at <a href="http://www.openso
548
548
  </div>
549
549
 
550
550
  <div id="footer">
551
- Generated on Tue Aug 14 14:56:35 2012 by
551
+ Generated on Tue Aug 21 08:49:05 2012 by
552
552
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
553
553
  0.8.2.1 (ruby-1.9.2).
554
554
  </div>
@@ -288,7 +288,7 @@
288
288
  </div>
289
289
 
290
290
  <div id="footer">
291
- Generated on Tue Aug 14 14:56:35 2012 by
291
+ Generated on Tue Aug 21 08:49:05 2012 by
292
292
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
293
293
  0.8.2.1 (ruby-1.9.2).
294
294
  </div>
@@ -778,7 +778,7 @@
778
778
  </div>
779
779
 
780
780
  <div id="footer">
781
- Generated on Tue Aug 14 14:56:36 2012 by
781
+ Generated on Tue Aug 21 08:49:05 2012 by
782
782
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
783
783
  0.8.2.1 (ruby-1.9.2).
784
784
  </div>
@@ -1583,7 +1583,7 @@
1583
1583
  </div>
1584
1584
 
1585
1585
  <div id="footer">
1586
- Generated on Tue Aug 14 14:56:36 2012 by
1586
+ Generated on Tue Aug 21 08:49:05 2012 by
1587
1587
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
1588
1588
  0.8.2.1 (ruby-1.9.2).
1589
1589
  </div>
@@ -116,7 +116,7 @@
116
116
  </div>
117
117
 
118
118
  <div id="footer">
119
- Generated on Tue Aug 14 14:56:36 2012 by
119
+ Generated on Tue Aug 21 08:49:05 2012 by
120
120
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
121
121
  0.8.2.1 (ruby-1.9.2).
122
122
  </div>
@@ -124,7 +124,7 @@
124
124
  </div>
125
125
 
126
126
  <div id="footer">
127
- Generated on Tue Aug 14 14:56:36 2012 by
127
+ Generated on Tue Aug 21 08:49:05 2012 by
128
128
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
129
129
  0.8.2.1 (ruby-1.9.2).
130
130
  </div>
data/doc/Lazier/Hash.html CHANGED
@@ -384,7 +384,7 @@
384
384
  </div>
385
385
 
386
386
  <div id="footer">
387
- Generated on Tue Aug 14 14:56:35 2012 by
387
+ Generated on Tue Aug 21 08:49:05 2012 by
388
388
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
389
389
  0.8.2.1 (ruby-1.9.2).
390
390
  </div>
data/doc/Lazier/Math.html CHANGED
@@ -121,7 +121,7 @@
121
121
  </div>
122
122
 
123
123
  <div id="footer">
124
- Generated on Tue Aug 14 14:56:35 2012 by
124
+ Generated on Tue Aug 21 08:49:05 2012 by
125
125
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
126
126
  0.8.2.1 (ruby-1.9.2).
127
127
  </div>
@@ -353,7 +353,7 @@
353
353
  </div>
354
354
 
355
355
  <div id="footer">
356
- Generated on Tue Aug 14 14:56:35 2012 by
356
+ Generated on Tue Aug 21 08:49:05 2012 by
357
357
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
358
358
  0.8.2.1 (ruby-1.9.2).
359
359
  </div>
@@ -530,10 +530,6 @@
530
530
  <pre class="lines">
531
531
 
532
532
 
533
- 157
534
- 158
535
- 159
536
- 160
537
533
  161
538
534
  162
539
535
  163
@@ -544,10 +540,14 @@
544
540
  168
545
541
  169
546
542
  170
547
- 171</pre>
543
+ 171
544
+ 172
545
+ 173
546
+ 174
547
+ 175</pre>
548
548
  </td>
549
549
  <td>
550
- <pre class="code"><span class="info file"># File 'lib/lazier/object.rb', line 157</span>
550
+ <pre class="code"><span class="info file"># File 'lib/lazier/object.rb', line 161</span>
551
551
 
552
552
  <span class='kw'>def</span> <span class='id identifier rubyid_debug_dump'>debug_dump</span><span class='lparen'>(</span><span class='id identifier rubyid_format'>format</span> <span class='op'>=</span> <span class='symbol'>:yaml</span><span class='comma'>,</span> <span class='id identifier rubyid_must_raise'>must_raise</span> <span class='op'>=</span> <span class='kw'>true</span><span class='rparen'>)</span>
553
553
  <span class='id identifier rubyid_rv'>rv</span> <span class='op'>=</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_end'>&quot;</span></span>
@@ -670,13 +670,21 @@
670
670
 
671
671
  71
672
672
  72
673
- 73</pre>
673
+ 73
674
+ 74
675
+ 75
676
+ 76
677
+ 77</pre>
674
678
  </td>
675
679
  <td>
676
680
  <pre class="code"><span class="info file"># File 'lib/lazier/object.rb', line 71</span>
677
681
 
678
682
  <span class='kw'>def</span> <span class='id identifier rubyid_ensure_string'>ensure_string</span>
679
- <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_present?'>present?</span> <span class='op'>?</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_to_s'>to_s</span> <span class='op'>:</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_end'>&quot;</span></span>
683
+ <span class='kw'>if</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_is_a?'>is_a?</span><span class='lparen'>(</span><span class='op'>::</span><span class='const'>String</span><span class='rparen'>)</span> <span class='kw'>then</span>
684
+ <span class='kw'>self</span>
685
+ <span class='kw'>else</span>
686
+ <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_present?'>present?</span> <span class='op'>?</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_to_s'>to_s</span> <span class='op'>:</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_end'>&quot;</span></span>
687
+ <span class='kw'>end</span>
680
688
  <span class='kw'>end</span></pre>
681
689
  </td>
682
690
  </tr>
@@ -770,17 +778,17 @@
770
778
  <pre class="lines">
771
779
 
772
780
 
773
- 143
774
- 144
775
- 145
776
- 146
777
781
  147
778
782
  148
779
783
  149
780
- 150</pre>
784
+ 150
785
+ 151
786
+ 152
787
+ 153
788
+ 154</pre>
781
789
  </td>
782
790
  <td>
783
- <pre class="code"><span class="info file"># File 'lib/lazier/object.rb', line 143</span>
791
+ <pre class="code"><span class="info file"># File 'lib/lazier/object.rb', line 147</span>
784
792
 
785
793
  <span class='kw'>def</span> <span class='id identifier rubyid_format_boolean'>format_boolean</span><span class='lparen'>(</span><span class='id identifier rubyid_true_name'>true_name</span> <span class='op'>=</span> <span class='kw'>nil</span><span class='comma'>,</span> <span class='id identifier rubyid_false_name'>false_name</span> <span class='op'>=</span> <span class='kw'>nil</span><span class='rparen'>)</span>
786
794
  <span class='id identifier rubyid_names'>names</span> <span class='op'>=</span> <span class='lbrace'>{</span>
@@ -916,17 +924,17 @@
916
924
  <pre class="lines">
917
925
 
918
926
 
919
- 128
920
- 129
921
- 130
922
- 131
923
927
  132
924
928
  133
925
929
  134
926
- 135</pre>
930
+ 135
931
+ 136
932
+ 137
933
+ 138
934
+ 139</pre>
927
935
  </td>
928
936
  <td>
929
- <pre class="code"><span class="info file"># File 'lib/lazier/object.rb', line 128</span>
937
+ <pre class="code"><span class="info file"># File 'lib/lazier/object.rb', line 132</span>
930
938
 
931
939
  <span class='kw'>def</span> <span class='id identifier rubyid_format_number'>format_number</span><span class='lparen'>(</span><span class='id identifier rubyid_prec'>prec</span> <span class='op'>=</span> <span class='kw'>nil</span><span class='comma'>,</span> <span class='id identifier rubyid_decimal_separator'>decimal_separator</span> <span class='op'>=</span> <span class='kw'>nil</span><span class='comma'>,</span> <span class='id identifier rubyid_add_string'>add_string</span> <span class='op'>=</span> <span class='kw'>nil</span><span class='comma'>,</span> <span class='id identifier rubyid_k_separator'>k_separator</span> <span class='op'>=</span> <span class='kw'>nil</span><span class='rparen'>)</span>
932
940
  <span class='id identifier rubyid_prec'>prec</span> <span class='op'>=</span> <span class='op'>::</span><span class='const'>Lazier</span><span class='period'>.</span><span class='id identifier rubyid_settings'>settings</span><span class='period'>.</span><span class='id identifier rubyid_format_number'>format_number</span><span class='lbracket'>[</span><span class='symbol'>:prec</span><span class='rbracket'>]</span> <span class='kw'>if</span> <span class='id identifier rubyid_prec'>prec</span><span class='period'>.</span><span class='id identifier rubyid_nil?'>nil?</span>
@@ -1315,12 +1323,12 @@
1315
1323
  <pre class="lines">
1316
1324
 
1317
1325
 
1318
- 116
1319
- 117
1320
- 118</pre>
1326
+ 120
1327
+ 121
1328
+ 122</pre>
1321
1329
  </td>
1322
1330
  <td>
1323
- <pre class="code"><span class="info file"># File 'lib/lazier/object.rb', line 116</span>
1331
+ <pre class="code"><span class="info file"># File 'lib/lazier/object.rb', line 120</span>
1324
1332
 
1325
1333
  <span class='kw'>def</span> <span class='id identifier rubyid_round_to_precision'>round_to_precision</span><span class='lparen'>(</span><span class='id identifier rubyid_prec'>prec</span> <span class='op'>=</span> <span class='int'>2</span><span class='rparen'>)</span>
1326
1334
  <span class='lparen'>(</span><span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_is_number?'>is_number?</span> <span class='op'>&amp;&amp;</span> <span class='id identifier rubyid_prec'>prec</span> <span class='op'>&gt;=</span> <span class='int'>0</span><span class='rparen'>)</span> <span class='op'>?</span> <span class='id identifier rubyid_number_with_precision'>number_with_precision</span><span class='lparen'>(</span><span class='kw'>self</span><span class='comma'>,</span> <span class='symbol'>:precision</span> <span class='op'>=&gt;</span> <span class='id identifier rubyid_prec'>prec</span><span class='rparen'>)</span> <span class='op'>:</span> <span class='kw'>nil</span>
@@ -1372,14 +1380,14 @@
1372
1380
  <pre class="lines">
1373
1381
 
1374
1382
 
1375
- 106
1376
- 107
1377
- 108
1378
- 109
1379
- 110</pre>
1383
+ 110
1384
+ 111
1385
+ 112
1386
+ 113
1387
+ 114</pre>
1380
1388
  </td>
1381
1389
  <td>
1382
- <pre class="code"><span class="info file"># File 'lib/lazier/object.rb', line 106</span>
1390
+ <pre class="code"><span class="info file"># File 'lib/lazier/object.rb', line 110</span>
1383
1391
 
1384
1392
  <span class='kw'>def</span> <span class='id identifier rubyid_to_boolean'>to_boolean</span>
1385
1393
  <span class='id identifier rubyid_rv'>rv</span> <span class='op'>=</span> <span class='kw'>self</span>
@@ -1454,18 +1462,18 @@
1454
1462
  <pre class="lines">
1455
1463
 
1456
1464
 
1457
- 79
1458
- 80
1459
- 81
1460
- 82
1461
1465
  83
1462
1466
  84
1463
1467
  85
1464
1468
  86
1465
- 87</pre>
1469
+ 87
1470
+ 88
1471
+ 89
1472
+ 90
1473
+ 91</pre>
1466
1474
  </td>
1467
1475
  <td>
1468
- <pre class="code"><span class="info file"># File 'lib/lazier/object.rb', line 79</span>
1476
+ <pre class="code"><span class="info file"># File 'lib/lazier/object.rb', line 83</span>
1469
1477
 
1470
1478
  <span class='kw'>def</span> <span class='id identifier rubyid_to_float'>to_float</span><span class='lparen'>(</span><span class='id identifier rubyid_default_value'>default_value</span> <span class='op'>=</span> <span class='float'>0.0</span><span class='rparen'>)</span>
1471
1479
  <span class='kw'>if</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_is_a?'>is_a?</span><span class='lparen'>(</span><span class='op'>::</span><span class='const'>Float</span><span class='rparen'>)</span>
@@ -1544,18 +1552,18 @@
1544
1552
  <pre class="lines">
1545
1553
 
1546
1554
 
1547
- 93
1548
- 94
1549
- 95
1550
- 96
1551
1555
  97
1552
1556
  98
1553
1557
  99
1554
1558
  100
1555
- 101</pre>
1559
+ 101
1560
+ 102
1561
+ 103
1562
+ 104
1563
+ 105</pre>
1556
1564
  </td>
1557
1565
  <td>
1558
- <pre class="code"><span class="info file"># File 'lib/lazier/object.rb', line 93</span>
1566
+ <pre class="code"><span class="info file"># File 'lib/lazier/object.rb', line 97</span>
1559
1567
 
1560
1568
  <span class='kw'>def</span> <span class='id identifier rubyid_to_integer'>to_integer</span><span class='lparen'>(</span><span class='id identifier rubyid_default_value'>default_value</span> <span class='op'>=</span> <span class='int'>0</span><span class='rparen'>)</span>
1561
1569
  <span class='kw'>if</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_is_a?'>is_a?</span><span class='lparen'>(</span><span class='op'>::</span><span class='const'>Integer</span><span class='rparen'>)</span>
@@ -1576,7 +1584,7 @@
1576
1584
  </div>
1577
1585
 
1578
1586
  <div id="footer">
1579
- Generated on Tue Aug 14 14:56:35 2012 by
1587
+ Generated on Tue Aug 21 08:49:05 2012 by
1580
1588
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
1581
1589
  0.8.2.1 (ruby-1.9.2).
1582
1590
  </div>
@@ -216,7 +216,7 @@
216
216
  </div>
217
217
 
218
218
  <div id="footer">
219
- Generated on Tue Aug 14 14:56:36 2012 by
219
+ Generated on Tue Aug 21 08:49:05 2012 by
220
220
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
221
221
  0.8.2.1 (ruby-1.9.2).
222
222
  </div>
@@ -1240,7 +1240,7 @@
1240
1240
  </div>
1241
1241
 
1242
1242
  <div id="footer">
1243
- Generated on Tue Aug 14 14:56:36 2012 by
1243
+ Generated on Tue Aug 21 08:49:05 2012 by
1244
1244
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
1245
1245
  0.8.2.1 (ruby-1.9.2).
1246
1246
  </div>
@@ -462,7 +462,7 @@
462
462
  </div>
463
463
 
464
464
  <div id="footer">
465
- Generated on Tue Aug 14 14:56:35 2012 by
465
+ Generated on Tue Aug 21 08:49:05 2012 by
466
466
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
467
467
  0.8.2.1 (ruby-1.9.2).
468
468
  </div>
@@ -1666,7 +1666,7 @@
1666
1666
  </div>
1667
1667
 
1668
1668
  <div id="footer">
1669
- Generated on Tue Aug 14 14:56:36 2012 by
1669
+ Generated on Tue Aug 21 08:49:05 2012 by
1670
1670
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
1671
1671
  0.8.2.1 (ruby-1.9.2).
1672
1672
  </div>
@@ -1046,7 +1046,7 @@
1046
1046
  </div>
1047
1047
 
1048
1048
  <div id="footer">
1049
- Generated on Tue Aug 14 14:56:36 2012 by
1049
+ Generated on Tue Aug 21 08:49:05 2012 by
1050
1050
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
1051
1051
  0.8.2.1 (ruby-1.9.2).
1052
1052
  </div>
@@ -149,7 +149,7 @@
149
149
 
150
150
  </div>
151
151
  </dt>
152
- <dd><pre class="code"><span class='int'>2</span></pre></dd>
152
+ <dd><pre class="code"><span class='int'>3</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 Tue Aug 14 14:56:35 2012 by
183
+ Generated on Tue Aug 21 08:49:05 2012 by
184
184
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
185
185
  0.8.2.1 (ruby-1.9.2).
186
186
  </div>
data/doc/_index.html CHANGED
@@ -297,7 +297,7 @@
297
297
  </div>
298
298
 
299
299
  <div id="footer">
300
- Generated on Tue Aug 14 14:56:35 2012 by
300
+ Generated on Tue Aug 21 08:49:05 2012 by
301
301
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
302
302
  0.8.2.1 (ruby-1.9.2).
303
303
  </div>
data/doc/file.README.html CHANGED
@@ -98,7 +98,7 @@ Licensed under the MIT license, which can be found at <a href="http://www.openso
98
98
  </div></div>
99
99
 
100
100
  <div id="footer">
101
- Generated on Tue Aug 14 14:56:35 2012 by
101
+ Generated on Tue Aug 21 08:49:05 2012 by
102
102
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
103
103
  0.8.2.1 (ruby-1.9.2).
104
104
  </div>
data/doc/index.html CHANGED
@@ -98,7 +98,7 @@ Licensed under the MIT license, which can be found at <a href="http://www.openso
98
98
  </div></div>
99
99
 
100
100
  <div id="footer">
101
- Generated on Tue Aug 14 14:56:35 2012 by
101
+ Generated on Tue Aug 21 08:49:05 2012 by
102
102
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
103
103
  0.8.2.1 (ruby-1.9.2).
104
104
  </div>
@@ -103,7 +103,7 @@
103
103
  </div>
104
104
 
105
105
  <div id="footer">
106
- Generated on Tue Aug 14 14:56:35 2012 by
106
+ Generated on Tue Aug 21 08:49:05 2012 by
107
107
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
108
108
  0.8.2.1 (ruby-1.9.2).
109
109
  </div>
data/lib/lazier/object.rb CHANGED
@@ -69,7 +69,11 @@ module Lazier
69
69
  #
70
70
  # @return [String] The string representation of the object.
71
71
  def ensure_string
72
- self.present? ? self.to_s : ""
72
+ if self.is_a?(::String) then
73
+ self
74
+ else
75
+ self.present? ? self.to_s : ""
76
+ end
73
77
  end
74
78
 
75
79
  # Converts the object to a float.
@@ -16,7 +16,7 @@ module Lazier
16
16
  MINOR = 0
17
17
 
18
18
  # The patch version.
19
- PATCH = 2
19
+ PATCH = 3
20
20
 
21
21
  # The current version of lazier.
22
22
  STRING = [MAJOR, MINOR, PATCH].compact.join(".")
@@ -4,10 +4,11 @@
4
4
  # Licensed under the MIT license, which can be found at http://www.opensource.org/licenses/mit-license.php.
5
5
  #
6
6
 
7
- require "simplecov"
8
7
  require "pathname"
9
8
 
10
- if ENV["LAZIER_COVERAGE"] == "TRUE" then
9
+ if ENV["LAZIER_COVERAGE"] == "TRUE" && RUBY_VERSION >= "1.9" then
10
+ require "simplecov"
11
+
11
12
  root = Pathname.new(File.dirname(__FILE__)) + ".."
12
13
 
13
14
  SimpleCov.start do
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lazier
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.2
4
+ version: 1.0.3
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-08-14 00:00:00.000000000 Z
12
+ date: 2012-08-21 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: json
@@ -252,7 +252,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
252
252
  version: '0'
253
253
  segments:
254
254
  - 0
255
- hash: 846071964339718858
255
+ hash: 3224504327323783232
256
256
  required_rubygems_version: !ruby/object:Gem::Requirement
257
257
  none: false
258
258
  requirements:
@@ -261,7 +261,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
261
261
  version: '0'
262
262
  segments:
263
263
  - 0
264
- hash: 846071964339718858
264
+ hash: 3224504327323783232
265
265
  requirements: []
266
266
  rubyforge_project: lazier
267
267
  rubygems_version: 1.8.24