serverside 0.2.7 → 0.2.8
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG +16 -0
- data/Rakefile +16 -1
- data/lib/serverside/caching.rb +56 -0
- data/lib/serverside/request.rb +8 -4
- data/lib/serverside/static.rb +29 -51
- data/test/functional/static_server.rb +7 -0
- data/test/spec/caching_spec.rb +101 -0
- data/test/spec/connection_spec.rb +0 -2
- data/test/unit/request_test.rb +31 -1
- data/test/unit/static_test.rb +21 -25
- metadata +30 -75
- data/doc/rdoc/classes/Daemon/Base.html +0 -148
- data/doc/rdoc/classes/Daemon/Cluster/PidFile.html +0 -230
- data/doc/rdoc/classes/Daemon/Cluster.html +0 -308
- data/doc/rdoc/classes/Daemon/PidFile.html +0 -178
- data/doc/rdoc/classes/Daemon.html +0 -253
- data/doc/rdoc/classes/Object.html +0 -151
- data/doc/rdoc/classes/Proc.html +0 -151
- data/doc/rdoc/classes/ServerSide/Application.html +0 -172
- data/doc/rdoc/classes/ServerSide/HTTP/Connection.html +0 -202
- data/doc/rdoc/classes/ServerSide/HTTP/Request.html +0 -768
- data/doc/rdoc/classes/ServerSide/HTTP/Server.html +0 -164
- data/doc/rdoc/classes/ServerSide/HTTP.html +0 -121
- data/doc/rdoc/classes/ServerSide/Router.html +0 -496
- data/doc/rdoc/classes/ServerSide/StaticFiles/Const.html +0 -204
- data/doc/rdoc/classes/ServerSide/StaticFiles.html +0 -282
- data/doc/rdoc/classes/ServerSide/Template.html +0 -200
- data/doc/rdoc/classes/ServerSide.html +0 -174
- data/doc/rdoc/classes/String.html +0 -212
- data/doc/rdoc/classes/Symbol.html +0 -158
- data/doc/rdoc/created.rid +0 -1
- data/doc/rdoc/files/CHANGELOG.html +0 -356
- data/doc/rdoc/files/COPYING.html +0 -129
- data/doc/rdoc/files/README.html +0 -199
- data/doc/rdoc/files/lib/serverside/application_rb.html +0 -109
- data/doc/rdoc/files/lib/serverside/cluster_rb.html +0 -101
- data/doc/rdoc/files/lib/serverside/connection_rb.html +0 -101
- data/doc/rdoc/files/lib/serverside/core_ext_rb.html +0 -107
- data/doc/rdoc/files/lib/serverside/daemon_rb.html +0 -108
- data/doc/rdoc/files/lib/serverside/request_rb.html +0 -108
- data/doc/rdoc/files/lib/serverside/routing_rb.html +0 -101
- data/doc/rdoc/files/lib/serverside/server_rb.html +0 -108
- data/doc/rdoc/files/lib/serverside/static_rb.html +0 -108
- data/doc/rdoc/files/lib/serverside/template_rb.html +0 -108
- data/doc/rdoc/files/lib/serverside_rb.html +0 -131
- data/doc/rdoc/fr_class_index.html +0 -45
- data/doc/rdoc/fr_file_index.html +0 -40
- data/doc/rdoc/fr_method_index.html +0 -79
- data/doc/rdoc/index.html +0 -24
- data/doc/rdoc/rdoc-style.css +0 -208
@@ -1,253 +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: Daemon</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">Daemon</td>
|
54
|
-
</tr>
|
55
|
-
<tr class="top-aligned-row">
|
56
|
-
<td><strong>In:</strong></td>
|
57
|
-
<td>
|
58
|
-
<a href="../files/lib/serverside/daemon_rb.html">
|
59
|
-
lib/serverside/daemon.rb
|
60
|
-
</a>
|
61
|
-
<br />
|
62
|
-
<a href="../files/lib/serverside/cluster_rb.html">
|
63
|
-
lib/serverside/cluster.rb
|
64
|
-
</a>
|
65
|
-
<br />
|
66
|
-
</td>
|
67
|
-
</tr>
|
68
|
-
|
69
|
-
</table>
|
70
|
-
</div>
|
71
|
-
<!-- banner header -->
|
72
|
-
|
73
|
-
<div id="bodyContent">
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
<div id="contextContent">
|
78
|
-
|
79
|
-
<div id="description">
|
80
|
-
<p>
|
81
|
-
The <a href="Daemon.html">Daemon</a> module takes care of starting and
|
82
|
-
stopping daemons.
|
83
|
-
</p>
|
84
|
-
|
85
|
-
</div>
|
86
|
-
|
87
|
-
|
88
|
-
</div>
|
89
|
-
|
90
|
-
<div id="method-list">
|
91
|
-
<h3 class="section-bar">Methods</h3>
|
92
|
-
|
93
|
-
<div class="name-list">
|
94
|
-
<a href="#M000007">control</a>
|
95
|
-
<a href="#M000008">start</a>
|
96
|
-
<a href="#M000009">stop</a>
|
97
|
-
</div>
|
98
|
-
</div>
|
99
|
-
|
100
|
-
</div>
|
101
|
-
|
102
|
-
|
103
|
-
<!-- if includes -->
|
104
|
-
|
105
|
-
<div id="section">
|
106
|
-
|
107
|
-
<div id="class-list">
|
108
|
-
<h3 class="section-bar">Classes and Modules</h3>
|
109
|
-
|
110
|
-
Module <a href="Daemon/PidFile.html" class="link">Daemon::PidFile</a><br />
|
111
|
-
Class <a href="Daemon/Base.html" class="link">Daemon::Base</a><br />
|
112
|
-
Class <a href="Daemon/Cluster.html" class="link">Daemon::Cluster</a><br />
|
113
|
-
|
114
|
-
</div>
|
115
|
-
|
116
|
-
<div id="constants-list">
|
117
|
-
<h3 class="section-bar">Constants</h3>
|
118
|
-
|
119
|
-
<div class="name-list">
|
120
|
-
<table summary="Constants">
|
121
|
-
<tr class="top-aligned-row context-row">
|
122
|
-
<td class="context-item-name">WorkingDirectory</td>
|
123
|
-
<td>=</td>
|
124
|
-
<td class="context-item-value">FileUtils.pwd</td>
|
125
|
-
</tr>
|
126
|
-
</table>
|
127
|
-
</div>
|
128
|
-
</div>
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
<!-- if method_list -->
|
136
|
-
<div id="methods">
|
137
|
-
<h3 class="section-bar">Public Class methods</h3>
|
138
|
-
|
139
|
-
<div id="method-M000007" class="method-detail">
|
140
|
-
<a name="M000007"></a>
|
141
|
-
|
142
|
-
<div class="method-heading">
|
143
|
-
<a href="#M000007" class="method-signature">
|
144
|
-
<span class="method-name">control</span><span class="method-args">(daemon, cmd = nil)</span>
|
145
|
-
</a>
|
146
|
-
</div>
|
147
|
-
|
148
|
-
<div class="method-description">
|
149
|
-
<p>
|
150
|
-
Controls a daemon according to the supplied command or command-line
|
151
|
-
parameter. If an invalid command is specified, an error is raised.
|
152
|
-
</p>
|
153
|
-
<p><a class="source-toggle" href="#"
|
154
|
-
onclick="toggleCode('M000007-source');return false;">[Source]</a></p>
|
155
|
-
<div class="method-source-code" id="M000007-source">
|
156
|
-
<pre>
|
157
|
-
<span class="ruby-comment cmt"># File lib/serverside/daemon.rb, line 31</span>
|
158
|
-
31: <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">control</span>(<span class="ruby-identifier">daemon</span>, <span class="ruby-identifier">cmd</span> = <span class="ruby-keyword kw">nil</span>)
|
159
|
-
32: <span class="ruby-keyword kw">case</span> (<span class="ruby-identifier">cmd</span> <span class="ruby-operator">||</span> (<span class="ruby-operator">!</span><span class="ruby-constant">ARGV</span>.<span class="ruby-identifier">empty?</span> <span class="ruby-operator">&&</span> <span class="ruby-constant">ARGV</span>[<span class="ruby-value">0</span>]) <span class="ruby-operator">||</span> <span class="ruby-identifier">:nil</span>).<span class="ruby-identifier">to_sym</span>
|
160
|
-
33: <span class="ruby-keyword kw">when</span> <span class="ruby-identifier">:start</span>
|
161
|
-
34: <span class="ruby-identifier">start</span>(<span class="ruby-identifier">daemon</span>)
|
162
|
-
35: <span class="ruby-keyword kw">when</span> <span class="ruby-identifier">:stop</span>
|
163
|
-
36: <span class="ruby-identifier">stop</span>(<span class="ruby-identifier">daemon</span>)
|
164
|
-
37: <span class="ruby-keyword kw">when</span> <span class="ruby-identifier">:restart</span>
|
165
|
-
38: <span class="ruby-identifier">stop</span>(<span class="ruby-identifier">daemon</span>)
|
166
|
-
39: <span class="ruby-identifier">start</span>(<span class="ruby-identifier">daemon</span>)
|
167
|
-
40: <span class="ruby-keyword kw">else</span>
|
168
|
-
41: <span class="ruby-identifier">raise</span> <span class="ruby-value str">'Invalid command. Please specify start, stop or restart.'</span>
|
169
|
-
42: <span class="ruby-keyword kw">end</span>
|
170
|
-
43: <span class="ruby-keyword kw">end</span>
|
171
|
-
</pre>
|
172
|
-
</div>
|
173
|
-
</div>
|
174
|
-
</div>
|
175
|
-
|
176
|
-
<div id="method-M000008" class="method-detail">
|
177
|
-
<a name="M000008"></a>
|
178
|
-
|
179
|
-
<div class="method-heading">
|
180
|
-
<a href="#M000008" class="method-signature">
|
181
|
-
<span class="method-name">start</span><span class="method-args">(daemon)</span>
|
182
|
-
</a>
|
183
|
-
</div>
|
184
|
-
|
185
|
-
<div class="method-description">
|
186
|
-
<p>
|
187
|
-
Starts the daemon by forking and bcoming session leader.
|
188
|
-
</p>
|
189
|
-
<p><a class="source-toggle" href="#"
|
190
|
-
onclick="toggleCode('M000008-source');return false;">[Source]</a></p>
|
191
|
-
<div class="method-source-code" id="M000008-source">
|
192
|
-
<pre>
|
193
|
-
<span class="ruby-comment cmt"># File lib/serverside/daemon.rb, line 46</span>
|
194
|
-
46: <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">start</span>(<span class="ruby-identifier">daemon</span>)
|
195
|
-
47: <span class="ruby-identifier">fork</span> <span class="ruby-keyword kw">do</span>
|
196
|
-
48: <span class="ruby-constant">Process</span>.<span class="ruby-identifier">setsid</span>
|
197
|
-
49: <span class="ruby-identifier">exit</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">fork</span>
|
198
|
-
50: <span class="ruby-constant">PidFile</span>.<span class="ruby-identifier">store</span>(<span class="ruby-identifier">daemon</span>, <span class="ruby-constant">Process</span>.<span class="ruby-identifier">pid</span>)
|
199
|
-
51: <span class="ruby-constant">Dir</span>.<span class="ruby-identifier">chdir</span> <span class="ruby-constant">WorkingDirectory</span>
|
200
|
-
52: <span class="ruby-constant">File</span>.<span class="ruby-identifier">umask</span> <span class="ruby-value">0000</span>
|
201
|
-
53: <span class="ruby-constant">STDIN</span>.<span class="ruby-identifier">reopen</span> <span class="ruby-value str">"/dev/null"</span>
|
202
|
-
54: <span class="ruby-constant">STDOUT</span>.<span class="ruby-identifier">reopen</span> <span class="ruby-value str">"/dev/null"</span>, <span class="ruby-value str">"a"</span>
|
203
|
-
55: <span class="ruby-constant">STDERR</span>.<span class="ruby-identifier">reopen</span> <span class="ruby-constant">STDOUT</span>
|
204
|
-
56: <span class="ruby-identifier">trap</span>(<span class="ruby-value str">"TERM"</span>) {<span class="ruby-identifier">daemon</span>.<span class="ruby-identifier">stop</span>; <span class="ruby-identifier">exit</span>}
|
205
|
-
57: <span class="ruby-identifier">daemon</span>.<span class="ruby-identifier">start</span>
|
206
|
-
58: <span class="ruby-keyword kw">end</span>
|
207
|
-
59: <span class="ruby-keyword kw">end</span>
|
208
|
-
</pre>
|
209
|
-
</div>
|
210
|
-
</div>
|
211
|
-
</div>
|
212
|
-
|
213
|
-
<div id="method-M000009" class="method-detail">
|
214
|
-
<a name="M000009"></a>
|
215
|
-
|
216
|
-
<div class="method-heading">
|
217
|
-
<a href="#M000009" class="method-signature">
|
218
|
-
<span class="method-name">stop</span><span class="method-args">(daemon)</span>
|
219
|
-
</a>
|
220
|
-
</div>
|
221
|
-
|
222
|
-
<div class="method-description">
|
223
|
-
<p>
|
224
|
-
Stops the daemon by sending it a TERM signal.
|
225
|
-
</p>
|
226
|
-
<p><a class="source-toggle" href="#"
|
227
|
-
onclick="toggleCode('M000009-source');return false;">[Source]</a></p>
|
228
|
-
<div class="method-source-code" id="M000009-source">
|
229
|
-
<pre>
|
230
|
-
<span class="ruby-comment cmt"># File lib/serverside/daemon.rb, line 62</span>
|
231
|
-
62: <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">stop</span>(<span class="ruby-identifier">daemon</span>)
|
232
|
-
63: <span class="ruby-identifier">pid</span> = <span class="ruby-constant">PidFile</span>.<span class="ruby-identifier">recall</span>(<span class="ruby-identifier">daemon</span>)
|
233
|
-
64: <span class="ruby-constant">FileUtils</span>.<span class="ruby-identifier">rm</span>(<span class="ruby-identifier">daemon</span>.<span class="ruby-identifier">pid_fn</span>)
|
234
|
-
65: <span class="ruby-identifier">pid</span> <span class="ruby-operator">&&</span> <span class="ruby-constant">Process</span>.<span class="ruby-identifier">kill</span>(<span class="ruby-value str">"TERM"</span>, <span class="ruby-identifier">pid</span>)
|
235
|
-
66: <span class="ruby-keyword kw">end</span>
|
236
|
-
</pre>
|
237
|
-
</div>
|
238
|
-
</div>
|
239
|
-
</div>
|
240
|
-
|
241
|
-
|
242
|
-
</div>
|
243
|
-
|
244
|
-
|
245
|
-
</div>
|
246
|
-
|
247
|
-
|
248
|
-
<div id="validator-badges">
|
249
|
-
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
250
|
-
</div>
|
251
|
-
|
252
|
-
</body>
|
253
|
-
</html>
|
@@ -1,151 +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: Object</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">Object</td>
|
54
|
-
</tr>
|
55
|
-
<tr class="top-aligned-row">
|
56
|
-
<td><strong>In:</strong></td>
|
57
|
-
<td>
|
58
|
-
<a href="../files/lib/serverside/core_ext_rb.html">
|
59
|
-
lib/serverside/core_ext.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
|
-
|
84
|
-
|
85
|
-
</div>
|
86
|
-
|
87
|
-
<div id="method-list">
|
88
|
-
<h3 class="section-bar">Methods</h3>
|
89
|
-
|
90
|
-
<div class="name-list">
|
91
|
-
<a href="#M000003">const_tag</a>
|
92
|
-
</div>
|
93
|
-
</div>
|
94
|
-
|
95
|
-
</div>
|
96
|
-
|
97
|
-
|
98
|
-
<!-- if includes -->
|
99
|
-
|
100
|
-
<div id="section">
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
<!-- if method_list -->
|
110
|
-
<div id="methods">
|
111
|
-
<h3 class="section-bar">Public Instance methods</h3>
|
112
|
-
|
113
|
-
<div id="method-M000003" class="method-detail">
|
114
|
-
<a name="M000003"></a>
|
115
|
-
|
116
|
-
<div class="method-heading">
|
117
|
-
<a href="#M000003" class="method-signature">
|
118
|
-
<span class="method-name">const_tag</span><span class="method-args">()</span>
|
119
|
-
</a>
|
120
|
-
</div>
|
121
|
-
|
122
|
-
<div class="method-description">
|
123
|
-
<p>
|
124
|
-
Returns a unique tag for the object. This method is used by the router.
|
125
|
-
</p>
|
126
|
-
<p><a class="source-toggle" href="#"
|
127
|
-
onclick="toggleCode('M000003-source');return false;">[Source]</a></p>
|
128
|
-
<div class="method-source-code" id="M000003-source">
|
129
|
-
<pre>
|
130
|
-
<span class="ruby-comment cmt"># File lib/serverside/core_ext.rb, line 38</span>
|
131
|
-
38: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">const_tag</span>
|
132
|
-
39: <span class="ruby-value str">'C'</span> <span class="ruby-operator">+</span> <span class="ruby-identifier">object_id</span>.<span class="ruby-identifier">to_s</span>(<span class="ruby-value">36</span>).<span class="ruby-identifier">upcase</span>.<span class="ruby-identifier">sub</span>(<span class="ruby-value str">'-'</span>, <span class="ruby-value str">'_'</span>)
|
133
|
-
40: <span class="ruby-keyword kw">end</span>
|
134
|
-
</pre>
|
135
|
-
</div>
|
136
|
-
</div>
|
137
|
-
</div>
|
138
|
-
|
139
|
-
|
140
|
-
</div>
|
141
|
-
|
142
|
-
|
143
|
-
</div>
|
144
|
-
|
145
|
-
|
146
|
-
<div id="validator-badges">
|
147
|
-
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
148
|
-
</div>
|
149
|
-
|
150
|
-
</body>
|
151
|
-
</html>
|
data/doc/rdoc/classes/Proc.html
DELETED
@@ -1,151 +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: Proc</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">Proc</td>
|
54
|
-
</tr>
|
55
|
-
<tr class="top-aligned-row">
|
56
|
-
<td><strong>In:</strong></td>
|
57
|
-
<td>
|
58
|
-
<a href="../files/lib/serverside/core_ext_rb.html">
|
59
|
-
lib/serverside/core_ext.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
|
-
|
84
|
-
|
85
|
-
</div>
|
86
|
-
|
87
|
-
<div id="method-list">
|
88
|
-
<h3 class="section-bar">Methods</h3>
|
89
|
-
|
90
|
-
<div class="name-list">
|
91
|
-
<a href="#M000002">proc_tag</a>
|
92
|
-
</div>
|
93
|
-
</div>
|
94
|
-
|
95
|
-
</div>
|
96
|
-
|
97
|
-
|
98
|
-
<!-- if includes -->
|
99
|
-
|
100
|
-
<div id="section">
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
<!-- if method_list -->
|
110
|
-
<div id="methods">
|
111
|
-
<h3 class="section-bar">Public Instance methods</h3>
|
112
|
-
|
113
|
-
<div id="method-M000002" class="method-detail">
|
114
|
-
<a name="M000002"></a>
|
115
|
-
|
116
|
-
<div class="method-heading">
|
117
|
-
<a href="#M000002" class="method-signature">
|
118
|
-
<span class="method-name">proc_tag</span><span class="method-args">()</span>
|
119
|
-
</a>
|
120
|
-
</div>
|
121
|
-
|
122
|
-
<div class="method-description">
|
123
|
-
<p>
|
124
|
-
Returns a unique proc tag. This method is used by the router.
|
125
|
-
</p>
|
126
|
-
<p><a class="source-toggle" href="#"
|
127
|
-
onclick="toggleCode('M000002-source');return false;">[Source]</a></p>
|
128
|
-
<div class="method-source-code" id="M000002-source">
|
129
|
-
<pre>
|
130
|
-
<span class="ruby-comment cmt"># File lib/serverside/core_ext.rb, line 31</span>
|
131
|
-
31: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">proc_tag</span>
|
132
|
-
32: <span class="ruby-value str">'proc_'</span> <span class="ruby-operator">+</span> <span class="ruby-identifier">object_id</span>.<span class="ruby-identifier">to_s</span>(<span class="ruby-value">36</span>).<span class="ruby-identifier">sub</span>(<span class="ruby-value str">'-'</span>, <span class="ruby-value str">'_'</span>)
|
133
|
-
33: <span class="ruby-keyword kw">end</span>
|
134
|
-
</pre>
|
135
|
-
</div>
|
136
|
-
</div>
|
137
|
-
</div>
|
138
|
-
|
139
|
-
|
140
|
-
</div>
|
141
|
-
|
142
|
-
|
143
|
-
</div>
|
144
|
-
|
145
|
-
|
146
|
-
<div id="validator-badges">
|
147
|
-
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
148
|
-
</div>
|
149
|
-
|
150
|
-
</body>
|
151
|
-
</html>
|