facets 2.5.1 → 2.5.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (64) hide show
  1. data/CHANGES +113 -13
  2. data/MANIFEST +23 -19
  3. data/RELEASE +22 -22
  4. data/VERSION +1 -1
  5. data/doc/{archive → changelogs}/CHANGELOG-0.10.30 +0 -0
  6. data/doc/{archive → changelogs}/CHANGELOG-1.8.54 +0 -0
  7. data/doc/{archive → changelogs}/CHANGELOG-2.4.5 +0 -0
  8. data/doc/log/basic_stats/index.html +4 -4
  9. data/doc/rdoc/core/classes/Array.html +148 -148
  10. data/doc/rdoc/core/classes/Binding.html +45 -45
  11. data/doc/rdoc/core/classes/Class.html +38 -38
  12. data/doc/rdoc/core/classes/Comparable.html +26 -26
  13. data/doc/rdoc/core/classes/Enumerable.html +224 -139
  14. data/doc/rdoc/core/classes/Enumerable/Enumerator.html +126 -13
  15. data/doc/rdoc/core/classes/Enumerator.html +123 -13
  16. data/doc/rdoc/core/classes/Exception.html +8 -8
  17. data/doc/rdoc/core/classes/File.html +58 -58
  18. data/doc/rdoc/core/classes/FileTest.html +4 -4
  19. data/doc/rdoc/core/classes/Float.html +8 -8
  20. data/doc/rdoc/core/classes/Functor.html +12 -12
  21. data/doc/rdoc/core/classes/Hash.html +289 -266
  22. data/doc/rdoc/core/classes/Indexable.html +110 -110
  23. data/doc/rdoc/core/classes/Integer.html +2 -2
  24. data/doc/rdoc/core/classes/Kernel.html +329 -329
  25. data/doc/rdoc/core/classes/Lazy/Promise.html +1 -1
  26. data/doc/rdoc/core/classes/MatchData.html +15 -15
  27. data/doc/rdoc/core/classes/Module.html +161 -161
  28. data/doc/rdoc/core/classes/NilClass.html +23 -23
  29. data/doc/rdoc/core/classes/Numeric.html +27 -27
  30. data/doc/rdoc/core/classes/Object.html +8 -8
  31. data/doc/rdoc/core/classes/ObjectSpace.html +5 -5
  32. data/doc/rdoc/core/classes/Proc.html +22 -22
  33. data/doc/rdoc/core/classes/Regexp.html +1 -1
  34. data/doc/rdoc/core/classes/Stackable.html +31 -31
  35. data/doc/rdoc/core/classes/String.html +270 -270
  36. data/doc/rdoc/core/classes/Symbol.html +1 -1
  37. data/doc/rdoc/core/classes/TrueClass.html +8 -8
  38. data/doc/rdoc/core/classes/UnboundMethod.html +12 -12
  39. data/doc/rdoc/core/created.rid +1 -1
  40. data/doc/rdoc/core/files/lib/core/facets/hash/dearray_values_rb.html +92 -0
  41. data/doc/rdoc/core/files/lib/core/facets/to_hash_rb.html +2 -1
  42. data/doc/rdoc/core/fr_file_index.html +1 -0
  43. data/doc/rdoc/core/fr_method_index.html +401 -385
  44. data/doc/{archive → release-notes}/RELEASE-2.0.5 +0 -0
  45. data/doc/{archive → release-notes}/RELEASE-2.1.0 +0 -0
  46. data/doc/{archive → release-notes}/RELEASE-2.1.1 +0 -0
  47. data/doc/{archive → release-notes}/RELEASE-2.1.2 +0 -0
  48. data/doc/{archive → release-notes}/RELEASE-2.1.3 +0 -0
  49. data/doc/{archive → release-notes}/RELEASE-2.2.0 +0 -0
  50. data/doc/{archive → release-notes}/RELEASE-2.2.1 +0 -0
  51. data/doc/{archive → release-notes}/RELEASE-2.3.0 +0 -0
  52. data/doc/{archive → release-notes}/RELEASE-2.4.0 +0 -0
  53. data/doc/{archive → release-notes}/RELEASE-2.4.1 +0 -0
  54. data/doc/{archive → release-notes}/RELEASE-2.4.2 +0 -0
  55. data/doc/{archive → release-notes}/RELEASE-2.4.3 +0 -0
  56. data/doc/{archive → release-notes}/RELEASE-2.4.4 +0 -0
  57. data/doc/{archive → release-notes}/RELEASE-2.4.5 +0 -0
  58. data/doc/{archive → release-notes}/RELEASE-2.5.0 +0 -0
  59. data/lib/core/facets/hash/dearray_values.rb +46 -0
  60. data/lib/core/facets/to_hash.rb +109 -74
  61. data/task/setup.rake +17 -9
  62. data/test/core/hash/test_dearray_values.rb +19 -0
  63. data/test/core/test_to_hash.rb +116 -24
  64. metadata +26 -21
@@ -81,7 +81,12 @@ Object
81
81
 
82
82
 
83
83
  <div class="sectiontitle">Methods</div>
84
- <span style="padding-right: 5px;"><a href="#M000458">to_h</a></span>
84
+ <span style="padding-right: 5px;"><a href="#M000469">to_h</a></span>
85
+ <span style="padding-right: 5px;"><a href="#M000473">to_h_assoc</a></span>
86
+ <span style="padding-right: 5px;"><a href="#M000470">to_h_auto</a></span>
87
+ <span style="padding-right: 5px;"><a href="#M000472">to_h_flat</a></span>
88
+ <span style="padding-right: 5px;"><a href="#M000474">to_h_multi</a></span>
89
+ <span style="padding-right: 5px;"><a href="#M000471">to_h_splat</a></span>
85
90
 
86
91
 
87
92
 
@@ -91,30 +96,33 @@ Object
91
96
  <div class="sectiontitle">Public Instance methods</div>
92
97
  <div class="method">
93
98
  <div class="title">
94
- <a name="M000458"></a><b>to_h</b>(mode=nil)
99
+ <a name="M000469"></a><b>to_h</b>(mode=nil)
95
100
  </div>
96
101
  <div class="description">
97
102
  <p>
98
- Convert an <a href="Enumerator.html">Enumerable::Enumerator</a> object
99
- directly into a hash.
103
+ Convert an <a href="Enumerator.html">Enumerable::Enumerator</a> object into
104
+ a hash. This is equivalent to <a
105
+ href="../Array.html#M000136">Array#to_h</a>.
100
106
  </p>
101
107
  <pre>
102
- e = [1,2,3,4,5].to_enum
103
- e.to_h #=&gt; {5=&gt;nil, 1=&gt;2, 3=&gt;4}
104
- e2 = [1,2,1,3,1,5].to_enum
105
- e2.to_h #=&gt; {1=&gt;5}
106
- e3 = [[1,:a],[2,:b],[3,:c]].to_enum
107
- e3.to_h #=&gt; { 1=&gt;:a, 2=&gt;:b, 3=&gt;:c }
108
+ e1 = [[1,:a],[2,:b],[3,:c]].to_enum
109
+ e1.to_h #=&gt; { 1=&gt;:a, 2=&gt;:b, 3=&gt;:c }
110
+
111
+ e2 = [1,2,3,4,5].to_enum
112
+ e2.to_h #=&gt; {5=&gt;nil, 1=&gt;2, 3=&gt;4}
113
+
114
+ e3 = [1,2,1,3,1,5].to_enum
115
+ e3.to_h #=&gt; {1=&gt;5}
108
116
  </pre>
109
117
  <p>
110
118
  CREDIT: Sandor Szücs
111
119
  </p>
112
120
  </div>
113
121
  <div class="sourcecode">
114
- <p class="source-link">[ <a href="javascript:toggleSource('M000458_source')" id="l_M000458_source">+</a> ]</p>
115
- <div id="M000458_source" class="dyn-source">
122
+ <p class="source-link">[ <a href="javascript:toggleSource('M000469_source')" id="l_M000469_source">+</a> ]</p>
123
+ <div id="M000469_source" class="dyn-source">
116
124
  <pre>
117
- <span class="ruby-comment cmt"># File lib/core/facets/to_hash.rb, line 304</span>
125
+ <span class="ruby-comment cmt"># File lib/core/facets/to_hash.rb, line 288</span>
118
126
  <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">to_h</span>(<span class="ruby-identifier">mode</span>=<span class="ruby-keyword kw">nil</span>)
119
127
  <span class="ruby-identifier">to_a</span>.<span class="ruby-identifier">to_h</span>(<span class="ruby-identifier">mode</span>)
120
128
  <span class="ruby-keyword kw">end</span>
@@ -122,6 +130,111 @@ CREDIT: Sandor Szücs
122
130
  </div>
123
131
  </div>
124
132
  </div>
133
+ <div class="method">
134
+ <div class="title">
135
+ <a name="M000473"></a><b>to_h_assoc</b>()
136
+ </div>
137
+ <div class="description">
138
+ <p>
139
+ This is equivalent to <a href="../Array.html#M000140">Array#to_h_assoc</a>.
140
+ </p>
141
+ </div>
142
+ <div class="sourcecode">
143
+ <p class="source-link">[ <a href="javascript:toggleSource('M000473_source')" id="l_M000473_source">+</a> ]</p>
144
+ <div id="M000473_source" class="dyn-source">
145
+ <pre>
146
+ <span class="ruby-comment cmt"># File lib/core/facets/to_hash.rb, line 312</span>
147
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">to_h_assoc</span>
148
+ <span class="ruby-identifier">to_a</span>.<span class="ruby-identifier">to_h_assoc</span>
149
+ <span class="ruby-keyword kw">end</span>
150
+ </pre>
151
+ </div>
152
+ </div>
153
+ </div>
154
+ <div class="method">
155
+ <div class="title">
156
+ <a name="M000470"></a><b>to_h_auto</b>()
157
+ </div>
158
+ <div class="description">
159
+ <p>
160
+ This is equivalent to <a href="../Array.html#M000137">Array#to_h_auto</a>.
161
+ </p>
162
+ </div>
163
+ <div class="sourcecode">
164
+ <p class="source-link">[ <a href="javascript:toggleSource('M000470_source')" id="l_M000470_source">+</a> ]</p>
165
+ <div id="M000470_source" class="dyn-source">
166
+ <pre>
167
+ <span class="ruby-comment cmt"># File lib/core/facets/to_hash.rb, line 294</span>
168
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">to_h_auto</span>
169
+ <span class="ruby-identifier">to_a</span>.<span class="ruby-identifier">to_h_auto</span>
170
+ <span class="ruby-keyword kw">end</span>
171
+ </pre>
172
+ </div>
173
+ </div>
174
+ </div>
175
+ <div class="method">
176
+ <div class="title">
177
+ <a name="M000472"></a><b>to_h_flat</b>()
178
+ </div>
179
+ <div class="description">
180
+ <p>
181
+ This is equivalent to <a href="../Array.html#M000139">Array#to_h_flat</a>.
182
+ </p>
183
+ </div>
184
+ <div class="sourcecode">
185
+ <p class="source-link">[ <a href="javascript:toggleSource('M000472_source')" id="l_M000472_source">+</a> ]</p>
186
+ <div id="M000472_source" class="dyn-source">
187
+ <pre>
188
+ <span class="ruby-comment cmt"># File lib/core/facets/to_hash.rb, line 306</span>
189
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">to_h_flat</span>
190
+ <span class="ruby-identifier">to_a</span>.<span class="ruby-identifier">to_h_flat</span>
191
+ <span class="ruby-keyword kw">end</span>
192
+ </pre>
193
+ </div>
194
+ </div>
195
+ </div>
196
+ <div class="method">
197
+ <div class="title">
198
+ <a name="M000474"></a><b>to_h_multi</b>()
199
+ </div>
200
+ <div class="description">
201
+ <p>
202
+ This is equivalent to <a href="../Array.html#M000141">Array#to_h_multi</a>.
203
+ </p>
204
+ </div>
205
+ <div class="sourcecode">
206
+ <p class="source-link">[ <a href="javascript:toggleSource('M000474_source')" id="l_M000474_source">+</a> ]</p>
207
+ <div id="M000474_source" class="dyn-source">
208
+ <pre>
209
+ <span class="ruby-comment cmt"># File lib/core/facets/to_hash.rb, line 318</span>
210
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">to_h_multi</span>
211
+ <span class="ruby-identifier">to_a</span>.<span class="ruby-identifier">to_h_multi</span>
212
+ <span class="ruby-keyword kw">end</span>
213
+ </pre>
214
+ </div>
215
+ </div>
216
+ </div>
217
+ <div class="method">
218
+ <div class="title">
219
+ <a name="M000471"></a><b>to_h_splat</b>()
220
+ </div>
221
+ <div class="description">
222
+ <p>
223
+ This is equivalent to <a href="../Array.html#M000138">Array#to_h_splat</a>.
224
+ </p>
225
+ </div>
226
+ <div class="sourcecode">
227
+ <p class="source-link">[ <a href="javascript:toggleSource('M000471_source')" id="l_M000471_source">+</a> ]</p>
228
+ <div id="M000471_source" class="dyn-source">
229
+ <pre>
230
+ <span class="ruby-comment cmt"># File lib/core/facets/to_hash.rb, line 300</span>
231
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">to_h_splat</span>
232
+ <span class="ruby-identifier">to_a</span>.<span class="ruby-identifier">to_h_splat</span>
233
+ <span class="ruby-keyword kw">end</span>
234
+ </pre>
235
+ </div>
236
+ </div>
237
+ </div>
125
238
  </div>
126
239
 
127
240
  </div>
@@ -81,7 +81,12 @@ Object
81
81
 
82
82
 
83
83
  <div class="sectiontitle">Methods</div>
84
- <span style="padding-right: 5px;"><a href="#M000172">to_h</a></span>
84
+ <span style="padding-right: 5px;"><a href="#M000173">to_h</a></span>
85
+ <span style="padding-right: 5px;"><a href="#M000177">to_h_assoc</a></span>
86
+ <span style="padding-right: 5px;"><a href="#M000174">to_h_auto</a></span>
87
+ <span style="padding-right: 5px;"><a href="#M000176">to_h_flat</a></span>
88
+ <span style="padding-right: 5px;"><a href="#M000178">to_h_multi</a></span>
89
+ <span style="padding-right: 5px;"><a href="#M000175">to_h_splat</a></span>
85
90
 
86
91
 
87
92
 
@@ -91,32 +96,32 @@ Object
91
96
  <div class="sectiontitle">Public Instance methods</div>
92
97
  <div class="method">
93
98
  <div class="title">
94
- <a name="M000172"></a><b>to_h</b>(mode=nil)
99
+ <a name="M000173"></a><b>to_h</b>(mode=nil)
95
100
  </div>
96
101
  <div class="description">
97
102
  <p>
98
- Convert an <a href="Enumerator.html">Enumerator</a> object directly into a
99
- hash.
103
+ Convert an <a href="Enumerator.html">Enumerator</a> object into a hash.
104
+ This is equivalent to <a href="Array.html#M000136">Array#to_h</a>.
100
105
  </p>
101
106
  <pre>
102
- e3 = [[1,:a],[2,:b],[3,:c]].to_enum
103
- e3.to_h #=&gt; { 1=&gt;:a, 2=&gt;:b, 3=&gt;:c }
107
+ e1 = [[1,:a],[2,:b],[3,:c]].to_enum
108
+ e1.to_h #=&gt; { 1=&gt;:a, 2=&gt;:b, 3=&gt;:c }
104
109
 
105
- e1 = [1,2,3,4,5].to_enum
106
- e1.to_h #=&gt; {5=&gt;nil, 1=&gt;2, 3=&gt;4}
110
+ e2 = [1,2,3,4,5].to_enum
111
+ e2.to_h #=&gt; {5=&gt;nil, 1=&gt;2, 3=&gt;4}
107
112
 
108
- e2 = [1,2,1,3,1,5].to_enum
109
- e2.to_h #=&gt; {1=&gt;5}
113
+ e3 = [1,2,1,3,1,5].to_enum
114
+ e3.to_h #=&gt; {1=&gt;5}
110
115
  </pre>
111
116
  <p>
112
117
  CREDIT: Sandor Szücs
113
118
  </p>
114
119
  </div>
115
120
  <div class="sourcecode">
116
- <p class="source-link">[ <a href="javascript:toggleSource('M000172_source')" id="l_M000172_source">+</a> ]</p>
117
- <div id="M000172_source" class="dyn-source">
121
+ <p class="source-link">[ <a href="javascript:toggleSource('M000173_source')" id="l_M000173_source">+</a> ]</p>
122
+ <div id="M000173_source" class="dyn-source">
118
123
  <pre>
119
- <span class="ruby-comment cmt"># File lib/core/facets/to_hash.rb, line 327</span>
124
+ <span class="ruby-comment cmt"># File lib/core/facets/to_hash.rb, line 342</span>
120
125
  <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">to_h</span>(<span class="ruby-identifier">mode</span>=<span class="ruby-keyword kw">nil</span>)
121
126
  <span class="ruby-identifier">to_a</span>.<span class="ruby-identifier">to_h</span>(<span class="ruby-identifier">mode</span>)
122
127
  <span class="ruby-keyword kw">end</span>
@@ -124,6 +129,111 @@ CREDIT: Sandor Szücs
124
129
  </div>
125
130
  </div>
126
131
  </div>
132
+ <div class="method">
133
+ <div class="title">
134
+ <a name="M000177"></a><b>to_h_assoc</b>()
135
+ </div>
136
+ <div class="description">
137
+ <p>
138
+ This is equivalent to <a href="Array.html#M000140">Array#to_h_assoc</a>.
139
+ </p>
140
+ </div>
141
+ <div class="sourcecode">
142
+ <p class="source-link">[ <a href="javascript:toggleSource('M000177_source')" id="l_M000177_source">+</a> ]</p>
143
+ <div id="M000177_source" class="dyn-source">
144
+ <pre>
145
+ <span class="ruby-comment cmt"># File lib/core/facets/to_hash.rb, line 366</span>
146
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">to_h_assoc</span>
147
+ <span class="ruby-identifier">to_a</span>.<span class="ruby-identifier">to_h_assoc</span>
148
+ <span class="ruby-keyword kw">end</span>
149
+ </pre>
150
+ </div>
151
+ </div>
152
+ </div>
153
+ <div class="method">
154
+ <div class="title">
155
+ <a name="M000174"></a><b>to_h_auto</b>()
156
+ </div>
157
+ <div class="description">
158
+ <p>
159
+ This is equivalent to <a href="Array.html#M000137">Array#to_h_auto</a>.
160
+ </p>
161
+ </div>
162
+ <div class="sourcecode">
163
+ <p class="source-link">[ <a href="javascript:toggleSource('M000174_source')" id="l_M000174_source">+</a> ]</p>
164
+ <div id="M000174_source" class="dyn-source">
165
+ <pre>
166
+ <span class="ruby-comment cmt"># File lib/core/facets/to_hash.rb, line 348</span>
167
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">to_h_auto</span>
168
+ <span class="ruby-identifier">to_a</span>.<span class="ruby-identifier">to_h_auto</span>
169
+ <span class="ruby-keyword kw">end</span>
170
+ </pre>
171
+ </div>
172
+ </div>
173
+ </div>
174
+ <div class="method">
175
+ <div class="title">
176
+ <a name="M000176"></a><b>to_h_flat</b>()
177
+ </div>
178
+ <div class="description">
179
+ <p>
180
+ This is equivalent to <a href="Array.html#M000139">Array#to_h_flat</a>.
181
+ </p>
182
+ </div>
183
+ <div class="sourcecode">
184
+ <p class="source-link">[ <a href="javascript:toggleSource('M000176_source')" id="l_M000176_source">+</a> ]</p>
185
+ <div id="M000176_source" class="dyn-source">
186
+ <pre>
187
+ <span class="ruby-comment cmt"># File lib/core/facets/to_hash.rb, line 360</span>
188
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">to_h_flat</span>
189
+ <span class="ruby-identifier">to_a</span>.<span class="ruby-identifier">to_h_flat</span>
190
+ <span class="ruby-keyword kw">end</span>
191
+ </pre>
192
+ </div>
193
+ </div>
194
+ </div>
195
+ <div class="method">
196
+ <div class="title">
197
+ <a name="M000178"></a><b>to_h_multi</b>()
198
+ </div>
199
+ <div class="description">
200
+ <p>
201
+ This is equivalent to <a href="Array.html#M000141">Array#to_h_multi</a>.
202
+ </p>
203
+ </div>
204
+ <div class="sourcecode">
205
+ <p class="source-link">[ <a href="javascript:toggleSource('M000178_source')" id="l_M000178_source">+</a> ]</p>
206
+ <div id="M000178_source" class="dyn-source">
207
+ <pre>
208
+ <span class="ruby-comment cmt"># File lib/core/facets/to_hash.rb, line 372</span>
209
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">to_h_multi</span>
210
+ <span class="ruby-identifier">to_a</span>.<span class="ruby-identifier">to_h_multi</span>
211
+ <span class="ruby-keyword kw">end</span>
212
+ </pre>
213
+ </div>
214
+ </div>
215
+ </div>
216
+ <div class="method">
217
+ <div class="title">
218
+ <a name="M000175"></a><b>to_h_splat</b>()
219
+ </div>
220
+ <div class="description">
221
+ <p>
222
+ This is equivalent to <a href="Array.html#M000138">Array#to_h_splat</a>.
223
+ </p>
224
+ </div>
225
+ <div class="sourcecode">
226
+ <p class="source-link">[ <a href="javascript:toggleSource('M000175_source')" id="l_M000175_source">+</a> ]</p>
227
+ <div id="M000175_source" class="dyn-source">
228
+ <pre>
229
+ <span class="ruby-comment cmt"># File lib/core/facets/to_hash.rb, line 354</span>
230
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">to_h_splat</span>
231
+ <span class="ruby-identifier">to_a</span>.<span class="ruby-identifier">to_h_splat</span>
232
+ <span class="ruby-keyword kw">end</span>
233
+ </pre>
234
+ </div>
235
+ </div>
236
+ </div>
127
237
  </div>
128
238
 
129
239
  </div>
@@ -82,8 +82,8 @@ Object
82
82
 
83
83
 
84
84
  <div class="sectiontitle">Methods</div>
85
- <span style="padding-right: 5px;"><a href="#M000231">detail</a></span>
86
- <span style="padding-right: 5px;"><a href="#M000230">suppress</a></span>
85
+ <span style="padding-right: 5px;"><a href="#M000237">detail</a></span>
86
+ <span style="padding-right: 5px;"><a href="#M000236">suppress</a></span>
87
87
 
88
88
 
89
89
 
@@ -93,7 +93,7 @@ Object
93
93
  <div class="sectiontitle">Public Class methods</div>
94
94
  <div class="method">
95
95
  <div class="title">
96
- <a name="M000230"></a><b>suppress</b>(*exception_classes) {|| ...}
96
+ <a name="M000236"></a><b>suppress</b>(*exception_classes) {|| ...}
97
97
  </div>
98
98
  <div class="description">
99
99
  <p>
@@ -104,8 +104,8 @@ CREDIT: David Heinemeier Hansson, Thomas Sawyer
104
104
  </p>
105
105
  </div>
106
106
  <div class="sourcecode">
107
- <p class="source-link">[ <a href="javascript:toggleSource('M000230_source')" id="l_M000230_source">+</a> ]</p>
108
- <div id="M000230_source" class="dyn-source">
107
+ <p class="source-link">[ <a href="javascript:toggleSource('M000236_source')" id="l_M000236_source">+</a> ]</p>
108
+ <div id="M000236_source" class="dyn-source">
109
109
  <pre>
110
110
  <span class="ruby-comment cmt"># File lib/core/facets/exception/suppress.rb, line 7</span>
111
111
  <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">suppress</span>(<span class="ruby-operator">*</span><span class="ruby-identifier">exception_classes</span>)
@@ -126,7 +126,7 @@ CREDIT: David Heinemeier Hansson, Thomas Sawyer
126
126
  <div class="sectiontitle">Public Instance methods</div>
127
127
  <div class="method">
128
128
  <div class="title">
129
- <a name="M000231"></a><b>detail</b>()
129
+ <a name="M000237"></a><b>detail</b>()
130
130
  </div>
131
131
  <div class="description">
132
132
  <p>
@@ -144,8 +144,8 @@ CREDIT: George Moschovitis
144
144
  </p>
145
145
  </div>
146
146
  <div class="sourcecode">
147
- <p class="source-link">[ <a href="javascript:toggleSource('M000231_source')" id="l_M000231_source">+</a> ]</p>
148
- <div id="M000231_source" class="dyn-source">
147
+ <p class="source-link">[ <a href="javascript:toggleSource('M000237_source')" id="l_M000237_source">+</a> ]</p>
148
+ <div id="M000237_source" class="dyn-source">
149
149
  <pre>
150
150
  <span class="ruby-comment cmt"># File lib/core/facets/exception/detail.rb, line 14</span>
151
151
  <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">detail</span>
@@ -90,19 +90,19 @@ Object
90
90
 
91
91
 
92
92
  <div class="sectiontitle">Methods</div>
93
- <span style="padding-right: 5px;"><a href="#M000254">append</a></span>
94
- <span style="padding-right: 5px;"><a href="#M000251">create</a></span>
95
- <span style="padding-right: 5px;"><a href="#M000250">null</a></span>
96
- <span style="padding-right: 5px;"><a href="#M000259">read_binary</a></span>
97
- <span style="padding-right: 5px;"><a href="#M000260">read_list</a></span>
98
- <span style="padding-right: 5px;"><a href="#M000256">rewrite</a></span>
99
- <span style="padding-right: 5px;"><a href="#M000257">rewrite!</a></span>
100
- <span style="padding-right: 5px;"><a href="#M000248">rootname</a></span>
101
- <span style="padding-right: 5px;"><a href="#M000258">sanitize</a></span>
102
- <span style="padding-right: 5px;"><a href="#M000255">split_all</a></span>
103
- <span style="padding-right: 5px;"><a href="#M000249">split_root</a></span>
104
- <span style="padding-right: 5px;"><a href="#M000252">write</a></span>
105
- <span style="padding-right: 5px;"><a href="#M000253">writelines</a></span>
93
+ <span style="padding-right: 5px;"><a href="#M000260">append</a></span>
94
+ <span style="padding-right: 5px;"><a href="#M000257">create</a></span>
95
+ <span style="padding-right: 5px;"><a href="#M000256">null</a></span>
96
+ <span style="padding-right: 5px;"><a href="#M000265">read_binary</a></span>
97
+ <span style="padding-right: 5px;"><a href="#M000266">read_list</a></span>
98
+ <span style="padding-right: 5px;"><a href="#M000262">rewrite</a></span>
99
+ <span style="padding-right: 5px;"><a href="#M000263">rewrite!</a></span>
100
+ <span style="padding-right: 5px;"><a href="#M000254">rootname</a></span>
101
+ <span style="padding-right: 5px;"><a href="#M000264">sanitize</a></span>
102
+ <span style="padding-right: 5px;"><a href="#M000261">split_all</a></span>
103
+ <span style="padding-right: 5px;"><a href="#M000255">split_root</a></span>
104
+ <span style="padding-right: 5px;"><a href="#M000258">write</a></span>
105
+ <span style="padding-right: 5px;"><a href="#M000259">writelines</a></span>
106
106
 
107
107
 
108
108
 
@@ -112,7 +112,7 @@ Object
112
112
  <div class="sectiontitle">Public Class methods</div>
113
113
  <div class="method">
114
114
  <div class="title">
115
- <a name="M000254"></a><b>append</b>( file, str )
115
+ <a name="M000260"></a><b>append</b>( file, str )
116
116
  </div>
117
117
  <div class="description">
118
118
  <p>
@@ -123,8 +123,8 @@ CREDIT: George Moschovitis
123
123
  </p>
124
124
  </div>
125
125
  <div class="sourcecode">
126
- <p class="source-link">[ <a href="javascript:toggleSource('M000254_source')" id="l_M000254_source">+</a> ]</p>
127
- <div id="M000254_source" class="dyn-source">
126
+ <p class="source-link">[ <a href="javascript:toggleSource('M000260_source')" id="l_M000260_source">+</a> ]</p>
127
+ <div id="M000260_source" class="dyn-source">
128
128
  <pre>
129
129
  <span class="ruby-comment cmt"># File lib/core/facets/file/append.rb, line 7</span>
130
130
  <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">append</span>( <span class="ruby-identifier">file</span>, <span class="ruby-identifier">str</span> )
@@ -138,7 +138,7 @@ CREDIT: George Moschovitis
138
138
  </div>
139
139
  <div class="method">
140
140
  <div class="title">
141
- <a name="M000251"></a><b>create</b>(path, str='', &amp;blk)
141
+ <a name="M000257"></a><b>create</b>(path, str='', &amp;blk)
142
142
  </div>
143
143
  <div class="description">
144
144
  <p>
@@ -155,8 +155,8 @@ CREDIT: George Moschovitis
155
155
  </p>
156
156
  </div>
157
157
  <div class="sourcecode">
158
- <p class="source-link">[ <a href="javascript:toggleSource('M000251_source')" id="l_M000251_source">+</a> ]</p>
159
- <div id="M000251_source" class="dyn-source">
158
+ <p class="source-link">[ <a href="javascript:toggleSource('M000257_source')" id="l_M000257_source">+</a> ]</p>
159
+ <div id="M000257_source" class="dyn-source">
160
160
  <pre>
161
161
  <span class="ruby-comment cmt"># File lib/core/facets/file/create.rb, line 13</span>
162
162
  <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">create</span>(<span class="ruby-identifier">path</span>, <span class="ruby-identifier">str</span>=<span class="ruby-value str">''</span>, <span class="ruby-operator">&amp;</span><span class="ruby-identifier">blk</span>)
@@ -171,19 +171,19 @@ CREDIT: George Moschovitis
171
171
  </div>
172
172
  <div class="method">
173
173
  <div class="title">
174
- <a name="M000250"></a><b>null</b>()
174
+ <a name="M000256"></a><b>null</b>()
175
175
  </div>
176
176
  <div class="description">
177
177
  <p>
178
- Platform dependent <a href="File.html#M000250">null</a> device.
178
+ Platform dependent <a href="File.html#M000256">null</a> device.
179
179
  </p>
180
180
  <p>
181
181
  CREDIT: Daniel Burger
182
182
  </p>
183
183
  </div>
184
184
  <div class="sourcecode">
185
- <p class="source-link">[ <a href="javascript:toggleSource('M000250_source')" id="l_M000250_source">+</a> ]</p>
186
- <div id="M000250_source" class="dyn-source">
185
+ <p class="source-link">[ <a href="javascript:toggleSource('M000256_source')" id="l_M000256_source">+</a> ]</p>
186
+ <div id="M000256_source" class="dyn-source">
187
187
  <pre>
188
188
  <span class="ruby-comment cmt"># File lib/core/facets/file/null.rb, line 7</span>
189
189
  <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">null</span>
@@ -204,7 +204,7 @@ CREDIT: Daniel Burger
204
204
  </div>
205
205
  <div class="method">
206
206
  <div class="title">
207
- <a name="M000259"></a><b>read_binary</b>(fname)
207
+ <a name="M000265"></a><b>read_binary</b>(fname)
208
208
  </div>
209
209
  <div class="description">
210
210
  <p>
@@ -215,8 +215,8 @@ CREDIT: George Moschovitis
215
215
  </p>
216
216
  </div>
217
217
  <div class="sourcecode">
218
- <p class="source-link">[ <a href="javascript:toggleSource('M000259_source')" id="l_M000259_source">+</a> ]</p>
219
- <div id="M000259_source" class="dyn-source">
218
+ <p class="source-link">[ <a href="javascript:toggleSource('M000265_source')" id="l_M000265_source">+</a> ]</p>
219
+ <div id="M000265_source" class="dyn-source">
220
220
  <pre>
221
221
  <span class="ruby-comment cmt"># File lib/core/facets/file/read.rb, line 18</span>
222
222
  <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">read_binary</span>(<span class="ruby-identifier">fname</span>)
@@ -230,7 +230,7 @@ CREDIT: George Moschovitis
230
230
  </div>
231
231
  <div class="method">
232
232
  <div class="title">
233
- <a name="M000260"></a><b>read_list</b>(filepath, chomp_string='')
233
+ <a name="M000266"></a><b>read_list</b>(filepath, chomp_string='')
234
234
  </div>
235
235
  <div class="description">
236
236
  <p>
@@ -242,8 +242,8 @@ CREDIT: Trans
242
242
  </p>
243
243
  </div>
244
244
  <div class="sourcecode">
245
- <p class="source-link">[ <a href="javascript:toggleSource('M000260_source')" id="l_M000260_source">+</a> ]</p>
246
- <div id="M000260_source" class="dyn-source">
245
+ <p class="source-link">[ <a href="javascript:toggleSource('M000266_source')" id="l_M000266_source">+</a> ]</p>
246
+ <div id="M000266_source" class="dyn-source">
247
247
  <pre>
248
248
  <span class="ruby-comment cmt"># File lib/core/facets/file/read.rb, line 30</span>
249
249
  <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">read_list</span>(<span class="ruby-identifier">filepath</span>, <span class="ruby-identifier">chomp_string</span>=<span class="ruby-value str">''</span>)
@@ -261,7 +261,7 @@ CREDIT: Trans
261
261
  </div>
262
262
  <div class="method">
263
263
  <div class="title">
264
- <a name="M000256"></a><b>rewrite</b>(name, mode = &quot;&quot;) {|| ...}
264
+ <a name="M000262"></a><b>rewrite</b>(name, mode = &quot;&quot;) {|| ...}
265
265
  </div>
266
266
  <div class="description">
267
267
  <p>
@@ -279,7 +279,7 @@ exception.
279
279
  <p>
280
280
  Mode can either be &quot;b&quot; or &quot;+&quot; and specifies to open the
281
281
  file in binary mode (no mapping of the plattform&#8216;s newlines to
282
- &quot;\n&quot; is done) or to <a href="File.html#M000254">append</a> to it.
282
+ &quot;\n&quot; is done) or to <a href="File.html#M000260">append</a> to it.
283
283
  </p>
284
284
  <pre>
285
285
  # Reverse contents of &quot;message&quot;
@@ -290,7 +290,7 @@ file in binary mode (no mapping of the plattform&#8216;s newlines to
290
290
  </pre>
291
291
  <p>
292
292
  IMPORTANT: The old version of this method required in place modification of
293
- the file string. The new version will <a href="File.html#M000252">write</a>
293
+ the file string. The new version will <a href="File.html#M000258">write</a>
294
294
  whatever the block returns instead!!!
295
295
  </p>
296
296
  <p>
@@ -298,8 +298,8 @@ CREDIT: George Moschovitis
298
298
  </p>
299
299
  </div>
300
300
  <div class="sourcecode">
301
- <p class="source-link">[ <a href="javascript:toggleSource('M000256_source')" id="l_M000256_source">+</a> ]</p>
302
- <div id="M000256_source" class="dyn-source">
301
+ <p class="source-link">[ <a href="javascript:toggleSource('M000262_source')" id="l_M000262_source">+</a> ]</p>
302
+ <div id="M000262_source" class="dyn-source">
303
303
  <pre>
304
304
  <span class="ruby-comment cmt"># File lib/core/facets/file/rewrite.rb, line 28</span>
305
305
  <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">rewrite</span>(<span class="ruby-identifier">name</span>, <span class="ruby-identifier">mode</span> = <span class="ruby-value str">&quot;&quot;</span>) <span class="ruby-comment cmt">#:yield:</span>
@@ -332,11 +332,11 @@ CREDIT: George Moschovitis
332
332
  </div>
333
333
  <div class="method">
334
334
  <div class="title">
335
- <a name="M000257"></a><b>rewrite!</b>(name, mode = &quot;&quot;) {|| ...}
335
+ <a name="M000263"></a><b>rewrite!</b>(name, mode = &quot;&quot;) {|| ...}
336
336
  </div>
337
337
  <div class="description">
338
338
  <p>
339
- In place version of <a href="File.html#M000256">rewrite</a>. This version
339
+ In place version of <a href="File.html#M000262">rewrite</a>. This version
340
340
  of method requires that the string be modified in place within the block.
341
341
  </p>
342
342
  <pre>
@@ -348,8 +348,8 @@ of method requires that the string be modified in place within the block.
348
348
  </pre>
349
349
  </div>
350
350
  <div class="sourcecode">
351
- <p class="source-link">[ <a href="javascript:toggleSource('M000257_source')" id="l_M000257_source">+</a> ]</p>
352
- <div id="M000257_source" class="dyn-source">
351
+ <p class="source-link">[ <a href="javascript:toggleSource('M000263_source')" id="l_M000263_source">+</a> ]</p>
352
+ <div id="M000263_source" class="dyn-source">
353
353
  <pre>
354
354
  <span class="ruby-comment cmt"># File lib/core/facets/file/rewrite.rb, line 62</span>
355
355
  <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">rewrite!</span>(<span class="ruby-identifier">name</span>, <span class="ruby-identifier">mode</span> = <span class="ruby-value str">&quot;&quot;</span>) <span class="ruby-comment cmt">#:yield:</span>
@@ -382,7 +382,7 @@ of method requires that the string be modified in place within the block.
382
382
  </div>
383
383
  <div class="method">
384
384
  <div class="title">
385
- <a name="M000248"></a><b>rootname</b>(path)
385
+ <a name="M000254"></a><b>rootname</b>(path)
386
386
  </div>
387
387
  <div class="description">
388
388
  <p>
@@ -398,8 +398,8 @@ CREDIT: Trans
398
398
  </p>
399
399
  </div>
400
400
  <div class="sourcecode">
401
- <p class="source-link">[ <a href="javascript:toggleSource('M000248_source')" id="l_M000248_source">+</a> ]</p>
402
- <div id="M000248_source" class="dyn-source">
401
+ <p class="source-link">[ <a href="javascript:toggleSource('M000254_source')" id="l_M000254_source">+</a> ]</p>
402
+ <div id="M000254_source" class="dyn-source">
403
403
  <pre>
404
404
  <span class="ruby-comment cmt"># File lib/core/facets/file/rootname.rb, line 12</span>
405
405
  <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">rootname</span>(<span class="ruby-identifier">path</span>)
@@ -417,7 +417,7 @@ CREDIT: Trans
417
417
  </div>
418
418
  <div class="method">
419
419
  <div class="title">
420
- <a name="M000258"></a><b>sanitize</b>(filename)
420
+ <a name="M000264"></a><b>sanitize</b>(filename)
421
421
  </div>
422
422
  <div class="description">
423
423
  <p>
@@ -428,8 +428,8 @@ CREDIT: George Moschovitis
428
428
  </p>
429
429
  </div>
430
430
  <div class="sourcecode">
431
- <p class="source-link">[ <a href="javascript:toggleSource('M000258_source')" id="l_M000258_source">+</a> ]</p>
432
- <div id="M000258_source" class="dyn-source">
431
+ <p class="source-link">[ <a href="javascript:toggleSource('M000264_source')" id="l_M000264_source">+</a> ]</p>
432
+ <div id="M000264_source" class="dyn-source">
433
433
  <pre>
434
434
  <span class="ruby-comment cmt"># File lib/core/facets/file/read.rb, line 7</span>
435
435
  <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">sanitize</span>(<span class="ruby-identifier">filename</span>)
@@ -444,7 +444,7 @@ CREDIT: George Moschovitis
444
444
  </div>
445
445
  <div class="method">
446
446
  <div class="title">
447
- <a name="M000255"></a><b>split_all</b>(path)
447
+ <a name="M000261"></a><b>split_all</b>(path)
448
448
  </div>
449
449
  <div class="description">
450
450
  <p>
@@ -460,8 +460,8 @@ CREDIT: Trans
460
460
  </p>
461
461
  </div>
462
462
  <div class="sourcecode">
463
- <p class="source-link">[ <a href="javascript:toggleSource('M000255_source')" id="l_M000255_source">+</a> ]</p>
464
- <div id="M000255_source" class="dyn-source">
463
+ <p class="source-link">[ <a href="javascript:toggleSource('M000261_source')" id="l_M000261_source">+</a> ]</p>
464
+ <div id="M000261_source" class="dyn-source">
465
465
  <pre>
466
466
  <span class="ruby-comment cmt"># File lib/core/facets/file/split_all.rb, line 11</span>
467
467
  <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">split_all</span>(<span class="ruby-identifier">path</span>)
@@ -476,7 +476,7 @@ CREDIT: Trans
476
476
  </div>
477
477
  <div class="method">
478
478
  <div class="title">
479
- <a name="M000249"></a><b>split_root</b>(path)
479
+ <a name="M000255"></a><b>split_root</b>(path)
480
480
  </div>
481
481
  <div class="description">
482
482
  <p>
@@ -487,8 +487,8 @@ Return the head of path from the rest of the path.
487
487
  </pre>
488
488
  </div>
489
489
  <div class="sourcecode">
490
- <p class="source-link">[ <a href="javascript:toggleSource('M000249_source')" id="l_M000249_source">+</a> ]</p>
491
- <div id="M000249_source" class="dyn-source">
490
+ <p class="source-link">[ <a href="javascript:toggleSource('M000255_source')" id="l_M000255_source">+</a> ]</p>
491
+ <div id="M000255_source" class="dyn-source">
492
492
  <pre>
493
493
  <span class="ruby-comment cmt"># File lib/core/facets/file/split_root.rb, line 7</span>
494
494
  <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">split_root</span>(<span class="ruby-identifier">path</span>)
@@ -501,7 +501,7 @@ Return the head of path from the rest of the path.
501
501
  </div>
502
502
  <div class="method">
503
503
  <div class="title">
504
- <a name="M000252"></a><b>write</b>(path, data)
504
+ <a name="M000258"></a><b>write</b>(path, data)
505
505
  </div>
506
506
  <div class="description">
507
507
  <p>
@@ -516,8 +516,8 @@ CREDIT: Gavin Sinclair
516
516
  </p>
517
517
  </div>
518
518
  <div class="sourcecode">
519
- <p class="source-link">[ <a href="javascript:toggleSource('M000252_source')" id="l_M000252_source">+</a> ]</p>
520
- <div id="M000252_source" class="dyn-source">
519
+ <p class="source-link">[ <a href="javascript:toggleSource('M000258_source')" id="l_M000258_source">+</a> ]</p>
520
+ <div id="M000258_source" class="dyn-source">
521
521
  <pre>
522
522
  <span class="ruby-comment cmt"># File lib/core/facets/file/write.rb, line 15</span>
523
523
  <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">write</span>(<span class="ruby-identifier">path</span>, <span class="ruby-identifier">data</span>)
@@ -531,7 +531,7 @@ CREDIT: Gavin Sinclair
531
531
  </div>
532
532
  <div class="method">
533
533
  <div class="title">
534
- <a name="M000253"></a><b>writelines</b>(path, data)
534
+ <a name="M000259"></a><b>writelines</b>(path, data)
535
535
  </div>
536
536
  <div class="description">
537
537
  <p>
@@ -542,9 +542,9 @@ Ruby.
542
542
  <p>
543
543
  Note that <tt>readlines</tt> (the standard Ruby method) returns an array of
544
544
  lines <em>with newlines intact</em>, whereas <tt><a
545
- href="File.html#M000253">writelines</a></tt> uses <tt>puts</tt>, and so
545
+ href="File.html#M000259">writelines</a></tt> uses <tt>puts</tt>, and so
546
546
  appends newlines if necessary. In this small way, <tt>readlines</tt> and
547
- <tt><a href="File.html#M000253">writelines</a></tt> are not exact
547
+ <tt><a href="File.html#M000259">writelines</a></tt> are not exact
548
548
  opposites.
549
549
  </p>
550
550
  <p>
@@ -555,8 +555,8 @@ CREDIT: Noah Gibbs, Gavin Sinclair
555
555
  </p>
556
556
  </div>
557
557
  <div class="sourcecode">
558
- <p class="source-link">[ <a href="javascript:toggleSource('M000253_source')" id="l_M000253_source">+</a> ]</p>
559
- <div id="M000253_source" class="dyn-source">
558
+ <p class="source-link">[ <a href="javascript:toggleSource('M000259_source')" id="l_M000259_source">+</a> ]</p>
559
+ <div id="M000259_source" class="dyn-source">
560
560
  <pre>
561
561
  <span class="ruby-comment cmt"># File lib/core/facets/file/writelines.rb, line 16</span>
562
562
  <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">writelines</span>(<span class="ruby-identifier">path</span>, <span class="ruby-identifier">data</span>)