JohnSmall-acts-as-hausdorff-space 0.1.3 → 0.1.4
Sign up to get free protection for your applications and to get access to all the features.
- data/.document +5 -0
- data/.gitignore +10 -0
- data/VERSION.yml +1 -1
- data/acts-as-hausdorff-space.gemspec +97 -0
- data/design_idea.rdoc +27 -0
- data/doc/LICENSE.html +113 -0
- data/doc/MindoroMarine.html +153 -0
- data/doc/MindoroMarine/Acts.html +150 -0
- data/doc/MindoroMarine/Acts/HausdorffSpace.html +160 -0
- data/doc/MindoroMarine/Acts/HausdorffSpace/ActMethods.html +230 -0
- data/doc/MindoroMarine/Acts/HausdorffSpace/ClassMethods.html +466 -0
- data/doc/MindoroMarine/Acts/HausdorffSpace/Gap.html +193 -0
- data/doc/MindoroMarine/Acts/HausdorffSpace/HSArray.html +234 -0
- data/doc/MindoroMarine/Acts/HausdorffSpace/InstanceMethods.html +1152 -0
- data/doc/MindoroMarine/Acts/HausdorffSpace/VirtualRoot.html +261 -0
- data/doc/README_rdoc.html +386 -0
- data/doc/created.rid +1 -0
- data/doc/images/brick.png +0 -0
- data/doc/images/brick_link.png +0 -0
- data/doc/images/bug.png +0 -0
- data/doc/images/bullet_black.png +0 -0
- data/doc/images/bullet_toggle_minus.png +0 -0
- data/doc/images/bullet_toggle_plus.png +0 -0
- data/doc/images/date.png +0 -0
- data/doc/images/find.png +0 -0
- data/doc/images/loadingAnimation.gif +0 -0
- data/doc/images/macFFBgHack.png +0 -0
- data/doc/images/package.png +0 -0
- data/doc/images/page_green.png +0 -0
- data/doc/images/page_white_text.png +0 -0
- data/doc/images/page_white_width.png +0 -0
- data/doc/images/plugin.png +0 -0
- data/doc/images/ruby.png +0 -0
- data/doc/images/tag_green.png +0 -0
- data/doc/images/wrench.png +0 -0
- data/doc/images/wrench_orange.png +0 -0
- data/doc/images/zoom.png +0 -0
- data/doc/index.html +140 -0
- data/doc/js/darkfish.js +116 -0
- data/doc/js/jquery.js +32 -0
- data/doc/js/quicksearch.js +114 -0
- data/doc/js/thickbox-compressed.js +10 -0
- data/doc/lib/acts-as-hausdorff-space_rb.html +55 -0
- data/doc/lib/acts_as_hausdorff_space_rb.html +53 -0
- data/doc/rdoc.css +696 -0
- data/lib/acts_as_hausdorff_space.rb +22 -14
- data/test/acts_as_hausdorff_space_test.rb +13 -0
- metadata +48 -4
@@ -0,0 +1,160 @@
|
|
1
|
+
<?xml version="1.0" encoding="utf-8"?>
|
2
|
+
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
|
3
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
4
|
+
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
5
|
+
<head>
|
6
|
+
<meta content="text/html; charset=utf-8" http-equiv="Content-Type" />
|
7
|
+
|
8
|
+
<title>Module: MindoroMarine::Acts::HausdorffSpace</title>
|
9
|
+
|
10
|
+
<link rel="stylesheet" href="../../rdoc.css" type="text/css" media="screen" />
|
11
|
+
|
12
|
+
<script src="../../js/jquery.js" type="text/javascript"
|
13
|
+
charset="utf-8"></script>
|
14
|
+
<script src="../../js/thickbox-compressed.js" type="text/javascript"
|
15
|
+
charset="utf-8"></script>
|
16
|
+
<script src="../../js/quicksearch.js" type="text/javascript"
|
17
|
+
charset="utf-8"></script>
|
18
|
+
<script src="../../js/darkfish.js" type="text/javascript"
|
19
|
+
charset="utf-8"></script>
|
20
|
+
|
21
|
+
</head>
|
22
|
+
<body class="module">
|
23
|
+
|
24
|
+
<div id="metadata">
|
25
|
+
<div id="file-metadata">
|
26
|
+
<div id="file-list-section" class="section">
|
27
|
+
<h3 class="section-header">In Files</h3>
|
28
|
+
<div class="section-body">
|
29
|
+
<ul>
|
30
|
+
|
31
|
+
<li><a href="../../lib/acts_as_hausdorff_space.rb.html?TB_iframe=true&height=550&width=785"
|
32
|
+
class="thickbox" title="lib/acts_as_hausdorff_space.rb">lib/acts_as_hausdorff_space.rb</a></li>
|
33
|
+
|
34
|
+
</ul>
|
35
|
+
</div>
|
36
|
+
</div>
|
37
|
+
|
38
|
+
|
39
|
+
</div>
|
40
|
+
|
41
|
+
<div id="class-metadata">
|
42
|
+
|
43
|
+
<!-- Parent Class -->
|
44
|
+
|
45
|
+
|
46
|
+
<!-- Namespace Contents -->
|
47
|
+
|
48
|
+
<div id="namespace-list-section" class="section">
|
49
|
+
<h3 class="section-header">Namespace</h3>
|
50
|
+
<ul class="link-list">
|
51
|
+
|
52
|
+
<li><span class="type">MODULE</span> <a href="HausdorffSpace/ActMethods.html">MindoroMarine::Acts::HausdorffSpace::ActMethods</a></li>
|
53
|
+
|
54
|
+
<li><span class="type">MODULE</span> <a href="HausdorffSpace/ClassMethods.html">MindoroMarine::Acts::HausdorffSpace::ClassMethods</a></li>
|
55
|
+
|
56
|
+
<li><span class="type">MODULE</span> <a href="HausdorffSpace/InstanceMethods.html">MindoroMarine::Acts::HausdorffSpace::InstanceMethods</a></li>
|
57
|
+
|
58
|
+
<li><span class="type">CLASS</span> <a href="HausdorffSpace/Gap.html">MindoroMarine::Acts::HausdorffSpace::Gap</a></li>
|
59
|
+
|
60
|
+
<li><span class="type">CLASS</span> <a href="HausdorffSpace/HSArray.html">MindoroMarine::Acts::HausdorffSpace::HSArray</a></li>
|
61
|
+
|
62
|
+
<li><span class="type">CLASS</span> <a href="HausdorffSpace/VirtualRoot.html">MindoroMarine::Acts::HausdorffSpace::VirtualRoot</a></li>
|
63
|
+
|
64
|
+
</ul>
|
65
|
+
</div>
|
66
|
+
|
67
|
+
|
68
|
+
<!-- Method Quickref -->
|
69
|
+
|
70
|
+
|
71
|
+
<!-- Included Modules -->
|
72
|
+
|
73
|
+
</div>
|
74
|
+
|
75
|
+
<div id="project-metadata">
|
76
|
+
|
77
|
+
|
78
|
+
<div id="fileindex-section" class="section project-section">
|
79
|
+
<h3 class="section-header">Files</h3>
|
80
|
+
<ul>
|
81
|
+
|
82
|
+
<li class="file"><a href="../../LICENSE.html">LICENSE</a></li>
|
83
|
+
|
84
|
+
<li class="file"><a href="../../README_rdoc.html">README.rdoc</a></li>
|
85
|
+
|
86
|
+
</ul>
|
87
|
+
</div>
|
88
|
+
|
89
|
+
|
90
|
+
<div id="classindex-section" class="section project-section">
|
91
|
+
<h3 class="section-header">Class Index
|
92
|
+
<span class="search-toggle"><img src="../../images/find.png"
|
93
|
+
height="16" width="16" alt="[+]"
|
94
|
+
title="show/hide quicksearch" /></span></h3>
|
95
|
+
<form action="#" method="get" accept-charset="utf-8" class="initially-hidden">
|
96
|
+
<fieldset>
|
97
|
+
<legend>Quicksearch</legend>
|
98
|
+
<input type="text" name="quicksearch" value=""
|
99
|
+
class="quicksearch-field" />
|
100
|
+
</fieldset>
|
101
|
+
</form>
|
102
|
+
|
103
|
+
<ul class="link-list">
|
104
|
+
|
105
|
+
<li><a href="../../MindoroMarine.html">MindoroMarine</a></li>
|
106
|
+
|
107
|
+
<li><a href="../../MindoroMarine/Acts/HausdorffSpace/ActMethods.html">MindoroMarine::Acts::HausdorffSpace::ActMethods</a></li>
|
108
|
+
|
109
|
+
<li><a href="../../MindoroMarine/Acts/HausdorffSpace/ClassMethods.html">MindoroMarine::Acts::HausdorffSpace::ClassMethods</a></li>
|
110
|
+
|
111
|
+
<li><a href="../../MindoroMarine/Acts/HausdorffSpace/Gap.html">MindoroMarine::Acts::HausdorffSpace::Gap</a></li>
|
112
|
+
|
113
|
+
<li><a href="../../MindoroMarine/Acts/HausdorffSpace/HSArray.html">MindoroMarine::Acts::HausdorffSpace::HSArray</a></li>
|
114
|
+
|
115
|
+
<li><a href="../../MindoroMarine/Acts/HausdorffSpace/InstanceMethods.html">MindoroMarine::Acts::HausdorffSpace::InstanceMethods</a></li>
|
116
|
+
|
117
|
+
<li><a href="../../MindoroMarine/Acts/HausdorffSpace/VirtualRoot.html">MindoroMarine::Acts::HausdorffSpace::VirtualRoot</a></li>
|
118
|
+
|
119
|
+
</ul>
|
120
|
+
<div id="no-class-search-results" style="display: none;">No matching classes.</div>
|
121
|
+
</div>
|
122
|
+
|
123
|
+
|
124
|
+
</div>
|
125
|
+
</div>
|
126
|
+
|
127
|
+
<div id="documentation">
|
128
|
+
<h1 class="module">MindoroMarine::Acts::HausdorffSpace</h1>
|
129
|
+
|
130
|
+
<div id="description">
|
131
|
+
|
132
|
+
</div>
|
133
|
+
|
134
|
+
<!-- Constants -->
|
135
|
+
|
136
|
+
|
137
|
+
<!-- Attributes -->
|
138
|
+
|
139
|
+
|
140
|
+
<!-- Methods -->
|
141
|
+
|
142
|
+
|
143
|
+
</div>
|
144
|
+
|
145
|
+
|
146
|
+
<div id="rdoc-debugging-section-dump" class="debugging-section">
|
147
|
+
|
148
|
+
<p>Disabled; run with --debug to generate this.</p>
|
149
|
+
|
150
|
+
</div>
|
151
|
+
|
152
|
+
<div id="validator-badges">
|
153
|
+
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
154
|
+
<p><small>Generated with the <a href="http://deveiate.org/projects/Darkfish-Rdoc/">Darkfish
|
155
|
+
Rdoc Generator</a> 1.1.6</small>.</p>
|
156
|
+
</div>
|
157
|
+
|
158
|
+
</body>
|
159
|
+
</html>
|
160
|
+
|
@@ -0,0 +1,230 @@
|
|
1
|
+
<?xml version="1.0" encoding="utf-8"?>
|
2
|
+
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
|
3
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
4
|
+
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
5
|
+
<head>
|
6
|
+
<meta content="text/html; charset=utf-8" http-equiv="Content-Type" />
|
7
|
+
|
8
|
+
<title>Module: MindoroMarine::Acts::HausdorffSpace::ActMethods</title>
|
9
|
+
|
10
|
+
<link rel="stylesheet" href="../../../rdoc.css" type="text/css" media="screen" />
|
11
|
+
|
12
|
+
<script src="../../../js/jquery.js" type="text/javascript"
|
13
|
+
charset="utf-8"></script>
|
14
|
+
<script src="../../../js/thickbox-compressed.js" type="text/javascript"
|
15
|
+
charset="utf-8"></script>
|
16
|
+
<script src="../../../js/quicksearch.js" type="text/javascript"
|
17
|
+
charset="utf-8"></script>
|
18
|
+
<script src="../../../js/darkfish.js" type="text/javascript"
|
19
|
+
charset="utf-8"></script>
|
20
|
+
|
21
|
+
</head>
|
22
|
+
<body class="module">
|
23
|
+
|
24
|
+
<div id="metadata">
|
25
|
+
<div id="file-metadata">
|
26
|
+
<div id="file-list-section" class="section">
|
27
|
+
<h3 class="section-header">In Files</h3>
|
28
|
+
<div class="section-body">
|
29
|
+
<ul>
|
30
|
+
|
31
|
+
<li><a href="../../../lib/acts_as_hausdorff_space.rb.html?TB_iframe=true&height=550&width=785"
|
32
|
+
class="thickbox" title="lib/acts_as_hausdorff_space.rb">lib/acts_as_hausdorff_space.rb</a></li>
|
33
|
+
|
34
|
+
</ul>
|
35
|
+
</div>
|
36
|
+
</div>
|
37
|
+
|
38
|
+
|
39
|
+
</div>
|
40
|
+
|
41
|
+
<div id="class-metadata">
|
42
|
+
|
43
|
+
<!-- Parent Class -->
|
44
|
+
|
45
|
+
|
46
|
+
<!-- Namespace Contents -->
|
47
|
+
|
48
|
+
|
49
|
+
<!-- Method Quickref -->
|
50
|
+
|
51
|
+
<div id="method-list-section" class="section">
|
52
|
+
<h3 class="section-header">Methods</h3>
|
53
|
+
<ul class="link-list">
|
54
|
+
|
55
|
+
<li><a href="#M000000">#acts_as_hausdorff_space</a></li>
|
56
|
+
|
57
|
+
</ul>
|
58
|
+
</div>
|
59
|
+
|
60
|
+
|
61
|
+
<!-- Included Modules -->
|
62
|
+
|
63
|
+
<div id="includes-section" class="section">
|
64
|
+
<h3 class="section-header">Included Modules</h3>
|
65
|
+
<ul class="link-list">
|
66
|
+
|
67
|
+
|
68
|
+
<li><a class="include" href="../../Acts.html">MindoroMarine::Acts</a></li>
|
69
|
+
|
70
|
+
|
71
|
+
</ul>
|
72
|
+
</div>
|
73
|
+
|
74
|
+
</div>
|
75
|
+
|
76
|
+
<div id="project-metadata">
|
77
|
+
|
78
|
+
|
79
|
+
<div id="fileindex-section" class="section project-section">
|
80
|
+
<h3 class="section-header">Files</h3>
|
81
|
+
<ul>
|
82
|
+
|
83
|
+
<li class="file"><a href="../../../LICENSE.html">LICENSE</a></li>
|
84
|
+
|
85
|
+
<li class="file"><a href="../../../README_rdoc.html">README.rdoc</a></li>
|
86
|
+
|
87
|
+
</ul>
|
88
|
+
</div>
|
89
|
+
|
90
|
+
|
91
|
+
<div id="classindex-section" class="section project-section">
|
92
|
+
<h3 class="section-header">Class Index
|
93
|
+
<span class="search-toggle"><img src="../../../images/find.png"
|
94
|
+
height="16" width="16" alt="[+]"
|
95
|
+
title="show/hide quicksearch" /></span></h3>
|
96
|
+
<form action="#" method="get" accept-charset="utf-8" class="initially-hidden">
|
97
|
+
<fieldset>
|
98
|
+
<legend>Quicksearch</legend>
|
99
|
+
<input type="text" name="quicksearch" value=""
|
100
|
+
class="quicksearch-field" />
|
101
|
+
</fieldset>
|
102
|
+
</form>
|
103
|
+
|
104
|
+
<ul class="link-list">
|
105
|
+
|
106
|
+
<li><a href="../../../MindoroMarine.html">MindoroMarine</a></li>
|
107
|
+
|
108
|
+
<li><a href="../../../MindoroMarine/Acts/HausdorffSpace/ActMethods.html">MindoroMarine::Acts::HausdorffSpace::ActMethods</a></li>
|
109
|
+
|
110
|
+
<li><a href="../../../MindoroMarine/Acts/HausdorffSpace/ClassMethods.html">MindoroMarine::Acts::HausdorffSpace::ClassMethods</a></li>
|
111
|
+
|
112
|
+
<li><a href="../../../MindoroMarine/Acts/HausdorffSpace/Gap.html">MindoroMarine::Acts::HausdorffSpace::Gap</a></li>
|
113
|
+
|
114
|
+
<li><a href="../../../MindoroMarine/Acts/HausdorffSpace/HSArray.html">MindoroMarine::Acts::HausdorffSpace::HSArray</a></li>
|
115
|
+
|
116
|
+
<li><a href="../../../MindoroMarine/Acts/HausdorffSpace/InstanceMethods.html">MindoroMarine::Acts::HausdorffSpace::InstanceMethods</a></li>
|
117
|
+
|
118
|
+
<li><a href="../../../MindoroMarine/Acts/HausdorffSpace/VirtualRoot.html">MindoroMarine::Acts::HausdorffSpace::VirtualRoot</a></li>
|
119
|
+
|
120
|
+
</ul>
|
121
|
+
<div id="no-class-search-results" style="display: none;">No matching classes.</div>
|
122
|
+
</div>
|
123
|
+
|
124
|
+
|
125
|
+
</div>
|
126
|
+
</div>
|
127
|
+
|
128
|
+
<div id="documentation">
|
129
|
+
<h1 class="module">MindoroMarine::Acts::HausdorffSpace::ActMethods</h1>
|
130
|
+
|
131
|
+
<div id="description">
|
132
|
+
|
133
|
+
</div>
|
134
|
+
|
135
|
+
<!-- Constants -->
|
136
|
+
|
137
|
+
|
138
|
+
<!-- Attributes -->
|
139
|
+
|
140
|
+
|
141
|
+
<!-- Methods -->
|
142
|
+
|
143
|
+
<div id="public-instance-method-details" class="method-section section">
|
144
|
+
<h3 class="section-header">Public Instance Methods</h3>
|
145
|
+
|
146
|
+
|
147
|
+
<div id="acts-as-hausdorff-space-method" class="method-detail ">
|
148
|
+
<a name="M000000"></a>
|
149
|
+
|
150
|
+
<div class="method-heading">
|
151
|
+
|
152
|
+
<span class="method-name">acts_as_hausdorff_space</span><span
|
153
|
+
class="method-args">(options = {})</span>
|
154
|
+
<span class="method-click-advice">click to toggle source</span>
|
155
|
+
|
156
|
+
</div>
|
157
|
+
|
158
|
+
<div class="method-description">
|
159
|
+
|
160
|
+
<p>
|
161
|
+
Configuration options are:
|
162
|
+
</p>
|
163
|
+
<ul>
|
164
|
+
<li><tt>left_column</tt> - Column name for the left index (default:
|
165
|
+
<tt>lft</tt>).
|
166
|
+
|
167
|
+
</li>
|
168
|
+
<li><tt>right_column</tt> - Column name for the right index (default:
|
169
|
+
<tt>rgt</tt>). NOTE: Don’t use <tt>left</tt> and <tt>right</tt>,
|
170
|
+
since these are reserved database words. (if it isn’t there already)
|
171
|
+
and use that as the foreign key restriction. It’s also possible to
|
172
|
+
give it an entire string that is interpolated if you need a tighter scope
|
173
|
+
than just a foreign key.
|
174
|
+
|
175
|
+
</li>
|
176
|
+
</ul>
|
177
|
+
|
178
|
+
|
179
|
+
|
180
|
+
<div class="method-source-code"
|
181
|
+
id="acts-as-hausdorff-space-source">
|
182
|
+
<pre>
|
183
|
+
<span class="ruby-comment cmt"># File lib/acts_as_hausdorff_space.rb, line 16</span>
|
184
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">acts_as_hausdorff_space</span>(<span class="ruby-identifier">options</span> = {})
|
185
|
+
<span class="ruby-comment cmt">#[TODO] use reverse merge here</span>
|
186
|
+
<span class="ruby-identifier">write_inheritable_attribute</span>(<span class="ruby-identifier">:acts_as_hausdorff_space_options</span>,
|
187
|
+
{ <span class="ruby-identifier">:left_column</span> =<span class="ruby-operator">></span> (<span class="ruby-identifier">options</span>[<span class="ruby-identifier">:left_column</span>] <span class="ruby-operator">||</span> <span class="ruby-value str">'lft'</span>),
|
188
|
+
<span class="ruby-identifier">:right_column</span> =<span class="ruby-operator">></span> (<span class="ruby-identifier">options</span>[<span class="ruby-identifier">:right_column</span>] <span class="ruby-operator">||</span> <span class="ruby-value str">'rgt'</span>),
|
189
|
+
<span class="ruby-identifier">:bias</span> =<span class="ruby-operator">></span> (<span class="ruby-identifier">options</span>[<span class="ruby-identifier">:bias</span>] <span class="ruby-operator">||</span> <span class="ruby-value">1E6</span>),
|
190
|
+
<span class="ruby-identifier">:max_double</span> =<span class="ruby-operator">></span> (<span class="ruby-identifier">options</span>[<span class="ruby-identifier">:max_double</span>] <span class="ruby-operator">||</span> <span class="ruby-value">1E20</span> ),
|
191
|
+
<span class="ruby-identifier">:class</span> =<span class="ruby-operator">></span> <span class="ruby-keyword kw">self</span> , <span class="ruby-comment cmt"># for single-table inheritance</span>
|
192
|
+
<span class="ruby-identifier">:virtual_root</span> =<span class="ruby-operator">></span> <span class="ruby-constant">VirtualRoot</span>.<span class="ruby-identifier">new</span>(<span class="ruby-operator">-</span>(<span class="ruby-identifier">options</span>[<span class="ruby-identifier">:max_double</span>] <span class="ruby-operator">||</span> <span class="ruby-value">1E20</span> ),
|
193
|
+
(<span class="ruby-identifier">options</span>[<span class="ruby-identifier">:max_double</span>] <span class="ruby-operator">||</span> <span class="ruby-value">1E20</span> ))
|
194
|
+
} )
|
195
|
+
|
196
|
+
<span class="ruby-identifier">class_inheritable_reader</span> <span class="ruby-identifier">:acts_as_hausdorff_space_options</span>
|
197
|
+
<span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">included_modules</span>.<span class="ruby-identifier">include?</span> <span class="ruby-constant">MindoroMarine</span><span class="ruby-operator">::</span><span class="ruby-constant">Acts</span><span class="ruby-operator">::</span><span class="ruby-constant">HausdorffSpace</span><span class="ruby-operator">::</span><span class="ruby-constant">InstanceMethods</span>
|
198
|
+
<span class="ruby-identifier">include</span> <span class="ruby-constant">MindoroMarine</span><span class="ruby-operator">::</span><span class="ruby-constant">Acts</span><span class="ruby-operator">::</span><span class="ruby-constant">HausdorffSpace</span><span class="ruby-operator">::</span><span class="ruby-constant">InstanceMethods</span>
|
199
|
+
<span class="ruby-identifier">extend</span> <span class="ruby-constant">MindoroMarine</span><span class="ruby-operator">::</span><span class="ruby-constant">Acts</span><span class="ruby-operator">::</span><span class="ruby-constant">HausdorffSpace</span><span class="ruby-operator">::</span><span class="ruby-constant">ClassMethods</span>
|
200
|
+
<span class="ruby-keyword kw">end</span>
|
201
|
+
<span class="ruby-keyword kw">end</span></pre>
|
202
|
+
</div>
|
203
|
+
|
204
|
+
</div>
|
205
|
+
|
206
|
+
|
207
|
+
</div>
|
208
|
+
|
209
|
+
|
210
|
+
</div>
|
211
|
+
|
212
|
+
|
213
|
+
</div>
|
214
|
+
|
215
|
+
|
216
|
+
<div id="rdoc-debugging-section-dump" class="debugging-section">
|
217
|
+
|
218
|
+
<p>Disabled; run with --debug to generate this.</p>
|
219
|
+
|
220
|
+
</div>
|
221
|
+
|
222
|
+
<div id="validator-badges">
|
223
|
+
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
224
|
+
<p><small>Generated with the <a href="http://deveiate.org/projects/Darkfish-Rdoc/">Darkfish
|
225
|
+
Rdoc Generator</a> 1.1.6</small>.</p>
|
226
|
+
</div>
|
227
|
+
|
228
|
+
</body>
|
229
|
+
</html>
|
230
|
+
|
@@ -0,0 +1,466 @@
|
|
1
|
+
<?xml version="1.0" encoding="utf-8"?>
|
2
|
+
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
|
3
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
4
|
+
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
5
|
+
<head>
|
6
|
+
<meta content="text/html; charset=utf-8" http-equiv="Content-Type" />
|
7
|
+
|
8
|
+
<title>Module: MindoroMarine::Acts::HausdorffSpace::ClassMethods</title>
|
9
|
+
|
10
|
+
<link rel="stylesheet" href="../../../rdoc.css" type="text/css" media="screen" />
|
11
|
+
|
12
|
+
<script src="../../../js/jquery.js" type="text/javascript"
|
13
|
+
charset="utf-8"></script>
|
14
|
+
<script src="../../../js/thickbox-compressed.js" type="text/javascript"
|
15
|
+
charset="utf-8"></script>
|
16
|
+
<script src="../../../js/quicksearch.js" type="text/javascript"
|
17
|
+
charset="utf-8"></script>
|
18
|
+
<script src="../../../js/darkfish.js" type="text/javascript"
|
19
|
+
charset="utf-8"></script>
|
20
|
+
|
21
|
+
</head>
|
22
|
+
<body class="module">
|
23
|
+
|
24
|
+
<div id="metadata">
|
25
|
+
<div id="file-metadata">
|
26
|
+
<div id="file-list-section" class="section">
|
27
|
+
<h3 class="section-header">In Files</h3>
|
28
|
+
<div class="section-body">
|
29
|
+
<ul>
|
30
|
+
|
31
|
+
<li><a href="../../../lib/acts_as_hausdorff_space.rb.html?TB_iframe=true&height=550&width=785"
|
32
|
+
class="thickbox" title="lib/acts_as_hausdorff_space.rb">lib/acts_as_hausdorff_space.rb</a></li>
|
33
|
+
|
34
|
+
</ul>
|
35
|
+
</div>
|
36
|
+
</div>
|
37
|
+
|
38
|
+
|
39
|
+
</div>
|
40
|
+
|
41
|
+
<div id="class-metadata">
|
42
|
+
|
43
|
+
<!-- Parent Class -->
|
44
|
+
|
45
|
+
|
46
|
+
<!-- Namespace Contents -->
|
47
|
+
|
48
|
+
|
49
|
+
<!-- Method Quickref -->
|
50
|
+
|
51
|
+
<div id="method-list-section" class="section">
|
52
|
+
<h3 class="section-header">Methods</h3>
|
53
|
+
<ul class="link-list">
|
54
|
+
|
55
|
+
<li><a href="#M000009">#bias</a></li>
|
56
|
+
|
57
|
+
<li><a href="#M000005">#full_tree</a></li>
|
58
|
+
|
59
|
+
<li><a href="#M000006">#left_col_name</a></li>
|
60
|
+
|
61
|
+
<li><a href="#M000008">#max_double</a></li>
|
62
|
+
|
63
|
+
<li><a href="#M000007">#right_col_name</a></li>
|
64
|
+
|
65
|
+
<li><a href="#M000004">#root</a></li>
|
66
|
+
|
67
|
+
<li><a href="#M000003">#roots</a></li>
|
68
|
+
|
69
|
+
<li><a href="#M000010">#virtual_root</a></li>
|
70
|
+
|
71
|
+
</ul>
|
72
|
+
</div>
|
73
|
+
|
74
|
+
|
75
|
+
<!-- Included Modules -->
|
76
|
+
|
77
|
+
</div>
|
78
|
+
|
79
|
+
<div id="project-metadata">
|
80
|
+
|
81
|
+
|
82
|
+
<div id="fileindex-section" class="section project-section">
|
83
|
+
<h3 class="section-header">Files</h3>
|
84
|
+
<ul>
|
85
|
+
|
86
|
+
<li class="file"><a href="../../../LICENSE.html">LICENSE</a></li>
|
87
|
+
|
88
|
+
<li class="file"><a href="../../../README_rdoc.html">README.rdoc</a></li>
|
89
|
+
|
90
|
+
</ul>
|
91
|
+
</div>
|
92
|
+
|
93
|
+
|
94
|
+
<div id="classindex-section" class="section project-section">
|
95
|
+
<h3 class="section-header">Class Index
|
96
|
+
<span class="search-toggle"><img src="../../../images/find.png"
|
97
|
+
height="16" width="16" alt="[+]"
|
98
|
+
title="show/hide quicksearch" /></span></h3>
|
99
|
+
<form action="#" method="get" accept-charset="utf-8" class="initially-hidden">
|
100
|
+
<fieldset>
|
101
|
+
<legend>Quicksearch</legend>
|
102
|
+
<input type="text" name="quicksearch" value=""
|
103
|
+
class="quicksearch-field" />
|
104
|
+
</fieldset>
|
105
|
+
</form>
|
106
|
+
|
107
|
+
<ul class="link-list">
|
108
|
+
|
109
|
+
<li><a href="../../../MindoroMarine.html">MindoroMarine</a></li>
|
110
|
+
|
111
|
+
<li><a href="../../../MindoroMarine/Acts/HausdorffSpace/ActMethods.html">MindoroMarine::Acts::HausdorffSpace::ActMethods</a></li>
|
112
|
+
|
113
|
+
<li><a href="../../../MindoroMarine/Acts/HausdorffSpace/ClassMethods.html">MindoroMarine::Acts::HausdorffSpace::ClassMethods</a></li>
|
114
|
+
|
115
|
+
<li><a href="../../../MindoroMarine/Acts/HausdorffSpace/Gap.html">MindoroMarine::Acts::HausdorffSpace::Gap</a></li>
|
116
|
+
|
117
|
+
<li><a href="../../../MindoroMarine/Acts/HausdorffSpace/HSArray.html">MindoroMarine::Acts::HausdorffSpace::HSArray</a></li>
|
118
|
+
|
119
|
+
<li><a href="../../../MindoroMarine/Acts/HausdorffSpace/InstanceMethods.html">MindoroMarine::Acts::HausdorffSpace::InstanceMethods</a></li>
|
120
|
+
|
121
|
+
<li><a href="../../../MindoroMarine/Acts/HausdorffSpace/VirtualRoot.html">MindoroMarine::Acts::HausdorffSpace::VirtualRoot</a></li>
|
122
|
+
|
123
|
+
</ul>
|
124
|
+
<div id="no-class-search-results" style="display: none;">No matching classes.</div>
|
125
|
+
</div>
|
126
|
+
|
127
|
+
|
128
|
+
</div>
|
129
|
+
</div>
|
130
|
+
|
131
|
+
<div id="documentation">
|
132
|
+
<h1 class="module">MindoroMarine::Acts::HausdorffSpace::ClassMethods</h1>
|
133
|
+
|
134
|
+
<div id="description">
|
135
|
+
|
136
|
+
</div>
|
137
|
+
|
138
|
+
<!-- Constants -->
|
139
|
+
|
140
|
+
|
141
|
+
<!-- Attributes -->
|
142
|
+
|
143
|
+
|
144
|
+
<!-- Methods -->
|
145
|
+
|
146
|
+
<div id="public-instance-method-details" class="method-section section">
|
147
|
+
<h3 class="section-header">Public Instance Methods</h3>
|
148
|
+
|
149
|
+
|
150
|
+
<div id="bias-method" class="method-detail ">
|
151
|
+
<a name="M000009"></a>
|
152
|
+
|
153
|
+
<div class="method-heading">
|
154
|
+
|
155
|
+
<span class="method-name">bias</span><span
|
156
|
+
class="method-args">()</span>
|
157
|
+
<span class="method-click-advice">click to toggle source</span>
|
158
|
+
|
159
|
+
</div>
|
160
|
+
|
161
|
+
<div class="method-description">
|
162
|
+
|
163
|
+
<p>
|
164
|
+
Return the bias supplied in the options to to acts_as_hausdorff_space or
|
165
|
+
the default 1E6
|
166
|
+
</p>
|
167
|
+
|
168
|
+
|
169
|
+
|
170
|
+
<div class="method-source-code"
|
171
|
+
id="bias-source">
|
172
|
+
<pre>
|
173
|
+
<span class="ruby-comment cmt"># File lib/acts_as_hausdorff_space.rb, line 126</span>
|
174
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">bias</span>
|
175
|
+
<span class="ruby-identifier">acts_as_hausdorff_space_options</span>[<span class="ruby-identifier">:bias</span>]
|
176
|
+
<span class="ruby-keyword kw">end</span></pre>
|
177
|
+
</div>
|
178
|
+
|
179
|
+
</div>
|
180
|
+
|
181
|
+
|
182
|
+
</div>
|
183
|
+
|
184
|
+
|
185
|
+
<div id="full-tree-method" class="method-detail ">
|
186
|
+
<a name="M000005"></a>
|
187
|
+
|
188
|
+
<div class="method-heading">
|
189
|
+
|
190
|
+
<span class="method-name">full_tree</span><span
|
191
|
+
class="method-args">()</span>
|
192
|
+
<span class="method-click-advice">click to toggle source</span>
|
193
|
+
|
194
|
+
</div>
|
195
|
+
|
196
|
+
<div class="method-description">
|
197
|
+
|
198
|
+
<p>
|
199
|
+
use the instance method <tt>build_full_tree</tt> on the root to get all the
|
200
|
+
children set up in a tree
|
201
|
+
</p>
|
202
|
+
|
203
|
+
|
204
|
+
|
205
|
+
<div class="method-source-code"
|
206
|
+
id="full-tree-source">
|
207
|
+
<pre>
|
208
|
+
<span class="ruby-comment cmt"># File lib/acts_as_hausdorff_space.rb, line 106</span>
|
209
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">full_tree</span>
|
210
|
+
<span class="ruby-identifier">root</span>.<span class="ruby-identifier">build_full_tree</span>
|
211
|
+
<span class="ruby-keyword kw">end</span></pre>
|
212
|
+
</div>
|
213
|
+
|
214
|
+
</div>
|
215
|
+
|
216
|
+
|
217
|
+
</div>
|
218
|
+
|
219
|
+
|
220
|
+
<div id="left-col-name-method" class="method-detail ">
|
221
|
+
<a name="M000006"></a>
|
222
|
+
|
223
|
+
<div class="method-heading">
|
224
|
+
|
225
|
+
<span class="method-name">left_col_name</span><span
|
226
|
+
class="method-args">()</span>
|
227
|
+
<span class="method-click-advice">click to toggle source</span>
|
228
|
+
|
229
|
+
</div>
|
230
|
+
|
231
|
+
<div class="method-description">
|
232
|
+
|
233
|
+
<p>
|
234
|
+
Return the left column name. Either the one supplied in the options to
|
235
|
+
acts_as_hausdorff_space or the default “lft“
|
236
|
+
</p>
|
237
|
+
|
238
|
+
|
239
|
+
|
240
|
+
<div class="method-source-code"
|
241
|
+
id="left-col-name-source">
|
242
|
+
<pre>
|
243
|
+
<span class="ruby-comment cmt"># File lib/acts_as_hausdorff_space.rb, line 111</span>
|
244
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">left_col_name</span>
|
245
|
+
<span class="ruby-identifier">acts_as_hausdorff_space_options</span>[<span class="ruby-identifier">:left_column</span>]
|
246
|
+
<span class="ruby-keyword kw">end</span></pre>
|
247
|
+
</div>
|
248
|
+
|
249
|
+
</div>
|
250
|
+
|
251
|
+
|
252
|
+
</div>
|
253
|
+
|
254
|
+
|
255
|
+
<div id="max-double-method" class="method-detail ">
|
256
|
+
<a name="M000008"></a>
|
257
|
+
|
258
|
+
<div class="method-heading">
|
259
|
+
|
260
|
+
<span class="method-name">max_double</span><span
|
261
|
+
class="method-args">()</span>
|
262
|
+
<span class="method-click-advice">click to toggle source</span>
|
263
|
+
|
264
|
+
</div>
|
265
|
+
|
266
|
+
<div class="method-description">
|
267
|
+
|
268
|
+
<p>
|
269
|
+
Return the <a href="ClassMethods.html#M000008">max_double</a> supplied in
|
270
|
+
the options to to acts_as_hausdorff_space or the default 1E20
|
271
|
+
</p>
|
272
|
+
|
273
|
+
|
274
|
+
|
275
|
+
<div class="method-source-code"
|
276
|
+
id="max-double-source">
|
277
|
+
<pre>
|
278
|
+
<span class="ruby-comment cmt"># File lib/acts_as_hausdorff_space.rb, line 121</span>
|
279
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">max_double</span>
|
280
|
+
<span class="ruby-identifier">acts_as_hausdorff_space_options</span>[<span class="ruby-identifier">:max_double</span>]
|
281
|
+
<span class="ruby-keyword kw">end</span></pre>
|
282
|
+
</div>
|
283
|
+
|
284
|
+
</div>
|
285
|
+
|
286
|
+
|
287
|
+
</div>
|
288
|
+
|
289
|
+
|
290
|
+
<div id="right-col-name-method" class="method-detail ">
|
291
|
+
<a name="M000007"></a>
|
292
|
+
|
293
|
+
<div class="method-heading">
|
294
|
+
|
295
|
+
<span class="method-name">right_col_name</span><span
|
296
|
+
class="method-args">()</span>
|
297
|
+
<span class="method-click-advice">click to toggle source</span>
|
298
|
+
|
299
|
+
</div>
|
300
|
+
|
301
|
+
<div class="method-description">
|
302
|
+
|
303
|
+
<p>
|
304
|
+
Return the right column name. Either the one supplied in the options to
|
305
|
+
acts_as_hausdorff_space or the default “rgt“
|
306
|
+
</p>
|
307
|
+
|
308
|
+
|
309
|
+
|
310
|
+
<div class="method-source-code"
|
311
|
+
id="right-col-name-source">
|
312
|
+
<pre>
|
313
|
+
<span class="ruby-comment cmt"># File lib/acts_as_hausdorff_space.rb, line 116</span>
|
314
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">right_col_name</span>
|
315
|
+
<span class="ruby-identifier">acts_as_hausdorff_space_options</span>[<span class="ruby-identifier">:right_column</span>]
|
316
|
+
<span class="ruby-keyword kw">end</span></pre>
|
317
|
+
</div>
|
318
|
+
|
319
|
+
</div>
|
320
|
+
|
321
|
+
|
322
|
+
</div>
|
323
|
+
|
324
|
+
|
325
|
+
<div id="root-method" class="method-detail ">
|
326
|
+
<a name="M000004"></a>
|
327
|
+
|
328
|
+
<div class="method-heading">
|
329
|
+
|
330
|
+
<span class="method-name">root</span><span
|
331
|
+
class="method-args">()</span>
|
332
|
+
<span class="method-click-advice">click to toggle source</span>
|
333
|
+
|
334
|
+
</div>
|
335
|
+
|
336
|
+
<div class="method-description">
|
337
|
+
|
338
|
+
<p>
|
339
|
+
get the first root from roots
|
340
|
+
</p>
|
341
|
+
|
342
|
+
|
343
|
+
|
344
|
+
<div class="method-source-code"
|
345
|
+
id="root-source">
|
346
|
+
<pre>
|
347
|
+
<span class="ruby-comment cmt"># File lib/acts_as_hausdorff_space.rb, line 102</span>
|
348
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">root</span>
|
349
|
+
<span class="ruby-identifier">roots</span>.<span class="ruby-identifier">first</span>
|
350
|
+
<span class="ruby-keyword kw">end</span></pre>
|
351
|
+
</div>
|
352
|
+
|
353
|
+
</div>
|
354
|
+
|
355
|
+
|
356
|
+
</div>
|
357
|
+
|
358
|
+
|
359
|
+
<div id="roots-method" class="method-detail ">
|
360
|
+
<a name="M000003"></a>
|
361
|
+
|
362
|
+
<div class="method-heading">
|
363
|
+
|
364
|
+
<span class="method-name">roots</span><span
|
365
|
+
class="method-args">()</span>
|
366
|
+
<span class="method-click-advice">click to toggle source</span>
|
367
|
+
|
368
|
+
</div>
|
369
|
+
|
370
|
+
<div class="method-description">
|
371
|
+
|
372
|
+
<p>
|
373
|
+
Get all the top level roots. This does a find of all records with no
|
374
|
+
immediate parent in the database. When they’re loaded they get a
|
375
|
+
virtual root attached as their parent. This is to make sure that every node
|
376
|
+
has a parent which helps to generalise and simplify the code for working
|
377
|
+
out left and right boundaries.
|
378
|
+
</p>
|
379
|
+
|
380
|
+
|
381
|
+
|
382
|
+
<div class="method-source-code"
|
383
|
+
id="roots-source">
|
384
|
+
<pre>
|
385
|
+
<span class="ruby-comment cmt"># File lib/acts_as_hausdorff_space.rb, line 85</span>
|
386
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">roots</span>
|
387
|
+
<span class="ruby-identifier">top_levels</span> = <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">find</span>( <span class="ruby-identifier">:all</span>, <span class="ruby-identifier">:conditions</span> =<span class="ruby-operator">></span> <span class="ruby-node">"not exists (select t1.id from #{self.table_name} t1
|
388
|
+
where t1.#{left_col_name} <#{self.table_name}.#{left_col_name}
|
389
|
+
and t1.#{right_col_name} > #{self.table_name}.#{right_col_name})"</span>,<span class="ruby-identifier">:order=</span><span class="ruby-operator">></span><span class="ruby-node">"#{left_col_name}"</span>)
|
390
|
+
<span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">virtual_root</span>.<span class="ruby-identifier">children</span>.<span class="ruby-identifier">clear</span>
|
391
|
+
<span class="ruby-identifier">top_levels</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">tl</span><span class="ruby-operator">|</span>
|
392
|
+
<span class="ruby-keyword kw">begin</span>
|
393
|
+
<span class="ruby-identifier">tl</span>.<span class="ruby-identifier">in_tree</span> = <span class="ruby-keyword kw">true</span>
|
394
|
+
<span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">virtual_root</span>.<span class="ruby-identifier">children</span> <span class="ruby-operator"><<</span> <span class="ruby-identifier">tl</span>
|
395
|
+
<span class="ruby-identifier">tl</span>.<span class="ruby-identifier">in_tree</span> = <span class="ruby-keyword kw">false</span>
|
396
|
+
<span class="ruby-keyword kw">rescue</span>
|
397
|
+
<span class="ruby-identifier">tl</span>.<span class="ruby-identifier">in_tree</span> = <span class="ruby-keyword kw">false</span>
|
398
|
+
<span class="ruby-identifier">raise</span>
|
399
|
+
<span class="ruby-keyword kw">end</span>
|
400
|
+
<span class="ruby-keyword kw">end</span>
|
401
|
+
<span class="ruby-keyword kw">end</span></pre>
|
402
|
+
</div>
|
403
|
+
|
404
|
+
</div>
|
405
|
+
|
406
|
+
|
407
|
+
</div>
|
408
|
+
|
409
|
+
|
410
|
+
<div id="virtual-root-method" class="method-detail ">
|
411
|
+
<a name="M000010"></a>
|
412
|
+
|
413
|
+
<div class="method-heading">
|
414
|
+
|
415
|
+
<span class="method-name">virtual_root</span><span
|
416
|
+
class="method-args">()</span>
|
417
|
+
<span class="method-click-advice">click to toggle source</span>
|
418
|
+
|
419
|
+
</div>
|
420
|
+
|
421
|
+
<div class="method-description">
|
422
|
+
|
423
|
+
<p>
|
424
|
+
Return the virtual root. This is an in memory only parent to all the roots,
|
425
|
+
the left is set to -<a href="ClassMethods.html#M000008">max_double</a> and
|
426
|
+
the right to <a href="ClassMethods.html#M000008">max_double</a>
|
427
|
+
</p>
|
428
|
+
|
429
|
+
|
430
|
+
|
431
|
+
<div class="method-source-code"
|
432
|
+
id="virtual-root-source">
|
433
|
+
<pre>
|
434
|
+
<span class="ruby-comment cmt"># File lib/acts_as_hausdorff_space.rb, line 130</span>
|
435
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">virtual_root</span>
|
436
|
+
<span class="ruby-identifier">acts_as_hausdorff_space_options</span>[<span class="ruby-identifier">:virtual_root</span>]
|
437
|
+
<span class="ruby-keyword kw">end</span></pre>
|
438
|
+
</div>
|
439
|
+
|
440
|
+
</div>
|
441
|
+
|
442
|
+
|
443
|
+
</div>
|
444
|
+
|
445
|
+
|
446
|
+
</div>
|
447
|
+
|
448
|
+
|
449
|
+
</div>
|
450
|
+
|
451
|
+
|
452
|
+
<div id="rdoc-debugging-section-dump" class="debugging-section">
|
453
|
+
|
454
|
+
<p>Disabled; run with --debug to generate this.</p>
|
455
|
+
|
456
|
+
</div>
|
457
|
+
|
458
|
+
<div id="validator-badges">
|
459
|
+
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
460
|
+
<p><small>Generated with the <a href="http://deveiate.org/projects/Darkfish-Rdoc/">Darkfish
|
461
|
+
Rdoc Generator</a> 1.1.6</small>.</p>
|
462
|
+
</div>
|
463
|
+
|
464
|
+
</body>
|
465
|
+
</html>
|
466
|
+
|