mack_ruby_core_extensions 0.0.3 → 0.0.4

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.
@@ -88,17 +88,17 @@
88
88
  <h3 class="section-bar">Methods</h3>
89
89
 
90
90
  <div class="name-list">
91
- <a href="#M000016">count</a>&nbsp;&nbsp;
92
- <a href="#M000008">delete_from_array</a>&nbsp;&nbsp;
93
- <a href="#M000009">delete_from_array!</a>&nbsp;&nbsp;
94
- <a href="#M000017">invert</a>&nbsp;&nbsp;
95
- <a href="#M000007">parse_splat_args</a>&nbsp;&nbsp;
96
- <a href="#M000012">pick_random</a>&nbsp;&nbsp;
97
- <a href="#M000013">random_each</a>&nbsp;&nbsp;
98
- <a href="#M000010">randomize</a>&nbsp;&nbsp;
99
- <a href="#M000011">randomize!</a>&nbsp;&nbsp;
100
- <a href="#M000014">subset?</a>&nbsp;&nbsp;
101
- <a href="#M000015">superset?</a>&nbsp;&nbsp;
91
+ <a href="#M000014">count</a>&nbsp;&nbsp;
92
+ <a href="#M000006">delete_from_array</a>&nbsp;&nbsp;
93
+ <a href="#M000007">delete_from_array!</a>&nbsp;&nbsp;
94
+ <a href="#M000015">invert</a>&nbsp;&nbsp;
95
+ <a href="#M000005">parse_splat_args</a>&nbsp;&nbsp;
96
+ <a href="#M000010">pick_random</a>&nbsp;&nbsp;
97
+ <a href="#M000011">random_each</a>&nbsp;&nbsp;
98
+ <a href="#M000008">randomize</a>&nbsp;&nbsp;
99
+ <a href="#M000009">randomize!</a>&nbsp;&nbsp;
100
+ <a href="#M000012">subset?</a>&nbsp;&nbsp;
101
+ <a href="#M000013">superset?</a>&nbsp;&nbsp;
102
102
  </div>
103
103
  </div>
104
104
 
@@ -120,26 +120,26 @@
120
120
  <div id="methods">
121
121
  <h3 class="section-bar">Public Instance methods</h3>
122
122
 
123
- <div id="method-M000016" class="method-detail">
124
- <a name="M000016"></a>
123
+ <div id="method-M000014" class="method-detail">
124
+ <a name="M000014"></a>
125
125
 
126
126
  <div class="method-heading">
127
- <a href="#M000016" class="method-signature">
127
+ <a href="#M000014" class="method-signature">
128
128
  <span class="method-name">count</span><span class="method-args">()</span>
129
129
  </a>
130
130
  </div>
131
131
 
132
132
  <div class="method-description">
133
133
  <p>
134
- This will give you a <a href="Array.html#M000016">count</a>, as a <a
134
+ This will give you a <a href="Array.html#M000014">count</a>, as a <a
135
135
  href="Hash.html">Hash</a>, of all the values in the <a
136
136
  href="Array.html">Array</a>. %w{spam spam eggs ham eggs spam}.<a
137
- href="Array.html#M000016">count</a> # =&gt; {&quot;eggs&quot; =&gt; 2,
137
+ href="Array.html#M000014">count</a> # =&gt; {&quot;eggs&quot; =&gt; 2,
138
138
  &quot;ham&quot; =&gt; 1, &quot;spam&quot; =&gt; 3}
139
139
  </p>
140
140
  <p><a class="source-toggle" href="#"
141
- onclick="toggleCode('M000016-source');return false;">[Source]</a></p>
142
- <div class="method-source-code" id="M000016-source">
141
+ onclick="toggleCode('M000014-source');return false;">[Source]</a></p>
142
+ <div class="method-source-code" id="M000014-source">
143
143
  <pre>
144
144
  <span class="ruby-comment cmt"># File lib/extensions/array.rb, line 87</span>
145
145
  87: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">count</span>
@@ -152,11 +152,11 @@ href="Array.html#M000016">count</a> # =&gt; {&quot;eggs&quot; =&gt; 2,
152
152
  </div>
153
153
  </div>
154
154
 
155
- <div id="method-M000008" class="method-detail">
156
- <a name="M000008"></a>
155
+ <div id="method-M000006" class="method-detail">
156
+ <a name="M000006"></a>
157
157
 
158
158
  <div class="method-heading">
159
- <a href="#M000008" class="method-signature">
159
+ <a href="#M000006" class="method-signature">
160
160
  <span class="method-name">delete_from_array</span><span class="method-args">(args)</span>
161
161
  </a>
162
162
  </div>
@@ -164,12 +164,12 @@ href="Array.html#M000016">count</a> # =&gt; {&quot;eggs&quot; =&gt; 2,
164
164
  <div class="method-description">
165
165
  <p>
166
166
  This allows you to delete an array of values from another array.
167
- [1,2,3,4,5].<a href="Array.html#M000008">delete_from_array</a>([2,3,5]) #
167
+ [1,2,3,4,5].<a href="Array.html#M000006">delete_from_array</a>([2,3,5]) #
168
168
  =&gt; [1,4]
169
169
  </p>
170
170
  <p><a class="source-toggle" href="#"
171
- onclick="toggleCode('M000008-source');return false;">[Source]</a></p>
172
- <div class="method-source-code" id="M000008-source">
171
+ onclick="toggleCode('M000006-source');return false;">[Source]</a></p>
172
+ <div class="method-source-code" id="M000006-source">
173
173
  <pre>
174
174
  <span class="ruby-comment cmt"># File lib/extensions/array.rb, line 37</span>
175
175
  37: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">delete_from_array</span>(<span class="ruby-identifier">args</span>)
@@ -180,23 +180,23 @@ This allows you to delete an array of values from another array.
180
180
  </div>
181
181
  </div>
182
182
 
183
- <div id="method-M000009" class="method-detail">
184
- <a name="M000009"></a>
183
+ <div id="method-M000007" class="method-detail">
184
+ <a name="M000007"></a>
185
185
 
186
186
  <div class="method-heading">
187
- <a href="#M000009" class="method-signature">
187
+ <a href="#M000007" class="method-signature">
188
188
  <span class="method-name">delete_from_array!</span><span class="method-args">(args)</span>
189
189
  </a>
190
190
  </div>
191
191
 
192
192
  <div class="method-description">
193
193
  <p>
194
- This calls the <a href="Array.html#M000008">delete_from_array</a> method,
194
+ This calls the <a href="Array.html#M000006">delete_from_array</a> method,
195
195
  but will permantly replace the existing array.
196
196
  </p>
197
197
  <p><a class="source-toggle" href="#"
198
- onclick="toggleCode('M000009-source');return false;">[Source]</a></p>
199
- <div class="method-source-code" id="M000009-source">
198
+ onclick="toggleCode('M000007-source');return false;">[Source]</a></p>
199
+ <div class="method-source-code" id="M000007-source">
200
200
  <pre>
201
201
  <span class="ruby-comment cmt"># File lib/extensions/array.rb, line 42</span>
202
202
  42: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">delete_from_array!</span>(<span class="ruby-identifier">args</span>)
@@ -207,25 +207,25 @@ but will permantly replace the existing array.
207
207
  </div>
208
208
  </div>
209
209
 
210
- <div id="method-M000017" class="method-detail">
211
- <a name="M000017"></a>
210
+ <div id="method-M000015" class="method-detail">
211
+ <a name="M000015"></a>
212
212
 
213
213
  <div class="method-heading">
214
- <a href="#M000017" class="method-signature">
214
+ <a href="#M000015" class="method-signature">
215
215
  <span class="method-name">invert</span><span class="method-args">()</span>
216
216
  </a>
217
217
  </div>
218
218
 
219
219
  <div class="method-description">
220
220
  <p>
221
- This will <a href="Array.html#M000017">invert</a> the index and the values
221
+ This will <a href="Array.html#M000015">invert</a> the index and the values
222
222
  and return a <a href="Hash.html">Hash</a> of the results. %w{red yellow
223
- orange}.<a href="Array.html#M000017">invert</a> # =&gt; {&quot;red&quot;
223
+ orange}.<a href="Array.html#M000015">invert</a> # =&gt; {&quot;red&quot;
224
224
  =&gt; 0, &quot;orange&quot; =&gt; 2, &quot;yellow&quot; =&gt; 1}
225
225
  </p>
226
226
  <p><a class="source-toggle" href="#"
227
- onclick="toggleCode('M000017-source');return false;">[Source]</a></p>
228
- <div class="method-source-code" id="M000017-source">
227
+ onclick="toggleCode('M000015-source');return false;">[Source]</a></p>
228
+ <div class="method-source-code" id="M000015-source">
229
229
  <pre>
230
230
  <span class="ruby-comment cmt"># File lib/extensions/array.rb, line 95</span>
231
231
  95: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">invert</span>
@@ -238,11 +238,11 @@ orange}.<a href="Array.html#M000017">invert</a> # =&gt; {&quot;red&quot;
238
238
  </div>
239
239
  </div>
240
240
 
241
- <div id="method-M000007" class="method-detail">
242
- <a name="M000007"></a>
241
+ <div id="method-M000005" class="method-detail">
242
+ <a name="M000005"></a>
243
243
 
244
244
  <div class="method-heading">
245
- <a href="#M000007" class="method-signature">
245
+ <a href="#M000005" class="method-signature">
246
246
  <span class="method-name">parse_splat_args</span><span class="method-args">()</span>
247
247
  </a>
248
248
  </div>
@@ -259,15 +259,15 @@ foo(*args)
259
259
  end The problem is when you use the * like that everything that comes in is
260
260
  an array. Here are a few problems with this: foo([1,2,3]) When you pass an
261
261
  array into this type of method you get the following nested array:
262
- [[1,2,3]] The <a href="Array.html#M000007">parse_splat_args</a> method, if
262
+ [[1,2,3]] The <a href="Array.html#M000005">parse_splat_args</a> method, if
263
263
  called, would do this: args.parse_splat_args # =&gt; [1,2,3] Now say you
264
264
  called this method like such: foo(1) args would be [1]
265
265
  args.parse_splat_args # =&gt; 1 Finally foo args.parse_splat_args # =&gt;
266
266
  nil
267
267
  </p>
268
268
  <p><a class="source-toggle" href="#"
269
- onclick="toggleCode('M000007-source');return false;">[Source]</a></p>
270
- <div class="method-source-code" id="M000007-source">
269
+ onclick="toggleCode('M000005-source');return false;">[Source]</a></p>
270
+ <div class="method-source-code" id="M000005-source">
271
271
  <pre>
272
272
  <span class="ruby-comment cmt"># File lib/extensions/array.rb, line 21</span>
273
273
  21: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">parse_splat_args</span>
@@ -288,11 +288,11 @@ nil
288
288
  </div>
289
289
  </div>
290
290
 
291
- <div id="method-M000012" class="method-detail">
292
- <a name="M000012"></a>
291
+ <div id="method-M000010" class="method-detail">
292
+ <a name="M000010"></a>
293
293
 
294
294
  <div class="method-heading">
295
- <a href="#M000012" class="method-signature">
295
+ <a href="#M000010" class="method-signature">
296
296
  <span class="method-name">pick_random</span><span class="method-args">()</span>
297
297
  </a>
298
298
  </div>
@@ -302,8 +302,8 @@ nil
302
302
  This will pick a random value from the array
303
303
  </p>
304
304
  <p><a class="source-toggle" href="#"
305
- onclick="toggleCode('M000012-source');return false;">[Source]</a></p>
306
- <div class="method-source-code" id="M000012-source">
305
+ onclick="toggleCode('M000010-source');return false;">[Source]</a></p>
306
+ <div class="method-source-code" id="M000010-source">
307
307
  <pre>
308
308
  <span class="ruby-comment cmt"># File lib/extensions/array.rb, line 65</span>
309
309
  65: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">pick_random</span>
@@ -314,11 +314,11 @@ This will pick a random value from the array
314
314
  </div>
315
315
  </div>
316
316
 
317
- <div id="method-M000013" class="method-detail">
318
- <a name="M000013"></a>
317
+ <div id="method-M000011" class="method-detail">
318
+ <a name="M000011"></a>
319
319
 
320
320
  <div class="method-heading">
321
- <a href="#M000013" class="method-signature">
321
+ <a href="#M000011" class="method-signature">
322
322
  <span class="method-name">random_each</span><span class="method-args">() {|x| ...}</span>
323
323
  </a>
324
324
  </div>
@@ -328,8 +328,8 @@ This will pick a random value from the array
328
328
  This allows you to easily recurse of the array randomly.
329
329
  </p>
330
330
  <p><a class="source-toggle" href="#"
331
- onclick="toggleCode('M000013-source');return false;">[Source]</a></p>
332
- <div class="method-source-code" id="M000013-source">
331
+ onclick="toggleCode('M000011-source');return false;">[Source]</a></p>
332
+ <div class="method-source-code" id="M000011-source">
333
333
  <pre>
334
334
  <span class="ruby-comment cmt"># File lib/extensions/array.rb, line 70</span>
335
335
  70: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">random_each</span>
@@ -340,11 +340,11 @@ This allows you to easily recurse of the array randomly.
340
340
  </div>
341
341
  </div>
342
342
 
343
- <div id="method-M000010" class="method-detail">
344
- <a name="M000010"></a>
343
+ <div id="method-M000008" class="method-detail">
344
+ <a name="M000008"></a>
345
345
 
346
346
  <div class="method-heading">
347
- <a href="#M000010" class="method-signature">
347
+ <a href="#M000008" class="method-signature">
348
348
  <span class="method-name">randomize</span><span class="method-args">() {|x, y| ...}</span>
349
349
  </a>
350
350
  </div>
@@ -354,8 +354,8 @@ This allows you to easily recurse of the array randomly.
354
354
  This will return a new instance of the array sorted randomly.
355
355
  </p>
356
356
  <p><a class="source-toggle" href="#"
357
- onclick="toggleCode('M000010-source');return false;">[Source]</a></p>
358
- <div class="method-source-code" id="M000010-source">
357
+ onclick="toggleCode('M000008-source');return false;">[Source]</a></p>
358
+ <div class="method-source-code" id="M000008-source">
359
359
  <pre>
360
360
  <span class="ruby-comment cmt"># File lib/extensions/array.rb, line 47</span>
361
361
  47: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">randomize</span>(<span class="ruby-operator">&amp;</span><span class="ruby-identifier">block</span>)
@@ -370,23 +370,23 @@ This will return a new instance of the array sorted randomly.
370
370
  </div>
371
371
  </div>
372
372
 
373
- <div id="method-M000011" class="method-detail">
374
- <a name="M000011"></a>
373
+ <div id="method-M000009" class="method-detail">
374
+ <a name="M000009"></a>
375
375
 
376
376
  <div class="method-heading">
377
- <a href="#M000011" class="method-signature">
377
+ <a href="#M000009" class="method-signature">
378
378
  <span class="method-name">randomize!</span><span class="method-args">(&amp;block)</span>
379
379
  </a>
380
380
  </div>
381
381
 
382
382
  <div class="method-description">
383
383
  <p>
384
- This calls the <a href="Array.html#M000010">randomize</a> method, but will
384
+ This calls the <a href="Array.html#M000008">randomize</a> method, but will
385
385
  permantly replace the existing array.
386
386
  </p>
387
387
  <p><a class="source-toggle" href="#"
388
- onclick="toggleCode('M000011-source');return false;">[Source]</a></p>
389
- <div class="method-source-code" id="M000011-source">
388
+ onclick="toggleCode('M000009-source');return false;">[Source]</a></p>
389
+ <div class="method-source-code" id="M000009-source">
390
390
  <pre>
391
391
  <span class="ruby-comment cmt"># File lib/extensions/array.rb, line 56</span>
392
392
  56: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">randomize!</span>(<span class="ruby-operator">&amp;</span><span class="ruby-identifier">block</span>)
@@ -401,19 +401,19 @@ permantly replace the existing array.
401
401
  </div>
402
402
  </div>
403
403
 
404
- <div id="method-M000014" class="method-detail">
405
- <a name="M000014"></a>
404
+ <div id="method-M000012" class="method-detail">
405
+ <a name="M000012"></a>
406
406
 
407
407
  <div class="method-heading">
408
- <a href="#M000014" class="method-signature">
408
+ <a href="#M000012" class="method-signature">
409
409
  <span class="method-name">subset?</span><span class="method-args">(other)</span>
410
410
  </a>
411
411
  </div>
412
412
 
413
413
  <div class="method-description">
414
414
  <p><a class="source-toggle" href="#"
415
- onclick="toggleCode('M000014-source');return false;">[Source]</a></p>
416
- <div class="method-source-code" id="M000014-source">
415
+ onclick="toggleCode('M000012-source');return false;">[Source]</a></p>
416
+ <div class="method-source-code" id="M000012-source">
417
417
  <pre>
418
418
  <span class="ruby-comment cmt"># File lib/extensions/array.rb, line 74</span>
419
419
  74: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">subset?</span>(<span class="ruby-identifier">other</span>)
@@ -427,19 +427,19 @@ permantly replace the existing array.
427
427
  </div>
428
428
  </div>
429
429
 
430
- <div id="method-M000015" class="method-detail">
431
- <a name="M000015"></a>
430
+ <div id="method-M000013" class="method-detail">
431
+ <a name="M000013"></a>
432
432
 
433
433
  <div class="method-heading">
434
- <a href="#M000015" class="method-signature">
434
+ <a href="#M000013" class="method-signature">
435
435
  <span class="method-name">superset?</span><span class="method-args">(other)</span>
436
436
  </a>
437
437
  </div>
438
438
 
439
439
  <div class="method-description">
440
440
  <p><a class="source-toggle" href="#"
441
- onclick="toggleCode('M000015-source');return false;">[Source]</a></p>
442
- <div class="method-source-code" id="M000015-source">
441
+ onclick="toggleCode('M000013-source');return false;">[Source]</a></p>
442
+ <div class="method-source-code" id="M000013-source">
443
443
  <pre>
444
444
  <span class="ruby-comment cmt"># File lib/extensions/array.rb, line 81</span>
445
445
  81: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">superset?</span>(<span class="ruby-identifier">other</span>)
@@ -88,8 +88,8 @@
88
88
  <h3 class="section-bar">Methods</h3>
89
89
 
90
90
  <div class="name-list">
91
- <a href="#M000023">class_is_a?</a>&nbsp;&nbsp;
92
- <a href="#M000022">new_instance_of</a>&nbsp;&nbsp;
91
+ <a href="#M000021">class_is_a?</a>&nbsp;&nbsp;
92
+ <a href="#M000020">new_instance_of</a>&nbsp;&nbsp;
93
93
  </div>
94
94
  </div>
95
95
 
@@ -111,26 +111,35 @@
111
111
  <div id="methods">
112
112
  <h3 class="section-bar">Public Class methods</h3>
113
113
 
114
- <div id="method-M000022" class="method-detail">
115
- <a name="M000022"></a>
114
+ <div id="method-M000020" class="method-detail">
115
+ <a name="M000020"></a>
116
116
 
117
117
  <div class="method-heading">
118
- <a href="#M000022" class="method-signature">
118
+ <a href="#M000020" class="method-signature">
119
119
  <span class="method-name">new_instance_of</span><span class="method-args">(klass_name)</span>
120
120
  </a>
121
121
  </div>
122
122
 
123
123
  <div class="method-description">
124
+ <p>
125
+ Returns a new <a href="Object.html">Object</a> instance of the class name
126
+ specified.
127
+ </p>
128
+ <p>
129
+ Examples:
130
+ </p>
131
+ <pre>
132
+ Class.new_instance_of(&quot;Orange&quot;) =&gt; #&lt;Orange:0x376c0c&gt;
133
+ Class.new_instance_of(&quot;Animals::Dog&quot;) =&gt; #&lt;Animals::Dog:0x376a2c&gt;
134
+ </pre>
124
135
  <p><a class="source-toggle" href="#"
125
- onclick="toggleCode('M000022-source');return false;">[Source]</a></p>
126
- <div class="method-source-code" id="M000022-source">
136
+ onclick="toggleCode('M000020-source');return false;">[Source]</a></p>
137
+ <div class="method-source-code" id="M000020-source">
127
138
  <pre>
128
- <span class="ruby-comment cmt"># File lib/extensions/class.rb, line 3</span>
129
- 3: <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">new_instance_of</span>(<span class="ruby-identifier">klass_name</span>)
130
- 4: <span class="ruby-identifier">mod</span> = <span class="ruby-constant">Module</span>
131
- 5: <span class="ruby-identifier">mod</span> = <span class="ruby-identifier">mod</span>.<span class="ruby-identifier">const_get</span>(<span class="ruby-identifier">klass_name</span>)
132
- 6: <span class="ruby-identifier">mod</span>.<span class="ruby-identifier">new</span>
133
- 7: <span class="ruby-keyword kw">end</span>
139
+ <span class="ruby-comment cmt"># File lib/extensions/class.rb, line 8</span>
140
+ 8: <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">new_instance_of</span>(<span class="ruby-identifier">klass_name</span>)
141
+ 9: <span class="ruby-identifier">klass_name</span>.<span class="ruby-identifier">constantize</span>.<span class="ruby-identifier">new</span>
142
+ 10: <span class="ruby-keyword kw">end</span>
134
143
  </pre>
135
144
  </div>
136
145
  </div>
@@ -138,29 +147,33 @@
138
147
 
139
148
  <h3 class="section-bar">Public Instance methods</h3>
140
149
 
141
- <div id="method-M000023" class="method-detail">
142
- <a name="M000023"></a>
150
+ <div id="method-M000021" class="method-detail">
151
+ <a name="M000021"></a>
143
152
 
144
153
  <div class="method-heading">
145
- <a href="#M000023" class="method-signature">
154
+ <a href="#M000021" class="method-signature">
146
155
  <span class="method-name">class_is_a?</span><span class="method-args">(klass_name)</span>
147
156
  </a>
148
157
  </div>
149
158
 
150
159
  <div class="method-description">
160
+ <p>
161
+ This will through the ancestor tree of object and tell you if that object
162
+ is of the specified type.
163
+ </p>
151
164
  <p><a class="source-toggle" href="#"
152
- onclick="toggleCode('M000023-source');return false;">[Source]</a></p>
153
- <div class="method-source-code" id="M000023-source">
165
+ onclick="toggleCode('M000021-source');return false;">[Source]</a></p>
166
+ <div class="method-source-code" id="M000021-source">
154
167
  <pre>
155
- <span class="ruby-comment cmt"># File lib/extensions/class.rb, line 9</span>
156
- 9: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">class_is_a?</span>(<span class="ruby-identifier">klass_name</span>)
157
- 10: <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">ancestors</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">an</span><span class="ruby-operator">|</span>
158
- 11: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">an</span> <span class="ruby-operator">==</span> <span class="ruby-identifier">klass_name</span>
159
- 12: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">true</span>
160
- 13: <span class="ruby-keyword kw">end</span>
161
- 14: <span class="ruby-keyword kw">end</span>
162
- 15: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">false</span>
163
- 16: <span class="ruby-keyword kw">end</span>
168
+ <span class="ruby-comment cmt"># File lib/extensions/class.rb, line 14</span>
169
+ 14: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">class_is_a?</span>(<span class="ruby-identifier">klass_name</span>)
170
+ 15: <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">ancestors</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">an</span><span class="ruby-operator">|</span>
171
+ 16: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">an</span> <span class="ruby-operator">==</span> <span class="ruby-identifier">klass_name</span>
172
+ 17: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">true</span>
173
+ 18: <span class="ruby-keyword kw">end</span>
174
+ 19: <span class="ruby-keyword kw">end</span>
175
+ 20: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">false</span>
176
+ 21: <span class="ruby-keyword kw">end</span>
164
177
  </pre>
165
178
  </div>
166
179
  </div>
@@ -88,7 +88,7 @@
88
88
  <h3 class="section-bar">Methods</h3>
89
89
 
90
90
  <div class="name-list">
91
- <a href="#M000021">prec</a>&nbsp;&nbsp;
91
+ <a href="#M000019">prec</a>&nbsp;&nbsp;
92
92
  </div>
93
93
  </div>
94
94
 
@@ -110,19 +110,19 @@
110
110
  <div id="methods">
111
111
  <h3 class="section-bar">Public Instance methods</h3>
112
112
 
113
- <div id="method-M000021" class="method-detail">
114
- <a name="M000021"></a>
113
+ <div id="method-M000019" class="method-detail">
114
+ <a name="M000019"></a>
115
115
 
116
116
  <div class="method-heading">
117
- <a href="#M000021" class="method-signature">
117
+ <a href="#M000019" class="method-signature">
118
118
  <span class="method-name">prec</span><span class="method-args">(x)</span>
119
119
  </a>
120
120
  </div>
121
121
 
122
122
  <div class="method-description">
123
123
  <p><a class="source-toggle" href="#"
124
- onclick="toggleCode('M000021-source');return false;">[Source]</a></p>
125
- <div class="method-source-code" id="M000021-source">
124
+ onclick="toggleCode('M000019-source');return false;">[Source]</a></p>
125
+ <div class="method-source-code" id="M000019-source">
126
126
  <pre>
127
127
  <span class="ruby-comment cmt"># File lib/extensions/float.rb, line 2</span>
128
128
  2: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">prec</span>(<span class="ruby-identifier">x</span>)
@@ -88,9 +88,9 @@
88
88
  <h3 class="section-bar">Methods</h3>
89
89
 
90
90
  <div class="name-list">
91
- <a href="#M000005">-</a>&nbsp;&nbsp;
92
- <a href="#M000004">join</a>&nbsp;&nbsp;
93
- <a href="#M000006">to_params</a>&nbsp;&nbsp;
91
+ <a href="#M000003">-</a>&nbsp;&nbsp;
92
+ <a href="#M000002">join</a>&nbsp;&nbsp;
93
+ <a href="#M000004">to_params</a>&nbsp;&nbsp;
94
94
  </div>
95
95
  </div>
96
96
 
@@ -112,11 +112,11 @@
112
112
  <div id="methods">
113
113
  <h3 class="section-bar">Public Instance methods</h3>
114
114
 
115
- <div id="method-M000005" class="method-detail">
116
- <a name="M000005"></a>
115
+ <div id="method-M000003" class="method-detail">
116
+ <a name="M000003"></a>
117
117
 
118
118
  <div class="method-heading">
119
- <a href="#M000005" class="method-signature">
119
+ <a href="#M000003" class="method-signature">
120
120
  <span class="method-name">-</span><span class="method-args">(ars)</span>
121
121
  </a>
122
122
  </div>
@@ -126,8 +126,8 @@
126
126
  Deletes the key(s) passed in from the hash.
127
127
  </p>
128
128
  <p><a class="source-toggle" href="#"
129
- onclick="toggleCode('M000005-source');return false;">[Source]</a></p>
130
- <div class="method-source-code" id="M000005-source">
129
+ onclick="toggleCode('M000003-source');return false;">[Source]</a></p>
130
+ <div class="method-source-code" id="M000003-source">
131
131
  <pre>
132
132
  <span class="ruby-comment cmt"># File lib/extensions/hash.rb, line 12</span>
133
133
  12: <span class="ruby-keyword kw">def</span> <span class="ruby-operator">-</span>(<span class="ruby-identifier">ars</span>)
@@ -139,19 +139,19 @@ Deletes the key(s) passed in from the hash.
139
139
  </div>
140
140
  </div>
141
141
 
142
- <div id="method-M000004" class="method-detail">
143
- <a name="M000004"></a>
142
+ <div id="method-M000002" class="method-detail">
143
+ <a name="M000002"></a>
144
144
 
145
145
  <div class="method-heading">
146
- <a href="#M000004" class="method-signature">
146
+ <a href="#M000002" class="method-signature">
147
147
  <span class="method-name">join</span><span class="method-args">(pair_string, join_string)</span>
148
148
  </a>
149
149
  </div>
150
150
 
151
151
  <div class="method-description">
152
152
  <p><a class="source-toggle" href="#"
153
- onclick="toggleCode('M000004-source');return false;">[Source]</a></p>
154
- <div class="method-source-code" id="M000004-source">
153
+ onclick="toggleCode('M000002-source');return false;">[Source]</a></p>
154
+ <div class="method-source-code" id="M000002-source">
155
155
  <pre>
156
156
  <span class="ruby-comment cmt"># File lib/extensions/hash.rb, line 3</span>
157
157
  3: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">join</span>(<span class="ruby-identifier">pair_string</span>, <span class="ruby-identifier">join_string</span>)
@@ -166,11 +166,11 @@ Deletes the key(s) passed in from the hash.
166
166
  </div>
167
167
  </div>
168
168
 
169
- <div id="method-M000006" class="method-detail">
170
- <a name="M000006"></a>
169
+ <div id="method-M000004" class="method-detail">
170
+ <a name="M000004"></a>
171
171
 
172
172
  <div class="method-heading">
173
- <a href="#M000006" class="method-signature">
173
+ <a href="#M000004" class="method-signature">
174
174
  <span class="method-name">to_params</span><span class="method-args">(escape = true)</span>
175
175
  </a>
176
176
  </div>
@@ -181,8 +181,8 @@ Converts a hash to query string parameters. An optional boolean escapes the
181
181
  values if true, which is the default.
182
182
  </p>
183
183
  <p><a class="source-toggle" href="#"
184
- onclick="toggleCode('M000006-source');return false;">[Source]</a></p>
185
- <div class="method-source-code" id="M000006-source">
184
+ onclick="toggleCode('M000004-source');return false;">[Source]</a></p>
185
+ <div class="method-source-code" id="M000004-source">
186
186
  <pre>
187
187
  <span class="ruby-comment cmt"># File lib/extensions/hash.rb, line 19</span>
188
188
  19: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">to_params</span>(<span class="ruby-identifier">escape</span> = <span class="ruby-keyword kw">true</span>)