eymiha_util 0.1.1 → 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
- data/gem_package.rb +1 -1
- data/html/classes/BaseEnvelope.html +202 -203
- data/html/classes/BaseEnvelope.src/M000001.html +15 -15
- data/html/classes/BaseEnvelope.src/M000002.html +15 -15
- data/html/classes/BaseEnvelope.src/M000003.html +15 -15
- data/html/classes/Envelope.html +322 -328
- data/html/classes/Envelope.src/M000015.html +18 -34
- data/html/classes/Envelope.src/M000016.html +18 -18
- data/html/classes/Envelope.src/M000017.html +34 -18
- data/html/classes/Envelope.src/M000018.html +18 -25
- data/html/classes/Envelope.src/{M000013.html → M000019.html} +18 -18
- data/html/classes/Envelope.src/M000020.html +25 -17
- data/html/classes/Envelope.src/{M000014.html → M000022.html} +17 -18
- data/html/classes/EnvelopeException.html +118 -118
- data/html/classes/ForwardReference.html +193 -194
- data/html/classes/ForwardReference.src/{M000021.html → M000023.html} +19 -19
- data/html/classes/ForwardReference.src/{M000022.html → M000024.html} +17 -17
- data/html/classes/ForwardReferencer.html +175 -175
- data/html/classes/ForwardReferencing.html +298 -298
- data/html/classes/ForwardReferencing.src/M000025.html +19 -19
- data/html/classes/ForwardReferencing.src/M000026.html +19 -27
- data/html/classes/ForwardReferencing.src/M000027.html +19 -17
- data/html/classes/ForwardReferencing.src/M000028.html +27 -24
- data/html/classes/ForwardReferencing.src/M000029.html +17 -17
- data/html/classes/ForwardReferencing.src/M000030.html +24 -17
- data/html/classes/ForwardReferencing.src/{M000023.html → M000031.html} +17 -19
- data/html/classes/ForwardReferencing.src/M000032.html +18 -0
- data/html/classes/Histogram.html +314 -324
- data/html/classes/Histogram.src/M000006.html +18 -36
- data/html/classes/Histogram.src/M000007.html +20 -17
- data/html/classes/Histogram.src/M000008.html +36 -19
- data/html/classes/Histogram.src/M000009.html +17 -19
- data/html/classes/Histogram.src/M000010.html +17 -17
- data/html/classes/Histogram.src/M000011.html +17 -17
- data/html/classes/Histogram.src/M000012.html +19 -23
- data/html/classes/Histogram.src/M000013.html +20 -0
- data/html/classes/Histogram.src/M000014.html +24 -0
- data/html/classes/HistogramException.html +117 -117
- data/html/classes/MethodicHash.html +198 -0
- data/html/classes/MethodicHash.src/M000004.html +22 -0
- data/html/classes/MethodicHash.src/M000005.html +18 -0
- data/html/created.rid +1 -1
- data/html/files/lib/envelope_rb.html +108 -108
- data/html/files/lib/forward_referencing_rb.html +119 -119
- data/html/files/lib/histogram_rb.html +108 -108
- data/html/files/lib/methodic_hash_rb.html +139 -0
- data/html/fr_class_index.html +34 -33
- data/html/fr_file_index.html +29 -28
- data/html/fr_method_index.html +57 -55
- data/html/index.html +23 -23
- data/html/rdoc-style.css +207 -207
- data/lib/forward_referencing.rb +1 -1
- data/lib/methodic_hash.rb +44 -0
- data/test/tc_methodic_hash.rb +29 -0
- metadata +36 -29
- data/html/classes/ForwardReferencing.src/M000024.html +0 -20
- data/html/classes/Histogram.src/M000004.html +0 -19
- data/html/classes/Histogram.src/M000005.html +0 -21
@@ -0,0 +1,198 @@
|
|
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: MethodicHash</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">MethodicHash</td>
|
54
|
+
</tr>
|
55
|
+
<tr class="top-aligned-row">
|
56
|
+
<td><strong>In:</strong></td>
|
57
|
+
<td>
|
58
|
+
<a href="../files/lib/methodic_hash_rb.html">
|
59
|
+
lib/methodic_hash.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
|
+
Hash
|
69
|
+
</td>
|
70
|
+
</tr>
|
71
|
+
</table>
|
72
|
+
</div>
|
73
|
+
<!-- banner header -->
|
74
|
+
|
75
|
+
<div id="bodyContent">
|
76
|
+
|
77
|
+
|
78
|
+
|
79
|
+
<div id="contextContent">
|
80
|
+
|
81
|
+
<div id="description">
|
82
|
+
<p>
|
83
|
+
The <a href="MethodicHash.html">MethodicHash</a> is some <a
|
84
|
+
href="MethodicHash.html#M000005">method_missing</a> magic that tries to
|
85
|
+
lookup values when keys are passed in as method calls. For instance, if
|
86
|
+
</p>
|
87
|
+
<pre>
|
88
|
+
mh = MethodicHash.new
|
89
|
+
mh['four'] = 'iv'
|
90
|
+
mh[:seven] = 'vii'
|
91
|
+
</pre>
|
92
|
+
<p>
|
93
|
+
then
|
94
|
+
</p>
|
95
|
+
<pre>
|
96
|
+
mh['four'] ---> 'iv'
|
97
|
+
mh[:four] ---> 'iv'
|
98
|
+
mh.four ---> 'iv'
|
99
|
+
</pre>
|
100
|
+
<p>
|
101
|
+
and
|
102
|
+
</p>
|
103
|
+
<pre>
|
104
|
+
mh['seven'] ---> 'vii'
|
105
|
+
mh[:seven] ---> 'vii'
|
106
|
+
mh.seven ---> 'vii'
|
107
|
+
</pre>
|
108
|
+
<p>
|
109
|
+
This allows access to simply declared facts to be embedded in Ruby code and
|
110
|
+
leverages the possibility of hashing procs.
|
111
|
+
</p>
|
112
|
+
<p>
|
113
|
+
Note that if the hash uses anything but strings or symbols as keys, the
|
114
|
+
magic stands a good chance of failing, raising an error or acting in a
|
115
|
+
bizarre manner.
|
116
|
+
</p>
|
117
|
+
|
118
|
+
</div>
|
119
|
+
|
120
|
+
|
121
|
+
</div>
|
122
|
+
|
123
|
+
<div id="method-list">
|
124
|
+
<h3 class="section-bar">Methods</h3>
|
125
|
+
|
126
|
+
<div class="name-list">
|
127
|
+
<a href="#M000004">[]</a>
|
128
|
+
<a href="#M000005">method_missing</a>
|
129
|
+
</div>
|
130
|
+
</div>
|
131
|
+
|
132
|
+
</div>
|
133
|
+
|
134
|
+
|
135
|
+
<!-- if includes -->
|
136
|
+
|
137
|
+
<div id="section">
|
138
|
+
|
139
|
+
|
140
|
+
|
141
|
+
|
142
|
+
|
143
|
+
|
144
|
+
|
145
|
+
|
146
|
+
<!-- if method_list -->
|
147
|
+
<div id="methods">
|
148
|
+
<h3 class="section-bar">Public Instance methods</h3>
|
149
|
+
|
150
|
+
<div id="method-M000004" class="method-detail">
|
151
|
+
<a name="M000004"></a>
|
152
|
+
|
153
|
+
<div class="method-heading">
|
154
|
+
<a href="MethodicHash.src/M000004.html" target="Code" class="method-signature"
|
155
|
+
onclick="popupCode('MethodicHash.src/M000004.html');return false;">
|
156
|
+
<span class="method-name">[]</span><span class="method-args">(key)</span>
|
157
|
+
</a>
|
158
|
+
</div>
|
159
|
+
|
160
|
+
<div class="method-description">
|
161
|
+
<p>
|
162
|
+
Try to look up using a key directly, or if that fails as a string, or as a
|
163
|
+
symbol as last resort. If a symbol conversion doesn’t exists, rescue
|
164
|
+
with a nil.
|
165
|
+
</p>
|
166
|
+
</div>
|
167
|
+
</div>
|
168
|
+
|
169
|
+
<div id="method-M000005" class="method-detail">
|
170
|
+
<a name="M000005"></a>
|
171
|
+
|
172
|
+
<div class="method-heading">
|
173
|
+
<a href="MethodicHash.src/M000005.html" target="Code" class="method-signature"
|
174
|
+
onclick="popupCode('MethodicHash.src/M000005.html');return false;">
|
175
|
+
<span class="method-name">method_missing</span><span class="method-args">(method,*args)</span>
|
176
|
+
</a>
|
177
|
+
</div>
|
178
|
+
|
179
|
+
<div class="method-description">
|
180
|
+
<p>
|
181
|
+
A missing method is assummed to be the value of a key.
|
182
|
+
</p>
|
183
|
+
</div>
|
184
|
+
</div>
|
185
|
+
|
186
|
+
|
187
|
+
</div>
|
188
|
+
|
189
|
+
|
190
|
+
</div>
|
191
|
+
|
192
|
+
|
193
|
+
<div id="validator-badges">
|
194
|
+
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
195
|
+
</div>
|
196
|
+
|
197
|
+
</body>
|
198
|
+
</html>
|
@@ -0,0 +1,22 @@
|
|
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>
|
7
|
+
<head>
|
8
|
+
<title>[] (MethodicHash)</title>
|
9
|
+
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
10
|
+
<link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
|
11
|
+
</head>
|
12
|
+
<body class="standalone-code">
|
13
|
+
<pre><span class="ruby-comment cmt"># File lib/methodic_hash.rb, line 31</span>
|
14
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-operator">[]</span>(<span class="ruby-identifier">key</span>)
|
15
|
+
<span class="ruby-keyword kw">begin</span>
|
16
|
+
<span class="ruby-keyword kw">super</span>(<span class="ruby-identifier">key</span>) <span class="ruby-operator">||</span> <span class="ruby-keyword kw">super</span>(<span class="ruby-identifier">key</span>.<span class="ruby-identifier">to_s</span>) <span class="ruby-operator">||</span> <span class="ruby-keyword kw">super</span>(<span class="ruby-identifier">key</span>.<span class="ruby-identifier">to_sym</span>)
|
17
|
+
<span class="ruby-keyword kw">rescue</span>
|
18
|
+
<span class="ruby-keyword kw">nil</span>
|
19
|
+
<span class="ruby-keyword kw">end</span>
|
20
|
+
<span class="ruby-keyword kw">end</span></pre>
|
21
|
+
</body>
|
22
|
+
</html>
|
@@ -0,0 +1,18 @@
|
|
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>
|
7
|
+
<head>
|
8
|
+
<title>method_missing (MethodicHash)</title>
|
9
|
+
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
10
|
+
<link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
|
11
|
+
</head>
|
12
|
+
<body class="standalone-code">
|
13
|
+
<pre><span class="ruby-comment cmt"># File lib/methodic_hash.rb, line 40</span>
|
14
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">method_missing</span>(<span class="ruby-identifier">method</span>,<span class="ruby-operator">*</span><span class="ruby-identifier">args</span>)
|
15
|
+
<span class="ruby-keyword kw">self</span>[<span class="ruby-identifier">method</span>]
|
16
|
+
<span class="ruby-keyword kw">end</span></pre>
|
17
|
+
</body>
|
18
|
+
</html>
|
data/html/created.rid
CHANGED
@@ -1 +1 @@
|
|
1
|
-
|
1
|
+
Tue May 22 15:12:22 EDT 2007
|
@@ -1,109 +1,109 @@
|
|
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>File: envelope.rb</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="fileHeader">
|
50
|
-
<h1>envelope.rb</h1>
|
51
|
-
<table class="header-table">
|
52
|
-
<tr class="top-aligned-row">
|
53
|
-
<td><strong>Path:</strong></td>
|
54
|
-
<td>lib/envelope.rb
|
55
|
-
</td>
|
56
|
-
</tr>
|
57
|
-
<tr class="top-aligned-row">
|
58
|
-
<td><strong>Last Update:</strong></td>
|
59
|
-
<td>Wed May 09 14:49:16
|
60
|
-
</tr>
|
61
|
-
</table>
|
62
|
-
</div>
|
63
|
-
<!-- banner header -->
|
64
|
-
|
65
|
-
<div id="bodyContent">
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
<div id="contextContent">
|
70
|
-
|
71
|
-
<div id="description">
|
72
|
-
<p>
|
73
|
-
Envelopes are useful when finding the boundaries of a set of instances.
|
74
|
-
They expand as new values are added, and keep track of how many items have
|
75
|
-
been added to construct them.
|
76
|
-
</p>
|
77
|
-
|
78
|
-
</div>
|
79
|
-
|
80
|
-
|
81
|
-
</div>
|
82
|
-
|
83
|
-
|
84
|
-
</div>
|
85
|
-
|
86
|
-
|
87
|
-
<!-- if includes -->
|
88
|
-
|
89
|
-
<div id="section">
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
<!-- if method_list -->
|
99
|
-
|
100
|
-
|
101
|
-
</div>
|
102
|
-
|
103
|
-
|
104
|
-
<div id="validator-badges">
|
105
|
-
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
106
|
-
</div>
|
107
|
-
|
108
|
-
</body>
|
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>File: envelope.rb</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="fileHeader">
|
50
|
+
<h1>envelope.rb</h1>
|
51
|
+
<table class="header-table">
|
52
|
+
<tr class="top-aligned-row">
|
53
|
+
<td><strong>Path:</strong></td>
|
54
|
+
<td>lib/envelope.rb
|
55
|
+
</td>
|
56
|
+
</tr>
|
57
|
+
<tr class="top-aligned-row">
|
58
|
+
<td><strong>Last Update:</strong></td>
|
59
|
+
<td>Wed May 09 14:49:16 EDT 2007</td>
|
60
|
+
</tr>
|
61
|
+
</table>
|
62
|
+
</div>
|
63
|
+
<!-- banner header -->
|
64
|
+
|
65
|
+
<div id="bodyContent">
|
66
|
+
|
67
|
+
|
68
|
+
|
69
|
+
<div id="contextContent">
|
70
|
+
|
71
|
+
<div id="description">
|
72
|
+
<p>
|
73
|
+
Envelopes are useful when finding the boundaries of a set of instances.
|
74
|
+
They expand as new values are added, and keep track of how many items have
|
75
|
+
been added to construct them.
|
76
|
+
</p>
|
77
|
+
|
78
|
+
</div>
|
79
|
+
|
80
|
+
|
81
|
+
</div>
|
82
|
+
|
83
|
+
|
84
|
+
</div>
|
85
|
+
|
86
|
+
|
87
|
+
<!-- if includes -->
|
88
|
+
|
89
|
+
<div id="section">
|
90
|
+
|
91
|
+
|
92
|
+
|
93
|
+
|
94
|
+
|
95
|
+
|
96
|
+
|
97
|
+
|
98
|
+
<!-- if method_list -->
|
99
|
+
|
100
|
+
|
101
|
+
</div>
|
102
|
+
|
103
|
+
|
104
|
+
<div id="validator-badges">
|
105
|
+
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
106
|
+
</div>
|
107
|
+
|
108
|
+
</body>
|
109
109
|
</html>
|