mack-facets 0.7.1 → 0.7.1.1
Sign up to get free protection for your applications and to get access to all the features.
- metadata +2 -47
- data/doc/classes/Array.html +0 -408
- data/doc/classes/Class.html +0 -233
- data/doc/classes/Hash.html +0 -233
- data/doc/classes/Kernel.html +0 -212
- data/doc/classes/Mack/Facets/DateTime.html +0 -168
- data/doc/classes/Mack/Facets.html +0 -111
- data/doc/classes/Mack/Utils/BlankSlate.html +0 -113
- data/doc/classes/Mack/Utils/Inflector.html +0 -382
- data/doc/classes/Mack/Utils/RegistryList.html +0 -469
- data/doc/classes/Mack/Utils/RegistryMap.html +0 -479
- data/doc/classes/Math.html +0 -188
- data/doc/classes/Module.html +0 -203
- data/doc/classes/NilClass.html +0 -148
- data/doc/classes/Object.html +0 -558
- data/doc/classes/String.html +0 -464
- data/doc/classes/Symbol.html +0 -148
- data/doc/classes/Time.html +0 -204
- data/doc/created.rid +0 -1
- data/doc/files/README.html +0 -112
- data/doc/files/lib/mack-facets/english_extensions/inflect_rb.html +0 -101
- data/doc/files/lib/mack-facets/english_extensions/numerals_rb.html +0 -101
- data/doc/files/lib/mack-facets/extensions/array_rb.html +0 -101
- data/doc/files/lib/mack-facets/extensions/class_rb.html +0 -101
- data/doc/files/lib/mack-facets/extensions/date_time_rb.html +0 -129
- data/doc/files/lib/mack-facets/extensions/hash_rb.html +0 -108
- data/doc/files/lib/mack-facets/extensions/kernel_rb.html +0 -109
- data/doc/files/lib/mack-facets/extensions/math_rb.html +0 -101
- data/doc/files/lib/mack-facets/extensions/module_rb.html +0 -101
- data/doc/files/lib/mack-facets/extensions/nil_class_rb.html +0 -101
- data/doc/files/lib/mack-facets/extensions/object_rb.html +0 -101
- data/doc/files/lib/mack-facets/extensions/string_rb.html +0 -101
- data/doc/files/lib/mack-facets/extensions/symbol_rb.html +0 -101
- data/doc/files/lib/mack-facets/extensions/time_rb.html +0 -108
- data/doc/files/lib/mack-facets/utils/blank_slate_rb.html +0 -101
- data/doc/files/lib/mack-facets/utils/inflections_rb.html +0 -101
- data/doc/files/lib/mack-facets/utils/inflector_rb.html +0 -108
- data/doc/files/lib/mack-facets/utils/options_merger_rb.html +0 -101
- data/doc/files/lib/mack-facets/utils/registry_list_rb.html +0 -108
- data/doc/files/lib/mack-facets/utils/registry_map_rb.html +0 -108
- data/doc/files/lib/mack-facets_rb.html +0 -124
- data/doc/fr_class_index.html +0 -43
- data/doc/fr_file_index.html +0 -48
- data/doc/fr_method_index.html +0 -104
- data/doc/index.html +0 -24
- data/doc/rdoc-style.css +0 -208
@@ -1,479 +0,0 @@
|
|
1
|
-
<?xml version="1.0" encoding="iso-8859-1"?>
|
2
|
-
<!DOCTYPE html
|
3
|
-
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
4
|
-
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
5
|
-
|
6
|
-
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
7
|
-
<head>
|
8
|
-
<title>Class: Mack::Utils::RegistryMap</title>
|
9
|
-
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
10
|
-
<meta http-equiv="Content-Script-Type" content="text/javascript" />
|
11
|
-
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
|
12
|
-
<script type="text/javascript">
|
13
|
-
// <![CDATA[
|
14
|
-
|
15
|
-
function popupCode( url ) {
|
16
|
-
window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
|
17
|
-
}
|
18
|
-
|
19
|
-
function toggleCode( id ) {
|
20
|
-
if ( document.getElementById )
|
21
|
-
elem = document.getElementById( id );
|
22
|
-
else if ( document.all )
|
23
|
-
elem = eval( "document.all." + id );
|
24
|
-
else
|
25
|
-
return false;
|
26
|
-
|
27
|
-
elemStyle = elem.style;
|
28
|
-
|
29
|
-
if ( elemStyle.display != "block" ) {
|
30
|
-
elemStyle.display = "block"
|
31
|
-
} else {
|
32
|
-
elemStyle.display = "none"
|
33
|
-
}
|
34
|
-
|
35
|
-
return true;
|
36
|
-
}
|
37
|
-
|
38
|
-
// Make codeblocks hidden by default
|
39
|
-
document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
|
40
|
-
|
41
|
-
// ]]>
|
42
|
-
</script>
|
43
|
-
|
44
|
-
</head>
|
45
|
-
<body>
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
<div id="classHeader">
|
50
|
-
<table class="header-table">
|
51
|
-
<tr class="top-aligned-row">
|
52
|
-
<td><strong>Class</strong></td>
|
53
|
-
<td class="class-name-in-header">Mack::Utils::RegistryMap</td>
|
54
|
-
</tr>
|
55
|
-
<tr class="top-aligned-row">
|
56
|
-
<td><strong>In:</strong></td>
|
57
|
-
<td>
|
58
|
-
<a href="../../../files/lib/mack-facets/utils/registry_map_rb.html">
|
59
|
-
lib/mack-facets/utils/registry_map.rb
|
60
|
-
</a>
|
61
|
-
<br />
|
62
|
-
</td>
|
63
|
-
</tr>
|
64
|
-
|
65
|
-
<tr class="top-aligned-row">
|
66
|
-
<td><strong>Parent:</strong></td>
|
67
|
-
<td>
|
68
|
-
<a href="../../Object.html">
|
69
|
-
Object
|
70
|
-
</a>
|
71
|
-
</td>
|
72
|
-
</tr>
|
73
|
-
</table>
|
74
|
-
</div>
|
75
|
-
<!-- banner header -->
|
76
|
-
|
77
|
-
<div id="bodyContent">
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
<div id="contextContent">
|
82
|
-
|
83
|
-
<div id="description">
|
84
|
-
<p>
|
85
|
-
Provides a convenient way to register items in a map.
|
86
|
-
</p>
|
87
|
-
<p>
|
88
|
-
The structure of the registry is { :tag => [content] }, and the items
|
89
|
-
within the array can be arranged anyway the user sees fit.
|
90
|
-
</p>
|
91
|
-
<p>
|
92
|
-
ds - july 2008
|
93
|
-
</p>
|
94
|
-
|
95
|
-
</div>
|
96
|
-
|
97
|
-
|
98
|
-
</div>
|
99
|
-
|
100
|
-
<div id="method-list">
|
101
|
-
<h3 class="section-bar">Methods</h3>
|
102
|
-
|
103
|
-
<div class="name-list">
|
104
|
-
<a href="#M000045">add</a>
|
105
|
-
<a href="#M000050">add</a>
|
106
|
-
<a href="#M000048">clear!</a>
|
107
|
-
<a href="#M000043">initial_state</a>
|
108
|
-
<a href="#M000053">move_to_bottom</a>
|
109
|
-
<a href="#M000052">move_to_top</a>
|
110
|
-
<a href="#M000047">registered_items</a>
|
111
|
-
<a href="#M000046">remove</a>
|
112
|
-
<a href="#M000051">remove</a>
|
113
|
-
<a href="#M000049">reset!</a>
|
114
|
-
<a href="#M000044">reset!</a>
|
115
|
-
</div>
|
116
|
-
</div>
|
117
|
-
|
118
|
-
</div>
|
119
|
-
|
120
|
-
|
121
|
-
<!-- if includes -->
|
122
|
-
<div id="includes">
|
123
|
-
<h3 class="section-bar">Included Modules</h3>
|
124
|
-
|
125
|
-
<div id="includes-list">
|
126
|
-
<span class="include-name">Singleton</span>
|
127
|
-
<span class="include-name">Extlib::Hook</span>
|
128
|
-
</div>
|
129
|
-
</div>
|
130
|
-
|
131
|
-
<div id="section">
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
<div id="attribute-list">
|
138
|
-
<h3 class="section-bar">Attributes</h3>
|
139
|
-
|
140
|
-
<div class="name-list">
|
141
|
-
<table>
|
142
|
-
<tr class="top-aligned-row context-row">
|
143
|
-
<td class="context-item-name">registered_items</td>
|
144
|
-
<td class="context-item-value"> [R] </td>
|
145
|
-
<td class="context-item-desc">
|
146
|
-
The list of registered items
|
147
|
-
|
148
|
-
</td>
|
149
|
-
</tr>
|
150
|
-
</table>
|
151
|
-
</div>
|
152
|
-
</div>
|
153
|
-
|
154
|
-
|
155
|
-
|
156
|
-
<!-- if method_list -->
|
157
|
-
<div id="methods">
|
158
|
-
<h3 class="section-bar">Public Class methods</h3>
|
159
|
-
|
160
|
-
<div id="method-M000050" class="method-detail">
|
161
|
-
<a name="M000050"></a>
|
162
|
-
|
163
|
-
<div class="method-heading">
|
164
|
-
<a href="#M000050" class="method-signature">
|
165
|
-
<span class="method-name">add</span><span class="method-args">(tag, klass, position = -1)</span>
|
166
|
-
</a>
|
167
|
-
</div>
|
168
|
-
|
169
|
-
<div class="method-description">
|
170
|
-
<p>
|
171
|
-
Adds an object to the list at a specified position. By default the position
|
172
|
-
is last.
|
173
|
-
</p>
|
174
|
-
<p><a class="source-toggle" href="#"
|
175
|
-
onclick="toggleCode('M000050-source');return false;">[Source]</a></p>
|
176
|
-
<div class="method-source-code" id="M000050-source">
|
177
|
-
<pre>
|
178
|
-
<span class="ruby-comment cmt"># File lib/mack-facets/utils/registry_map.rb, line 70</span>
|
179
|
-
70: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">add</span>(<span class="ruby-identifier">tag</span>, <span class="ruby-identifier">klass</span>, <span class="ruby-identifier">position</span> = <span class="ruby-value">-1</span>)
|
180
|
-
71: <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">instance</span>.<span class="ruby-identifier">add</span>(<span class="ruby-identifier">tag</span>, <span class="ruby-identifier">klass</span>, <span class="ruby-identifier">position</span>)
|
181
|
-
72: <span class="ruby-keyword kw">end</span>
|
182
|
-
</pre>
|
183
|
-
</div>
|
184
|
-
</div>
|
185
|
-
</div>
|
186
|
-
|
187
|
-
<div id="method-M000048" class="method-detail">
|
188
|
-
<a name="M000048"></a>
|
189
|
-
|
190
|
-
<div class="method-heading">
|
191
|
-
<a href="#M000048" class="method-signature">
|
192
|
-
<span class="method-name">clear!</span><span class="method-args">()</span>
|
193
|
-
</a>
|
194
|
-
</div>
|
195
|
-
|
196
|
-
<div class="method-description">
|
197
|
-
<p>
|
198
|
-
Emptys out the list of <a
|
199
|
-
href="RegistryMap.html#M000047">registered_items</a>.
|
200
|
-
</p>
|
201
|
-
<p><a class="source-toggle" href="#"
|
202
|
-
onclick="toggleCode('M000048-source');return false;">[Source]</a></p>
|
203
|
-
<div class="method-source-code" id="M000048-source">
|
204
|
-
<pre>
|
205
|
-
<span class="ruby-comment cmt"># File lib/mack-facets/utils/registry_map.rb, line 60</span>
|
206
|
-
60: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">clear!</span>
|
207
|
-
61: <span class="ruby-identifier">registered_items</span>.<span class="ruby-identifier">clear</span>
|
208
|
-
62: <span class="ruby-keyword kw">end</span>
|
209
|
-
</pre>
|
210
|
-
</div>
|
211
|
-
</div>
|
212
|
-
</div>
|
213
|
-
|
214
|
-
<div id="method-M000053" class="method-detail">
|
215
|
-
<a name="M000053"></a>
|
216
|
-
|
217
|
-
<div class="method-heading">
|
218
|
-
<a href="#M000053" class="method-signature">
|
219
|
-
<span class="method-name">move_to_bottom</span><span class="method-args">(tag, klass)</span>
|
220
|
-
</a>
|
221
|
-
</div>
|
222
|
-
|
223
|
-
<div class="method-description">
|
224
|
-
<p>
|
225
|
-
Moves an object to the bottom of the <a
|
226
|
-
href="RegistryMap.html#M000047">registered_items</a> list.
|
227
|
-
</p>
|
228
|
-
<p><a class="source-toggle" href="#"
|
229
|
-
onclick="toggleCode('M000053-source');return false;">[Source]</a></p>
|
230
|
-
<div class="method-source-code" id="M000053-source">
|
231
|
-
<pre>
|
232
|
-
<span class="ruby-comment cmt"># File lib/mack-facets/utils/registry_map.rb, line 85</span>
|
233
|
-
85: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">move_to_bottom</span>(<span class="ruby-identifier">tag</span>, <span class="ruby-identifier">klass</span>)
|
234
|
-
86: <span class="ruby-identifier">remove</span>(<span class="ruby-identifier">tag</span>, <span class="ruby-identifier">klass</span>)
|
235
|
-
87: <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">instance</span>.<span class="ruby-identifier">add</span>(<span class="ruby-identifier">tag</span>, <span class="ruby-identifier">klass</span>)
|
236
|
-
88: <span class="ruby-keyword kw">end</span>
|
237
|
-
</pre>
|
238
|
-
</div>
|
239
|
-
</div>
|
240
|
-
</div>
|
241
|
-
|
242
|
-
<div id="method-M000052" class="method-detail">
|
243
|
-
<a name="M000052"></a>
|
244
|
-
|
245
|
-
<div class="method-heading">
|
246
|
-
<a href="#M000052" class="method-signature">
|
247
|
-
<span class="method-name">move_to_top</span><span class="method-args">(tag, klass)</span>
|
248
|
-
</a>
|
249
|
-
</div>
|
250
|
-
|
251
|
-
<div class="method-description">
|
252
|
-
<p>
|
253
|
-
Moves an object to the top of the <a
|
254
|
-
href="RegistryMap.html#M000047">registered_items</a> list.
|
255
|
-
</p>
|
256
|
-
<p><a class="source-toggle" href="#"
|
257
|
-
onclick="toggleCode('M000052-source');return false;">[Source]</a></p>
|
258
|
-
<div class="method-source-code" id="M000052-source">
|
259
|
-
<pre>
|
260
|
-
<span class="ruby-comment cmt"># File lib/mack-facets/utils/registry_map.rb, line 80</span>
|
261
|
-
80: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">move_to_top</span>(<span class="ruby-identifier">tag</span>, <span class="ruby-identifier">klass</span>)
|
262
|
-
81: <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">instance</span>.<span class="ruby-identifier">add</span>(<span class="ruby-identifier">tag</span>, <span class="ruby-identifier">klass</span>, <span class="ruby-value">0</span>)
|
263
|
-
82: <span class="ruby-keyword kw">end</span>
|
264
|
-
</pre>
|
265
|
-
</div>
|
266
|
-
</div>
|
267
|
-
</div>
|
268
|
-
|
269
|
-
<div id="method-M000047" class="method-detail">
|
270
|
-
<a name="M000047"></a>
|
271
|
-
|
272
|
-
<div class="method-heading">
|
273
|
-
<a href="#M000047" class="method-signature">
|
274
|
-
<span class="method-name">registered_items</span><span class="method-args">()</span>
|
275
|
-
</a>
|
276
|
-
</div>
|
277
|
-
|
278
|
-
<div class="method-description">
|
279
|
-
<p>
|
280
|
-
Returns the list of registered items.
|
281
|
-
</p>
|
282
|
-
<p><a class="source-toggle" href="#"
|
283
|
-
onclick="toggleCode('M000047-source');return false;">[Source]</a></p>
|
284
|
-
<div class="method-source-code" id="M000047-source">
|
285
|
-
<pre>
|
286
|
-
<span class="ruby-comment cmt"># File lib/mack-facets/utils/registry_map.rb, line 55</span>
|
287
|
-
55: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">registered_items</span>
|
288
|
-
56: <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">instance</span>.<span class="ruby-identifier">registered_items</span>
|
289
|
-
57: <span class="ruby-keyword kw">end</span>
|
290
|
-
</pre>
|
291
|
-
</div>
|
292
|
-
</div>
|
293
|
-
</div>
|
294
|
-
|
295
|
-
<div id="method-M000051" class="method-detail">
|
296
|
-
<a name="M000051"></a>
|
297
|
-
|
298
|
-
<div class="method-heading">
|
299
|
-
<a href="#M000051" class="method-signature">
|
300
|
-
<span class="method-name">remove</span><span class="method-args">(tag, klass)</span>
|
301
|
-
</a>
|
302
|
-
</div>
|
303
|
-
|
304
|
-
<div class="method-description">
|
305
|
-
<p>
|
306
|
-
Removes an object from the list.
|
307
|
-
</p>
|
308
|
-
<p><a class="source-toggle" href="#"
|
309
|
-
onclick="toggleCode('M000051-source');return false;">[Source]</a></p>
|
310
|
-
<div class="method-source-code" id="M000051-source">
|
311
|
-
<pre>
|
312
|
-
<span class="ruby-comment cmt"># File lib/mack-facets/utils/registry_map.rb, line 75</span>
|
313
|
-
75: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">remove</span>(<span class="ruby-identifier">tag</span>, <span class="ruby-identifier">klass</span>)
|
314
|
-
76: <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">instance</span>.<span class="ruby-identifier">remove</span>(<span class="ruby-identifier">tag</span>, <span class="ruby-identifier">klass</span>)
|
315
|
-
77: <span class="ruby-keyword kw">end</span>
|
316
|
-
</pre>
|
317
|
-
</div>
|
318
|
-
</div>
|
319
|
-
</div>
|
320
|
-
|
321
|
-
<div id="method-M000049" class="method-detail">
|
322
|
-
<a name="M000049"></a>
|
323
|
-
|
324
|
-
<div class="method-heading">
|
325
|
-
<a href="#M000049" class="method-signature">
|
326
|
-
<span class="method-name">reset!</span><span class="method-args">()</span>
|
327
|
-
</a>
|
328
|
-
</div>
|
329
|
-
|
330
|
-
<div class="method-description">
|
331
|
-
<p>
|
332
|
-
Resets the <a href="RegistryMap.html#M000047">registered_items</a> list to
|
333
|
-
the list specified by the <a
|
334
|
-
href="RegistryMap.html#M000043">initial_state</a> method.
|
335
|
-
</p>
|
336
|
-
<p><a class="source-toggle" href="#"
|
337
|
-
onclick="toggleCode('M000049-source');return false;">[Source]</a></p>
|
338
|
-
<div class="method-source-code" id="M000049-source">
|
339
|
-
<pre>
|
340
|
-
<span class="ruby-comment cmt"># File lib/mack-facets/utils/registry_map.rb, line 65</span>
|
341
|
-
65: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">reset!</span>
|
342
|
-
66: <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">instance</span>.<span class="ruby-identifier">reset!</span>
|
343
|
-
67: <span class="ruby-keyword kw">end</span>
|
344
|
-
</pre>
|
345
|
-
</div>
|
346
|
-
</div>
|
347
|
-
</div>
|
348
|
-
|
349
|
-
<h3 class="section-bar">Public Instance methods</h3>
|
350
|
-
|
351
|
-
<div id="method-M000045" class="method-detail">
|
352
|
-
<a name="M000045"></a>
|
353
|
-
|
354
|
-
<div class="method-heading">
|
355
|
-
<a href="#M000045" class="method-signature">
|
356
|
-
<span class="method-name">add</span><span class="method-args">(tag, klass, position = -1)</span>
|
357
|
-
</a>
|
358
|
-
</div>
|
359
|
-
|
360
|
-
<div class="method-description">
|
361
|
-
<p>
|
362
|
-
Adds an object to the list at a specified position. By default the position
|
363
|
-
is last.
|
364
|
-
</p>
|
365
|
-
<p><a class="source-toggle" href="#"
|
366
|
-
onclick="toggleCode('M000045-source');return false;">[Source]</a></p>
|
367
|
-
<div class="method-source-code" id="M000045-source">
|
368
|
-
<pre>
|
369
|
-
<span class="ruby-comment cmt"># File lib/mack-facets/utils/registry_map.rb, line 36</span>
|
370
|
-
36: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">add</span>(<span class="ruby-identifier">tag</span>, <span class="ruby-identifier">klass</span>, <span class="ruby-identifier">position</span> = <span class="ruby-value">-1</span>)
|
371
|
-
37: <span class="ruby-ivar">@registered_items</span>[<span class="ruby-identifier">tag</span>] <span class="ruby-operator">||=</span> []
|
372
|
-
38: <span class="ruby-identifier">arr</span> = <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">registered_items</span>[<span class="ruby-identifier">tag</span>]
|
373
|
-
39: <span class="ruby-identifier">position</span> = <span class="ruby-identifier">arr</span>.<span class="ruby-identifier">size</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">position</span> <span class="ruby-operator">==</span> <span class="ruby-value">-1</span>
|
374
|
-
40:
|
375
|
-
41: <span class="ruby-identifier">arr</span>.<span class="ruby-identifier">insert</span>(<span class="ruby-identifier">position</span>, <span class="ruby-identifier">klass</span>)
|
376
|
-
42: <span class="ruby-identifier">arr</span>.<span class="ruby-identifier">uniq!</span>
|
377
|
-
43: <span class="ruby-identifier">arr</span>.<span class="ruby-identifier">compact!</span>
|
378
|
-
44: <span class="ruby-keyword kw">end</span>
|
379
|
-
</pre>
|
380
|
-
</div>
|
381
|
-
</div>
|
382
|
-
</div>
|
383
|
-
|
384
|
-
<div id="method-M000043" class="method-detail">
|
385
|
-
<a name="M000043"></a>
|
386
|
-
|
387
|
-
<div class="method-heading">
|
388
|
-
<a href="#M000043" class="method-signature">
|
389
|
-
<span class="method-name">initial_state</span><span class="method-args">()</span>
|
390
|
-
</a>
|
391
|
-
</div>
|
392
|
-
|
393
|
-
<div class="method-description">
|
394
|
-
<p>
|
395
|
-
Override this method to set the initial state of the <a
|
396
|
-
href="RegistryMap.html#M000047">registered_items</a> <a
|
397
|
-
href="../../Array.html">Array</a>. By default this list is empty.
|
398
|
-
</p>
|
399
|
-
<p><a class="source-toggle" href="#"
|
400
|
-
onclick="toggleCode('M000043-source');return false;">[Source]</a></p>
|
401
|
-
<div class="method-source-code" id="M000043-source">
|
402
|
-
<pre>
|
403
|
-
<span class="ruby-comment cmt"># File lib/mack-facets/utils/registry_map.rb, line 26</span>
|
404
|
-
26: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initial_state</span>
|
405
|
-
27: {}
|
406
|
-
28: <span class="ruby-keyword kw">end</span>
|
407
|
-
</pre>
|
408
|
-
</div>
|
409
|
-
</div>
|
410
|
-
</div>
|
411
|
-
|
412
|
-
<div id="method-M000046" class="method-detail">
|
413
|
-
<a name="M000046"></a>
|
414
|
-
|
415
|
-
<div class="method-heading">
|
416
|
-
<a href="#M000046" class="method-signature">
|
417
|
-
<span class="method-name">remove</span><span class="method-args">(tag, klass)</span>
|
418
|
-
</a>
|
419
|
-
</div>
|
420
|
-
|
421
|
-
<div class="method-description">
|
422
|
-
<p>
|
423
|
-
Removes an object from the list.
|
424
|
-
</p>
|
425
|
-
<p><a class="source-toggle" href="#"
|
426
|
-
onclick="toggleCode('M000046-source');return false;">[Source]</a></p>
|
427
|
-
<div class="method-source-code" id="M000046-source">
|
428
|
-
<pre>
|
429
|
-
<span class="ruby-comment cmt"># File lib/mack-facets/utils/registry_map.rb, line 47</span>
|
430
|
-
47: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">remove</span>(<span class="ruby-identifier">tag</span>, <span class="ruby-identifier">klass</span>)
|
431
|
-
48: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">false</span> <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@registered_items</span>[<span class="ruby-identifier">tag</span>] <span class="ruby-operator">==</span> <span class="ruby-keyword kw">nil</span>
|
432
|
-
49: <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">registered_items</span>[<span class="ruby-identifier">tag</span>].<span class="ruby-identifier">delete</span>(<span class="ruby-identifier">klass</span>)
|
433
|
-
50: <span class="ruby-keyword kw">end</span>
|
434
|
-
</pre>
|
435
|
-
</div>
|
436
|
-
</div>
|
437
|
-
</div>
|
438
|
-
|
439
|
-
<div id="method-M000044" class="method-detail">
|
440
|
-
<a name="M000044"></a>
|
441
|
-
|
442
|
-
<div class="method-heading">
|
443
|
-
<a href="#M000044" class="method-signature">
|
444
|
-
<span class="method-name">reset!</span><span class="method-args">()</span>
|
445
|
-
</a>
|
446
|
-
</div>
|
447
|
-
|
448
|
-
<div class="method-description">
|
449
|
-
<p>
|
450
|
-
Resets the <a href="RegistryMap.html#M000047">registered_items</a> list to
|
451
|
-
the list specified by the <a
|
452
|
-
href="RegistryMap.html#M000043">initial_state</a> method.
|
453
|
-
</p>
|
454
|
-
<p><a class="source-toggle" href="#"
|
455
|
-
onclick="toggleCode('M000044-source');return false;">[Source]</a></p>
|
456
|
-
<div class="method-source-code" id="M000044-source">
|
457
|
-
<pre>
|
458
|
-
<span class="ruby-comment cmt"># File lib/mack-facets/utils/registry_map.rb, line 31</span>
|
459
|
-
31: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">reset!</span>
|
460
|
-
32: <span class="ruby-ivar">@registered_items</span> = <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">initial_state</span>.<span class="ruby-identifier">dup</span>
|
461
|
-
33: <span class="ruby-keyword kw">end</span>
|
462
|
-
</pre>
|
463
|
-
</div>
|
464
|
-
</div>
|
465
|
-
</div>
|
466
|
-
|
467
|
-
|
468
|
-
</div>
|
469
|
-
|
470
|
-
|
471
|
-
</div>
|
472
|
-
|
473
|
-
|
474
|
-
<div id="validator-badges">
|
475
|
-
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
476
|
-
</div>
|
477
|
-
|
478
|
-
</body>
|
479
|
-
</html>
|
data/doc/classes/Math.html
DELETED
@@ -1,188 +0,0 @@
|
|
1
|
-
<?xml version="1.0" encoding="iso-8859-1"?>
|
2
|
-
<!DOCTYPE html
|
3
|
-
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
4
|
-
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
5
|
-
|
6
|
-
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
7
|
-
<head>
|
8
|
-
<title>Module: Math</title>
|
9
|
-
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
10
|
-
<meta http-equiv="Content-Script-Type" content="text/javascript" />
|
11
|
-
<link rel="stylesheet" href=".././rdoc-style.css" type="text/css" media="screen" />
|
12
|
-
<script type="text/javascript">
|
13
|
-
// <![CDATA[
|
14
|
-
|
15
|
-
function popupCode( url ) {
|
16
|
-
window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
|
17
|
-
}
|
18
|
-
|
19
|
-
function toggleCode( id ) {
|
20
|
-
if ( document.getElementById )
|
21
|
-
elem = document.getElementById( id );
|
22
|
-
else if ( document.all )
|
23
|
-
elem = eval( "document.all." + id );
|
24
|
-
else
|
25
|
-
return false;
|
26
|
-
|
27
|
-
elemStyle = elem.style;
|
28
|
-
|
29
|
-
if ( elemStyle.display != "block" ) {
|
30
|
-
elemStyle.display = "block"
|
31
|
-
} else {
|
32
|
-
elemStyle.display = "none"
|
33
|
-
}
|
34
|
-
|
35
|
-
return true;
|
36
|
-
}
|
37
|
-
|
38
|
-
// Make codeblocks hidden by default
|
39
|
-
document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
|
40
|
-
|
41
|
-
// ]]>
|
42
|
-
</script>
|
43
|
-
|
44
|
-
</head>
|
45
|
-
<body>
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
<div id="classHeader">
|
50
|
-
<table class="header-table">
|
51
|
-
<tr class="top-aligned-row">
|
52
|
-
<td><strong>Module</strong></td>
|
53
|
-
<td class="class-name-in-header">Math</td>
|
54
|
-
</tr>
|
55
|
-
<tr class="top-aligned-row">
|
56
|
-
<td><strong>In:</strong></td>
|
57
|
-
<td>
|
58
|
-
<a href="../files/lib/mack-facets/extensions/math_rb.html">
|
59
|
-
lib/mack-facets/extensions/math.rb
|
60
|
-
</a>
|
61
|
-
<br />
|
62
|
-
</td>
|
63
|
-
</tr>
|
64
|
-
|
65
|
-
</table>
|
66
|
-
</div>
|
67
|
-
<!-- banner header -->
|
68
|
-
|
69
|
-
<div id="bodyContent">
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
<div id="contextContent">
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
</div>
|
78
|
-
|
79
|
-
<div id="method-list">
|
80
|
-
<h3 class="section-bar">Methods</h3>
|
81
|
-
|
82
|
-
<div class="name-list">
|
83
|
-
<a href="#M000076">log2</a>
|
84
|
-
<a href="#M000078">max</a>
|
85
|
-
<a href="#M000077">min</a>
|
86
|
-
</div>
|
87
|
-
</div>
|
88
|
-
|
89
|
-
</div>
|
90
|
-
|
91
|
-
|
92
|
-
<!-- if includes -->
|
93
|
-
|
94
|
-
<div id="section">
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
<!-- if method_list -->
|
104
|
-
<div id="methods">
|
105
|
-
<h3 class="section-bar">Public Class methods</h3>
|
106
|
-
|
107
|
-
<div id="method-M000076" class="method-detail">
|
108
|
-
<a name="M000076"></a>
|
109
|
-
|
110
|
-
<div class="method-heading">
|
111
|
-
<a href="#M000076" class="method-signature">
|
112
|
-
<span class="method-name">log2</span><span class="method-args">(x)</span>
|
113
|
-
</a>
|
114
|
-
</div>
|
115
|
-
|
116
|
-
<div class="method-description">
|
117
|
-
<p><a class="source-toggle" href="#"
|
118
|
-
onclick="toggleCode('M000076-source');return false;">[Source]</a></p>
|
119
|
-
<div class="method-source-code" id="M000076-source">
|
120
|
-
<pre>
|
121
|
-
<span class="ruby-comment cmt"># File lib/mack-facets/extensions/math.rb, line 3</span>
|
122
|
-
3: <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">log2</span>(<span class="ruby-identifier">x</span>)
|
123
|
-
4: <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">log</span>(<span class="ruby-identifier">x</span>)<span class="ruby-operator">/</span><span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">log</span>(<span class="ruby-value">2.0</span>)
|
124
|
-
5: <span class="ruby-keyword kw">end</span>
|
125
|
-
</pre>
|
126
|
-
</div>
|
127
|
-
</div>
|
128
|
-
</div>
|
129
|
-
|
130
|
-
<div id="method-M000078" class="method-detail">
|
131
|
-
<a name="M000078"></a>
|
132
|
-
|
133
|
-
<div class="method-heading">
|
134
|
-
<a href="#M000078" class="method-signature">
|
135
|
-
<span class="method-name">max</span><span class="method-args">(a, b)</span>
|
136
|
-
</a>
|
137
|
-
</div>
|
138
|
-
|
139
|
-
<div class="method-description">
|
140
|
-
<p><a class="source-toggle" href="#"
|
141
|
-
onclick="toggleCode('M000078-source');return false;">[Source]</a></p>
|
142
|
-
<div class="method-source-code" id="M000078-source">
|
143
|
-
<pre>
|
144
|
-
<span class="ruby-comment cmt"># File lib/mack-facets/extensions/math.rb, line 11</span>
|
145
|
-
11: <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">max</span>(<span class="ruby-identifier">a</span>, <span class="ruby-identifier">b</span>)
|
146
|
-
12: <span class="ruby-identifier">a</span> <span class="ruby-operator">></span> <span class="ruby-identifier">b</span> <span class="ruby-value">? </span><span class="ruby-identifier">a</span> <span class="ruby-operator">:</span> <span class="ruby-identifier">b</span>
|
147
|
-
13: <span class="ruby-keyword kw">end</span>
|
148
|
-
</pre>
|
149
|
-
</div>
|
150
|
-
</div>
|
151
|
-
</div>
|
152
|
-
|
153
|
-
<div id="method-M000077" class="method-detail">
|
154
|
-
<a name="M000077"></a>
|
155
|
-
|
156
|
-
<div class="method-heading">
|
157
|
-
<a href="#M000077" class="method-signature">
|
158
|
-
<span class="method-name">min</span><span class="method-args">(a, b)</span>
|
159
|
-
</a>
|
160
|
-
</div>
|
161
|
-
|
162
|
-
<div class="method-description">
|
163
|
-
<p><a class="source-toggle" href="#"
|
164
|
-
onclick="toggleCode('M000077-source');return false;">[Source]</a></p>
|
165
|
-
<div class="method-source-code" id="M000077-source">
|
166
|
-
<pre>
|
167
|
-
<span class="ruby-comment cmt"># File lib/mack-facets/extensions/math.rb, line 7</span>
|
168
|
-
7: <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">min</span>(<span class="ruby-identifier">a</span>, <span class="ruby-identifier">b</span>)
|
169
|
-
8: <span class="ruby-identifier">a</span> <span class="ruby-operator"><</span> <span class="ruby-identifier">b</span> <span class="ruby-value">? </span><span class="ruby-identifier">a</span> <span class="ruby-operator">:</span> <span class="ruby-identifier">b</span>
|
170
|
-
9: <span class="ruby-keyword kw">end</span>
|
171
|
-
</pre>
|
172
|
-
</div>
|
173
|
-
</div>
|
174
|
-
</div>
|
175
|
-
|
176
|
-
|
177
|
-
</div>
|
178
|
-
|
179
|
-
|
180
|
-
</div>
|
181
|
-
|
182
|
-
|
183
|
-
<div id="validator-badges">
|
184
|
-
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
185
|
-
</div>
|
186
|
-
|
187
|
-
</body>
|
188
|
-
</html>
|