wee 2.0.0 → 2.1.0
Sign up to get free protection for your applications and to get access to all the features.
- data/TODO +31 -0
- data/benchmark.rb +37 -0
- data/demo.ru +11 -0
- data/doc/rdoc/classes/Array.html +22 -26
- data/doc/rdoc/classes/Hash.html +22 -26
- data/doc/rdoc/classes/Object.html +21 -26
- data/doc/rdoc/classes/String.html +19 -87
- data/doc/rdoc/classes/Struct.html +22 -26
- data/doc/rdoc/classes/Wee.html +75 -206
- data/doc/rdoc/classes/Wee/AnswerDecoration.html +35 -66
- data/doc/rdoc/classes/Wee/AnswerDecoration/Answer.html +28 -46
- data/doc/rdoc/classes/Wee/Application.html +63 -114
- data/doc/rdoc/classes/Wee/Application/SessionCache.html +30 -44
- data/doc/rdoc/classes/Wee/Brush.html +52 -101
- data/doc/rdoc/classes/Wee/Brush/ActionInputTag.html +29 -51
- data/doc/rdoc/classes/Wee/Brush/AnchorTag.html +44 -101
- data/doc/rdoc/classes/Wee/Brush/CheckboxTag.html +43 -76
- data/doc/rdoc/classes/Wee/Brush/FileUploadTag.html +29 -46
- data/doc/rdoc/classes/Wee/Brush/FormTag.html +48 -110
- data/doc/rdoc/classes/Wee/Brush/GenericEncodedTextBrush.html +30 -42
- data/doc/rdoc/classes/Wee/Brush/GenericSingleTagBrush.html +37 -58
- data/doc/rdoc/classes/Wee/Brush/GenericTagBrush.html +93 -210
- data/doc/rdoc/classes/Wee/Brush/GenericTextBrush.html +38 -63
- data/doc/rdoc/classes/Wee/Brush/HiddenInputTag.html +29 -45
- data/doc/rdoc/classes/Wee/Brush/ImageButtonTag.html +35 -52
- data/doc/rdoc/classes/Wee/Brush/ImageTag.html +28 -61
- data/doc/rdoc/classes/Wee/Brush/InputTag.html +34 -107
- data/doc/rdoc/classes/Wee/Brush/JavascriptTag.html +28 -54
- data/doc/rdoc/classes/Wee/Brush/Page.html +39 -73
- data/doc/rdoc/classes/Wee/Brush/PasswordInputTag.html +29 -45
- data/doc/rdoc/classes/Wee/Brush/RadioButtonTag.html +54 -98
- data/doc/rdoc/classes/Wee/Brush/RadioGroup.html +46 -84
- data/doc/rdoc/classes/Wee/Brush/SelectListTag.html +87 -187
- data/doc/rdoc/classes/Wee/Brush/SelectOptionTag.html +29 -56
- data/doc/rdoc/classes/Wee/Brush/SubmitButtonTag.html +29 -45
- data/doc/rdoc/classes/Wee/Brush/TableDataTag.html +28 -55
- data/doc/rdoc/classes/Wee/Brush/TableHeaderTag.html +28 -55
- data/doc/rdoc/classes/Wee/Brush/TableRowTag.html +56 -113
- data/doc/rdoc/classes/Wee/Brush/TableTag.html +27 -58
- data/doc/rdoc/classes/Wee/Brush/TextAreaTag.html +48 -140
- data/doc/rdoc/classes/Wee/Brush/TextInputTag.html +29 -45
- data/doc/rdoc/classes/Wee/CallAnswerMixin.html +51 -79
- data/doc/rdoc/classes/Wee/CallbackMixin.html +44 -77
- data/doc/rdoc/classes/Wee/CallbackRegistry.html +69 -125
- data/doc/rdoc/classes/Wee/Callbacks.html +43 -82
- data/doc/rdoc/classes/Wee/Component.html +142 -292
- data/doc/rdoc/classes/Wee/Decoration.html +85 -141
- data/doc/rdoc/classes/Wee/DecorationMixin.html +111 -118
- data/doc/rdoc/classes/Wee/Delegate.html +72 -115
- data/doc/rdoc/classes/Wee/DupReplaceSnapshotMixin.html +37 -54
- data/doc/rdoc/classes/Wee/ErrorResponse.html +31 -48
- data/doc/rdoc/classes/Wee/FormDecoration.html +32 -46
- data/doc/rdoc/classes/Wee/GenericResponse.html +30 -50
- data/doc/rdoc/classes/Wee/HtmlCanvas.html +209 -562
- data/doc/rdoc/classes/Wee/HtmlDocument.html +51 -91
- data/doc/rdoc/classes/Wee/HtmlWriter.html +76 -156
- data/doc/rdoc/classes/Wee/IdGenerator.html +28 -44
- data/doc/rdoc/classes/Wee/IdGenerator/Secure.html +53 -95
- data/doc/rdoc/classes/Wee/IdGenerator/Sequential.html +37 -63
- data/doc/rdoc/classes/Wee/JQuery.html +36 -64
- data/doc/rdoc/classes/Wee/LRUCache.html +94 -189
- data/doc/rdoc/classes/Wee/LRUCache/Item.html +30 -42
- data/doc/rdoc/classes/Wee/ObjectSnapshotMixin.html +37 -54
- data/doc/rdoc/classes/Wee/PageDecoration.html +48 -79
- data/doc/rdoc/classes/Wee/Presenter.html +86 -143
- data/doc/rdoc/classes/Wee/RedirectResponse.html +31 -49
- data/doc/rdoc/classes/Wee/RefreshResponse.html +34 -48
- data/doc/rdoc/classes/Wee/Renderer.html +56 -125
- data/doc/rdoc/classes/Wee/Request.html +57 -115
- data/doc/rdoc/classes/Wee/Response.html +24 -26
- data/doc/rdoc/classes/Wee/Session.html +137 -292
- data/doc/rdoc/classes/Wee/Session/AbortCallbackProcessing.html +29 -46
- data/doc/rdoc/classes/Wee/Session/MutexSerializer.html +29 -42
- data/doc/rdoc/classes/Wee/Session/Page.html +22 -21
- data/doc/rdoc/classes/Wee/Session/ThreadSerializer.html +36 -60
- data/doc/rdoc/classes/Wee/State.html +57 -105
- data/doc/rdoc/classes/Wee/State/Snapshot.html +22 -21
- data/doc/rdoc/classes/Wee/State/SnapshotIVars.html +22 -21
- data/doc/rdoc/classes/Wee/StructSnapshotMixin.html +37 -54
- data/doc/rdoc/classes/Wee/WrapperDecoration.html +42 -68
- data/doc/rdoc/created.rid +1 -1
- data/doc/rdoc/files/README_rdoc.html +26 -17
- data/doc/rdoc/files/lib/wee/application_rb.html +25 -19
- data/doc/rdoc/files/lib/wee/call_answer_rb.html +23 -12
- data/doc/rdoc/files/lib/wee/callback_rb.html +23 -12
- data/doc/rdoc/files/lib/wee/component_rb.html +25 -19
- data/doc/rdoc/files/lib/wee/decoration_rb.html +23 -15
- data/doc/rdoc/files/lib/wee/html_brushes_rb.html +23 -12
- data/doc/rdoc/files/lib/wee/html_canvas_rb.html +23 -15
- data/doc/rdoc/files/lib/wee/html_document_rb.html +23 -15
- data/doc/rdoc/files/lib/wee/html_writer_rb.html +23 -15
- data/doc/rdoc/files/lib/wee/id_generator_rb.html +24 -17
- data/doc/rdoc/files/lib/wee/jquery/jquery_rb.html +23 -12
- data/doc/rdoc/files/lib/wee/jquery_rb.html +23 -15
- data/doc/rdoc/files/lib/wee/lru_cache_rb.html +23 -12
- data/doc/rdoc/files/lib/wee/presenter_rb.html +23 -12
- data/doc/rdoc/files/lib/wee/renderer_rb.html +23 -12
- data/doc/rdoc/files/lib/wee/request_rb.html +23 -15
- data/doc/rdoc/files/lib/wee/response_rb.html +24 -17
- data/doc/rdoc/files/lib/wee/session_rb.html +26 -21
- data/doc/rdoc/files/lib/wee/state_rb.html +23 -12
- data/doc/rdoc/files/lib/wee_rb.html +37 -47
- data/doc/rdoc/fr_class_index.html +12 -86
- data/doc/rdoc/fr_file_index.html +12 -30
- data/doc/rdoc/fr_method_index.html +242 -473
- data/doc/rdoc/index.html +8 -5
- data/doc/rdoc/rdoc-style.css +119 -210
- data/examples/ObjectSpaceBrowser.rb +4 -4
- data/examples/TODO +21 -0
- data/examples/ajax.rb +6 -4
- data/examples/blog.rb +42 -0
- data/examples/demo.rb +5 -3
- data/examples/demo/calculator.rb +3 -3
- data/examples/demo/calendar.rb +4 -4
- data/examples/demo/counter.rb +2 -2
- data/examples/demo/editable_counter.rb +2 -2
- data/examples/demo/example.rb +25 -16
- data/examples/demo/window.rb +10 -3
- data/examples/hw2.rb +17 -0
- data/examples/recipe/description.rb +170 -0
- data/examples/recipe/migrations/001_create_recipes.rb +13 -0
- data/examples/recipe/model.rb +27 -0
- data/examples/recipe/models/recipe.rb +18 -0
- data/examples/recipe/recipe_editor.rb +28 -0
- data/lib/wee.rb +1 -7
- data/lib/wee/component.rb +37 -74
- data/lib/wee/decoration.rb +16 -15
- data/lib/wee/html_brushes.rb +16 -17
- data/lib/wee/presenter.rb +2 -1
- data/lib/wee/response.rb +4 -4
- data/lib/wee/session.rb +2 -2
- data/lib/wee/state.rb +2 -2
- data/test/t.rb +67 -0
- data/wee.gemspec +1 -1
- metadata +157 -167
@@ -1,9 +1,12 @@
|
|
1
|
-
|
2
|
-
|
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
|
+
|
3
6
|
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
4
7
|
<head>
|
5
|
-
<title>Class: Wee::Session
|
6
|
-
<meta http-equiv="Content-Type" content="text/html; charset=
|
8
|
+
<title>Class: Wee::Session</title>
|
9
|
+
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
7
10
|
<meta http-equiv="Content-Script-Type" content="text/javascript" />
|
8
11
|
<link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
|
9
12
|
<script type="text/javascript">
|
@@ -22,7 +25,7 @@
|
|
22
25
|
return false;
|
23
26
|
|
24
27
|
elemStyle = elem.style;
|
25
|
-
|
28
|
+
|
26
29
|
if ( elemStyle.display != "block" ) {
|
27
30
|
elemStyle.display = "block"
|
28
31
|
} else {
|
@@ -31,10 +34,10 @@
|
|
31
34
|
|
32
35
|
return true;
|
33
36
|
}
|
34
|
-
|
37
|
+
|
35
38
|
// Make codeblocks hidden by default
|
36
|
-
document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }
|
37
|
-
|
39
|
+
document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
|
40
|
+
|
38
41
|
// ]]>
|
39
42
|
</script>
|
40
43
|
|
@@ -42,6 +45,7 @@
|
|
42
45
|
<body>
|
43
46
|
|
44
47
|
|
48
|
+
|
45
49
|
<div id="classHeader">
|
46
50
|
<table class="header-table">
|
47
51
|
<tr class="top-aligned-row">
|
@@ -51,85 +55,60 @@
|
|
51
55
|
<tr class="top-aligned-row">
|
52
56
|
<td><strong>In:</strong></td>
|
53
57
|
<td>
|
54
|
-
|
55
|
-
|
56
58
|
<a href="../../files/lib/wee/session_rb.html">
|
57
|
-
|
58
59
|
lib/wee/session.rb
|
59
|
-
|
60
60
|
</a>
|
61
|
-
|
62
|
-
|
63
61
|
<br />
|
64
|
-
|
65
62
|
</td>
|
66
63
|
</tr>
|
67
64
|
|
68
|
-
|
69
65
|
<tr class="top-aligned-row">
|
70
66
|
<td><strong>Parent:</strong></td>
|
71
67
|
<td>
|
72
|
-
|
73
68
|
<a href="../Object.html">
|
74
|
-
|
75
69
|
Object
|
76
|
-
|
77
70
|
</a>
|
78
|
-
|
79
71
|
</td>
|
80
72
|
</tr>
|
81
|
-
|
82
73
|
</table>
|
83
74
|
</div>
|
84
75
|
<!-- banner header -->
|
85
76
|
|
86
77
|
<div id="bodyContent">
|
87
78
|
|
79
|
+
|
80
|
+
|
88
81
|
<div id="contextContent">
|
89
82
|
|
90
|
-
</div>
|
91
83
|
|
92
84
|
|
85
|
+
</div>
|
86
|
+
|
93
87
|
<div id="method-list">
|
94
88
|
<h3 class="section-bar">Methods</h3>
|
95
89
|
|
96
90
|
<div class="name-list">
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
<a href="#M000020">new</a>
|
113
|
-
|
114
|
-
<a href="#M000032">render</a>
|
115
|
-
|
116
|
-
<a href="#M000031">render_ajax_proc</a>
|
117
|
-
|
118
|
-
<a href="#M000027">send_response</a>
|
119
|
-
|
120
|
-
<a href="#M000029">sleep</a>
|
121
|
-
|
122
|
-
<a href="#M000024">statistics</a>
|
123
|
-
|
124
|
-
<a href="#M000034">take_snapshot</a>
|
125
|
-
|
126
|
-
<a href="#M000021">terminate</a>
|
127
|
-
|
91
|
+
<a href="#M000091">action</a>
|
92
|
+
<a href="#M000080">alive?</a>
|
93
|
+
<a href="#M000086">awake</a>
|
94
|
+
<a href="#M000084">call</a>
|
95
|
+
<a href="#M000083">current</a>
|
96
|
+
<a href="#M000081">dead?</a>
|
97
|
+
<a href="#M000088">handle</a>
|
98
|
+
<a href="#M000078">new</a>
|
99
|
+
<a href="#M000090">render</a>
|
100
|
+
<a href="#M000089">render_ajax_proc</a>
|
101
|
+
<a href="#M000085">send_response</a>
|
102
|
+
<a href="#M000087">sleep</a>
|
103
|
+
<a href="#M000082">statistics</a>
|
104
|
+
<a href="#M000092">take_snapshot</a>
|
105
|
+
<a href="#M000079">terminate</a>
|
128
106
|
</div>
|
129
107
|
</div>
|
130
108
|
|
131
109
|
</div>
|
132
110
|
|
111
|
+
|
133
112
|
<!-- if includes -->
|
134
113
|
|
135
114
|
<div id="section">
|
@@ -146,29 +125,24 @@ Class <a href="Session/ThreadSerializer.html" class="link">Wee::Session::ThreadS
|
|
146
125
|
|
147
126
|
|
148
127
|
|
128
|
+
|
149
129
|
<div id="attribute-list">
|
150
130
|
<h3 class="section-bar">Attributes</h3>
|
151
131
|
|
152
132
|
<div class="name-list">
|
153
133
|
<table>
|
154
|
-
|
155
134
|
<tr class="top-aligned-row context-row">
|
156
135
|
<td class="context-item-name">application</td>
|
157
|
-
|
158
136
|
<td class="context-item-value"> [RW] </td>
|
159
|
-
|
160
137
|
<td class="context-item-desc">
|
161
138
|
Points to the <a href="Application.html">Wee::Application</a> object this
|
162
139
|
session belongs to.
|
163
140
|
|
164
141
|
</td>
|
165
142
|
</tr>
|
166
|
-
|
167
143
|
<tr class="top-aligned-row context-row">
|
168
144
|
<td class="context-item-name">expire_after</td>
|
169
|
-
|
170
145
|
<td class="context-item-value"> [RW] </td>
|
171
|
-
|
172
146
|
<td class="context-item-desc">
|
173
147
|
Expire the session after this number of seconds of inactivity. If this
|
174
148
|
value is <tt>nil</tt>, the <a href="Session.html">Session</a> will never
|
@@ -180,23 +154,17 @@ Default: <tt>1800</tt> seconds (30 minutes)
|
|
180
154
|
</p>
|
181
155
|
</td>
|
182
156
|
</tr>
|
183
|
-
|
184
157
|
<tr class="top-aligned-row context-row">
|
185
158
|
<td class="context-item-name">id</td>
|
186
|
-
|
187
159
|
<td class="context-item-value"> [RW] </td>
|
188
|
-
|
189
160
|
<td class="context-item-desc">
|
190
161
|
The (application-wide) unique id of this session.
|
191
162
|
|
192
163
|
</td>
|
193
164
|
</tr>
|
194
|
-
|
195
165
|
<tr class="top-aligned-row context-row">
|
196
166
|
<td class="context-item-name">max_lifetime</td>
|
197
|
-
|
198
167
|
<td class="context-item-value"> [RW] </td>
|
199
|
-
|
200
168
|
<td class="context-item-desc">
|
201
169
|
The maximum lifetime of this session in seconds. A value of <tt>nil</tt>
|
202
170
|
means infinite lifetime.
|
@@ -206,12 +174,9 @@ Default: <tt>nil</tt> (infinite lifetime)
|
|
206
174
|
</p>
|
207
175
|
</td>
|
208
176
|
</tr>
|
209
|
-
|
210
177
|
<tr class="top-aligned-row context-row">
|
211
178
|
<td class="context-item-name">max_requests</td>
|
212
|
-
|
213
179
|
<td class="context-item-value"> [RW] </td>
|
214
|
-
|
215
180
|
<td class="context-item-desc">
|
216
181
|
The maximum number of requests this session is allowed to serve. A value of
|
217
182
|
<tt>nil</tt> means no limitation.
|
@@ -221,41 +186,33 @@ Default: <tt>nil</tt> (infinite number of requests)
|
|
221
186
|
</p>
|
222
187
|
</td>
|
223
188
|
</tr>
|
224
|
-
|
225
189
|
</table>
|
226
190
|
</div>
|
227
191
|
</div>
|
192
|
+
|
228
193
|
|
229
194
|
|
230
195
|
<!-- if method_list -->
|
231
|
-
|
232
196
|
<div id="methods">
|
233
|
-
|
234
197
|
<h3 class="section-bar">Public Class methods</h3>
|
235
198
|
|
236
|
-
|
237
|
-
|
238
|
-
<a name="M000025"></a>
|
199
|
+
<div id="method-M000083" class="method-detail">
|
200
|
+
<a name="M000083"></a>
|
239
201
|
|
240
202
|
<div class="method-heading">
|
241
|
-
|
242
|
-
<a href="#M000025" class="method-signature">
|
243
|
-
|
203
|
+
<a href="#M000083" class="method-signature">
|
244
204
|
<span class="method-name">current</span><span class="method-args">()</span>
|
245
|
-
|
246
205
|
</a>
|
247
|
-
|
248
206
|
</div>
|
249
|
-
|
207
|
+
|
250
208
|
<div class="method-description">
|
251
|
-
|
252
209
|
<p>
|
253
|
-
Returns the current session
|
210
|
+
Returns the <a href="Session.html#M000083">current</a> session
|
211
|
+
(thread-local).
|
254
212
|
</p>
|
255
|
-
|
256
213
|
<p><a class="source-toggle" href="#"
|
257
|
-
onclick="toggleCode('
|
258
|
-
<div class="method-source-code" id="
|
214
|
+
onclick="toggleCode('M000083-source');return false;">[Source]</a></p>
|
215
|
+
<div class="method-source-code" id="M000083-source">
|
259
216
|
<pre>
|
260
217
|
<span class="ruby-comment cmt"># File lib/wee/session.rb, line 159</span>
|
261
218
|
<span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">current</span>
|
@@ -263,33 +220,25 @@ Returns the current session (thread-local).
|
|
263
220
|
<span class="ruby-keyword kw">end</span>
|
264
221
|
</pre>
|
265
222
|
</div>
|
266
|
-
|
267
223
|
</div>
|
268
224
|
</div>
|
269
225
|
|
270
|
-
|
271
|
-
|
272
|
-
<a name="M000020"></a>
|
226
|
+
<div id="method-M000078" class="method-detail">
|
227
|
+
<a name="M000078"></a>
|
273
228
|
|
274
229
|
<div class="method-heading">
|
275
|
-
|
276
|
-
<a href="#M000020" class="method-signature">
|
277
|
-
|
230
|
+
<a href="#M000078" class="method-signature">
|
278
231
|
<span class="method-name">new</span><span class="method-args">(root_component, serializer=nil, page_cache_capacity=20)</span>
|
279
|
-
|
280
232
|
</a>
|
281
|
-
|
282
233
|
</div>
|
283
|
-
|
234
|
+
|
284
235
|
<div class="method-description">
|
285
|
-
|
286
236
|
<p>
|
287
|
-
Creates a new session.
|
237
|
+
Creates a <a href="Session.html#M000078">new</a> session.
|
288
238
|
</p>
|
289
|
-
|
290
239
|
<p><a class="source-toggle" href="#"
|
291
|
-
onclick="toggleCode('
|
292
|
-
<div class="method-source-code" id="
|
240
|
+
onclick="toggleCode('M000078-source');return false;">[Source]</a></p>
|
241
|
+
<div class="method-source-code" id="M000078-source">
|
293
242
|
<pre>
|
294
243
|
<span class="ruby-comment cmt"># File lib/wee/session.rb, line 95</span>
|
295
244
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">root_component</span>, <span class="ruby-identifier">serializer</span>=<span class="ruby-keyword kw">nil</span>, <span class="ruby-identifier">page_cache_capacity</span>=<span class="ruby-value">20</span>)
|
@@ -311,36 +260,27 @@ Creates a new session.
|
|
311
260
|
<span class="ruby-keyword kw">end</span>
|
312
261
|
</pre>
|
313
262
|
</div>
|
314
|
-
|
315
263
|
</div>
|
316
264
|
</div>
|
317
265
|
|
318
|
-
|
319
266
|
<h3 class="section-bar">Public Instance methods</h3>
|
320
267
|
|
321
|
-
|
322
|
-
|
323
|
-
<a name="M000022"></a>
|
268
|
+
<div id="method-M000080" class="method-detail">
|
269
|
+
<a name="M000080"></a>
|
324
270
|
|
325
271
|
<div class="method-heading">
|
326
|
-
|
327
|
-
<a href="#M000022" class="method-signature">
|
328
|
-
|
272
|
+
<a href="#M000080" class="method-signature">
|
329
273
|
<span class="method-name">alive?</span><span class="method-args">()</span>
|
330
|
-
|
331
274
|
</a>
|
332
|
-
|
333
275
|
</div>
|
334
|
-
|
276
|
+
|
335
277
|
<div class="method-description">
|
336
|
-
|
337
278
|
<p>
|
338
279
|
Queries whether the session is still alive.
|
339
280
|
</p>
|
340
|
-
|
341
281
|
<p><a class="source-toggle" href="#"
|
342
|
-
onclick="toggleCode('
|
343
|
-
<div class="method-source-code" id="
|
282
|
+
onclick="toggleCode('M000080-source');return false;">[Source]</a></p>
|
283
|
+
<div class="method-source-code" id="M000080-source">
|
344
284
|
<pre>
|
345
285
|
<span class="ruby-comment cmt"># File lib/wee/session.rb, line 126</span>
|
346
286
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">alive?</span>
|
@@ -353,33 +293,25 @@ Queries whether the session is still alive.
|
|
353
293
|
<span class="ruby-keyword kw">end</span>
|
354
294
|
</pre>
|
355
295
|
</div>
|
356
|
-
|
357
296
|
</div>
|
358
297
|
</div>
|
359
298
|
|
360
|
-
|
361
|
-
|
362
|
-
<a name="M000026"></a>
|
299
|
+
<div id="method-M000084" class="method-detail">
|
300
|
+
<a name="M000084"></a>
|
363
301
|
|
364
302
|
<div class="method-heading">
|
365
|
-
|
366
|
-
<a href="#M000026" class="method-signature">
|
367
|
-
|
303
|
+
<a href="#M000084" class="method-signature">
|
368
304
|
<span class="method-name">call</span><span class="method-args">(env)</span>
|
369
|
-
|
370
305
|
</a>
|
371
|
-
|
372
306
|
</div>
|
373
|
-
|
307
|
+
|
374
308
|
<div class="method-description">
|
375
|
-
|
376
309
|
<p>
|
377
310
|
Handles a web request.
|
378
311
|
</p>
|
379
|
-
|
380
312
|
<p><a class="source-toggle" href="#"
|
381
|
-
onclick="toggleCode('
|
382
|
-
<div class="method-source-code" id="
|
313
|
+
onclick="toggleCode('M000084-source');return false;">[Source]</a></p>
|
314
|
+
<div class="method-source-code" id="M000084-source">
|
383
315
|
<pre>
|
384
316
|
<span class="ruby-comment cmt"># File lib/wee/session.rb, line 166</span>
|
385
317
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">call</span>(<span class="ruby-identifier">env</span>)
|
@@ -404,33 +336,25 @@ Handles a web request.
|
|
404
336
|
<span class="ruby-keyword kw">end</span>
|
405
337
|
</pre>
|
406
338
|
</div>
|
407
|
-
|
408
339
|
</div>
|
409
340
|
</div>
|
410
341
|
|
411
|
-
|
412
|
-
|
413
|
-
<a name="M000023"></a>
|
342
|
+
<div id="method-M000081" class="method-detail">
|
343
|
+
<a name="M000081"></a>
|
414
344
|
|
415
345
|
<div class="method-heading">
|
416
|
-
|
417
|
-
<a href="#M000023" class="method-signature">
|
418
|
-
|
346
|
+
<a href="#M000081" class="method-signature">
|
419
347
|
<span class="method-name">dead?</span><span class="method-args">()</span>
|
420
|
-
|
421
348
|
</a>
|
422
|
-
|
423
349
|
</div>
|
424
|
-
|
350
|
+
|
425
351
|
<div class="method-description">
|
426
|
-
|
427
352
|
<p>
|
428
353
|
Queries whether the session is dead.
|
429
354
|
</p>
|
430
|
-
|
431
355
|
<p><a class="source-toggle" href="#"
|
432
|
-
onclick="toggleCode('
|
433
|
-
<div class="method-source-code" id="
|
356
|
+
onclick="toggleCode('M000081-source');return false;">[Source]</a></p>
|
357
|
+
<div class="method-source-code" id="M000081-source">
|
434
358
|
<pre>
|
435
359
|
<span class="ruby-comment cmt"># File lib/wee/session.rb, line 138</span>
|
436
360
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">dead?</span>
|
@@ -438,29 +362,22 @@ Queries whether the session is dead.
|
|
438
362
|
<span class="ruby-keyword kw">end</span>
|
439
363
|
</pre>
|
440
364
|
</div>
|
441
|
-
|
442
365
|
</div>
|
443
366
|
</div>
|
444
367
|
|
445
|
-
|
446
|
-
|
447
|
-
<a name="M000031"></a>
|
368
|
+
<div id="method-M000089" class="method-detail">
|
369
|
+
<a name="M000089"></a>
|
448
370
|
|
449
371
|
<div class="method-heading">
|
450
|
-
|
451
|
-
<a href="#M000031" class="method-signature">
|
452
|
-
|
372
|
+
<a href="#M000089" class="method-signature">
|
453
373
|
<span class="method-name">render_ajax_proc</span><span class="method-args">(block, component)</span>
|
454
|
-
|
455
374
|
</a>
|
456
|
-
|
457
375
|
</div>
|
458
|
-
|
376
|
+
|
459
377
|
<div class="method-description">
|
460
|
-
|
461
378
|
<p><a class="source-toggle" href="#"
|
462
|
-
onclick="toggleCode('
|
463
|
-
<div class="method-source-code" id="
|
379
|
+
onclick="toggleCode('M000089-source');return false;">[Source]</a></p>
|
380
|
+
<div class="method-source-code" id="M000089-source">
|
464
381
|
<pre>
|
465
382
|
<span class="ruby-comment cmt"># File lib/wee/session.rb, line 252</span>
|
466
383
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">render_ajax_proc</span>(<span class="ruby-identifier">block</span>, <span class="ruby-identifier">component</span>)
|
@@ -485,33 +402,25 @@ Queries whether the session is dead.
|
|
485
402
|
<span class="ruby-keyword kw">end</span>
|
486
403
|
</pre>
|
487
404
|
</div>
|
488
|
-
|
489
405
|
</div>
|
490
406
|
</div>
|
491
407
|
|
492
|
-
|
493
|
-
|
494
|
-
<a name="M000027"></a>
|
408
|
+
<div id="method-M000085" class="method-detail">
|
409
|
+
<a name="M000085"></a>
|
495
410
|
|
496
411
|
<div class="method-heading">
|
497
|
-
|
498
|
-
<a href="#M000027" class="method-signature">
|
499
|
-
|
412
|
+
<a href="#M000085" class="method-signature">
|
500
413
|
<span class="method-name">send_response</span><span class="method-args">(response)</span>
|
501
|
-
|
502
414
|
</a>
|
503
|
-
|
504
415
|
</div>
|
505
|
-
|
416
|
+
|
506
417
|
<div class="method-description">
|
507
|
-
|
508
418
|
<p>
|
509
419
|
Send a premature response
|
510
420
|
</p>
|
511
|
-
|
512
421
|
<p><a class="source-toggle" href="#"
|
513
|
-
onclick="toggleCode('
|
514
|
-
<div class="method-source-code" id="
|
422
|
+
onclick="toggleCode('M000085-source');return false;">[Source]</a></p>
|
423
|
+
<div class="method-source-code" id="M000085-source">
|
515
424
|
<pre>
|
516
425
|
<span class="ruby-comment cmt"># File lib/wee/session.rb, line 190</span>
|
517
426
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">send_response</span>(<span class="ruby-identifier">response</span>)
|
@@ -519,33 +428,25 @@ Send a premature response
|
|
519
428
|
<span class="ruby-keyword kw">end</span>
|
520
429
|
</pre>
|
521
430
|
</div>
|
522
|
-
|
523
431
|
</div>
|
524
432
|
</div>
|
525
433
|
|
526
|
-
|
527
|
-
|
528
|
-
<a name="M000024"></a>
|
434
|
+
<div id="method-M000082" class="method-detail">
|
435
|
+
<a name="M000082"></a>
|
529
436
|
|
530
437
|
<div class="method-heading">
|
531
|
-
|
532
|
-
<a href="#M000024" class="method-signature">
|
533
|
-
|
438
|
+
<a href="#M000082" class="method-signature">
|
534
439
|
<span class="method-name">statistics</span><span class="method-args">()</span>
|
535
|
-
|
536
440
|
</a>
|
537
|
-
|
538
441
|
</div>
|
539
|
-
|
442
|
+
|
540
443
|
<div class="method-description">
|
541
|
-
|
542
444
|
<p>
|
543
|
-
Returns some statistics
|
445
|
+
Returns some <a href="Session.html#M000082">statistics</a>
|
544
446
|
</p>
|
545
|
-
|
546
447
|
<p><a class="source-toggle" href="#"
|
547
|
-
onclick="toggleCode('
|
548
|
-
<div class="method-source-code" id="
|
448
|
+
onclick="toggleCode('M000082-source');return false;">[Source]</a></p>
|
449
|
+
<div class="method-source-code" id="M000082-source">
|
549
450
|
<pre>
|
550
451
|
<span class="ruby-comment cmt"># File lib/wee/session.rb, line 145</span>
|
551
452
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">statistics</span>
|
@@ -560,37 +461,30 @@ Returns some statistics
|
|
560
461
|
<span class="ruby-keyword kw">end</span>
|
561
462
|
</pre>
|
562
463
|
</div>
|
563
|
-
|
564
464
|
</div>
|
565
465
|
</div>
|
566
466
|
|
567
|
-
|
568
|
-
|
569
|
-
<a name="M000021"></a>
|
467
|
+
<div id="method-M000079" class="method-detail">
|
468
|
+
<a name="M000079"></a>
|
570
469
|
|
571
470
|
<div class="method-heading">
|
572
|
-
|
573
|
-
<a href="#M000021" class="method-signature">
|
574
|
-
|
471
|
+
<a href="#M000079" class="method-signature">
|
575
472
|
<span class="method-name">terminate</span><span class="method-args">()</span>
|
576
|
-
|
577
473
|
</a>
|
578
|
-
|
579
474
|
</div>
|
580
|
-
|
475
|
+
|
581
476
|
<div class="method-description">
|
582
|
-
|
583
477
|
<p>
|
584
478
|
Terminates the session.
|
585
479
|
</p>
|
586
480
|
<p>
|
587
|
-
This will usually not immediatly
|
481
|
+
This will usually not immediatly <a
|
482
|
+
href="Session.html#M000079">terminate</a> the session from running, but
|
588
483
|
further requests will not be answered.
|
589
484
|
</p>
|
590
|
-
|
591
485
|
<p><a class="source-toggle" href="#"
|
592
|
-
onclick="toggleCode('
|
593
|
-
<div class="method-source-code" id="
|
486
|
+
onclick="toggleCode('M000079-source');return false;">[Source]</a></p>
|
487
|
+
<div class="method-source-code" id="M000079-source">
|
594
488
|
<pre>
|
595
489
|
<span class="ruby-comment cmt"># File lib/wee/session.rb, line 119</span>
|
596
490
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">terminate</span>
|
@@ -598,32 +492,24 @@ further requests will not be answered.
|
|
598
492
|
<span class="ruby-keyword kw">end</span>
|
599
493
|
</pre>
|
600
494
|
</div>
|
601
|
-
|
602
495
|
</div>
|
603
496
|
</div>
|
604
497
|
|
605
|
-
|
606
498
|
<h3 class="section-bar">Protected Instance methods</h3>
|
607
499
|
|
608
|
-
|
609
|
-
|
610
|
-
<a name="M000033"></a>
|
500
|
+
<div id="method-M000091" class="method-detail">
|
501
|
+
<a name="M000091"></a>
|
611
502
|
|
612
503
|
<div class="method-heading">
|
613
|
-
|
614
|
-
<a href="#M000033" class="method-signature">
|
615
|
-
|
504
|
+
<a href="#M000091" class="method-signature">
|
616
505
|
<span class="method-name">action</span><span class="method-args">(request, page)</span>
|
617
|
-
|
618
506
|
</a>
|
619
|
-
|
620
507
|
</div>
|
621
|
-
|
508
|
+
|
622
509
|
<div class="method-description">
|
623
|
-
|
624
510
|
<p><a class="source-toggle" href="#"
|
625
|
-
onclick="toggleCode('
|
626
|
-
<div class="method-source-code" id="
|
511
|
+
onclick="toggleCode('M000091-source');return false;">[Source]</a></p>
|
512
|
+
<div class="method-source-code" id="M000091-source">
|
627
513
|
<pre>
|
628
514
|
<span class="ruby-comment cmt"># File lib/wee/session.rb, line 295</span>
|
629
515
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">action</span>(<span class="ruby-identifier">request</span>, <span class="ruby-identifier">page</span>)
|
@@ -662,69 +548,53 @@ further requests will not be answered.
|
|
662
548
|
<span class="ruby-keyword kw">end</span>
|
663
549
|
</pre>
|
664
550
|
</div>
|
665
|
-
|
666
551
|
</div>
|
667
552
|
</div>
|
668
553
|
|
669
|
-
|
670
|
-
|
671
|
-
<a name="M000028"></a>
|
554
|
+
<div id="method-M000086" class="method-detail">
|
555
|
+
<a name="M000086"></a>
|
672
556
|
|
673
557
|
<div class="method-heading">
|
674
|
-
|
675
|
-
<a href="#M000028" class="method-signature">
|
676
|
-
|
558
|
+
<a href="#M000086" class="method-signature">
|
677
559
|
<span class="method-name">awake</span><span class="method-args">()</span>
|
678
|
-
|
679
560
|
</a>
|
680
|
-
|
681
561
|
</div>
|
682
|
-
|
562
|
+
|
683
563
|
<div class="method-description">
|
684
|
-
|
685
564
|
<p>
|
686
565
|
Is called before <em>process_request</em> is invoked.
|
687
566
|
</p>
|
688
567
|
<p>
|
689
568
|
Can be used e.g. to setup a database connection.
|
690
569
|
</p>
|
691
|
-
|
692
570
|
<p><a class="source-toggle" href="#"
|
693
|
-
onclick="toggleCode('
|
694
|
-
<div class="method-source-code" id="
|
571
|
+
onclick="toggleCode('M000086-source');return false;">[Source]</a></p>
|
572
|
+
<div class="method-source-code" id="M000086-source">
|
695
573
|
<pre>
|
696
574
|
<span class="ruby-comment cmt"># File lib/wee/session.rb, line 201</span>
|
697
575
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">awake</span>
|
698
576
|
<span class="ruby-keyword kw">end</span>
|
699
577
|
</pre>
|
700
578
|
</div>
|
701
|
-
|
702
579
|
</div>
|
703
580
|
</div>
|
704
581
|
|
705
|
-
|
706
|
-
|
707
|
-
<a name="M000030"></a>
|
582
|
+
<div id="method-M000088" class="method-detail">
|
583
|
+
<a name="M000088"></a>
|
708
584
|
|
709
585
|
<div class="method-heading">
|
710
|
-
|
711
|
-
<a href="#M000030" class="method-signature">
|
712
|
-
|
586
|
+
<a href="#M000088" class="method-signature">
|
713
587
|
<span class="method-name">handle</span><span class="method-args">(env)</span>
|
714
|
-
|
715
588
|
</a>
|
716
|
-
|
717
589
|
</div>
|
718
|
-
|
590
|
+
|
719
591
|
<div class="method-description">
|
720
|
-
|
721
592
|
<p>
|
722
593
|
The main routine where the request is processed.
|
723
594
|
</p>
|
724
|
-
|
725
595
|
<p><a class="source-toggle" href="#"
|
726
|
-
onclick="toggleCode('
|
727
|
-
<div class="method-source-code" id="
|
596
|
+
onclick="toggleCode('M000088-source');return false;">[Source]</a></p>
|
597
|
+
<div class="method-source-code" id="M000088-source">
|
728
598
|
<pre>
|
729
599
|
<span class="ruby-comment cmt"># File lib/wee/session.rb, line 215</span>
|
730
600
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">handle</span>(<span class="ruby-identifier">env</span>)
|
@@ -765,29 +635,22 @@ The main routine where the request is processed.
|
|
765
635
|
<span class="ruby-keyword kw">end</span>
|
766
636
|
</pre>
|
767
637
|
</div>
|
768
|
-
|
769
638
|
</div>
|
770
639
|
</div>
|
771
640
|
|
772
|
-
|
773
|
-
|
774
|
-
<a name="M000032"></a>
|
641
|
+
<div id="method-M000090" class="method-detail">
|
642
|
+
<a name="M000090"></a>
|
775
643
|
|
776
644
|
<div class="method-heading">
|
777
|
-
|
778
|
-
<a href="#M000032" class="method-signature">
|
779
|
-
|
645
|
+
<a href="#M000090" class="method-signature">
|
780
646
|
<span class="method-name">render</span><span class="method-args">(request, page)</span>
|
781
|
-
|
782
647
|
</a>
|
783
|
-
|
784
648
|
</div>
|
785
|
-
|
649
|
+
|
786
650
|
<div class="method-description">
|
787
|
-
|
788
651
|
<p><a class="source-toggle" href="#"
|
789
|
-
onclick="toggleCode('
|
790
|
-
<div class="method-source-code" id="
|
652
|
+
onclick="toggleCode('M000090-source');return false;">[Source]</a></p>
|
653
|
+
<div class="method-source-code" id="M000090-source">
|
791
654
|
<pre>
|
792
655
|
<span class="ruby-comment cmt"># File lib/wee/session.rb, line 275</span>
|
793
656
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">render</span>(<span class="ruby-identifier">request</span>, <span class="ruby-identifier">page</span>)
|
@@ -811,94 +674,76 @@ The main routine where the request is processed.
|
|
811
674
|
<span class="ruby-keyword kw">end</span>
|
812
675
|
</pre>
|
813
676
|
</div>
|
814
|
-
|
815
677
|
</div>
|
816
678
|
</div>
|
817
679
|
|
818
|
-
|
819
|
-
|
820
|
-
<a name="M000029"></a>
|
680
|
+
<div id="method-M000087" class="method-detail">
|
681
|
+
<a name="M000087"></a>
|
821
682
|
|
822
683
|
<div class="method-heading">
|
823
|
-
|
824
|
-
<a href="#M000029" class="method-signature">
|
825
|
-
|
684
|
+
<a href="#M000087" class="method-signature">
|
826
685
|
<span class="method-name">sleep</span><span class="method-args">()</span>
|
827
|
-
|
828
686
|
</a>
|
829
|
-
|
830
687
|
</div>
|
831
|
-
|
688
|
+
|
832
689
|
<div class="method-description">
|
833
|
-
|
834
690
|
<p>
|
835
691
|
Is called after <em>process_request</em> is run.
|
836
692
|
</p>
|
837
693
|
<p>
|
838
694
|
Can be used e.g. to release a database connection.
|
839
695
|
</p>
|
840
|
-
|
841
696
|
<p><a class="source-toggle" href="#"
|
842
|
-
onclick="toggleCode('
|
843
|
-
<div class="method-source-code" id="
|
697
|
+
onclick="toggleCode('M000087-source');return false;">[Source]</a></p>
|
698
|
+
<div class="method-source-code" id="M000087-source">
|
844
699
|
<pre>
|
845
700
|
<span class="ruby-comment cmt"># File lib/wee/session.rb, line 209</span>
|
846
701
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">sleep</span>
|
847
702
|
<span class="ruby-keyword kw">end</span>
|
848
703
|
</pre>
|
849
704
|
</div>
|
850
|
-
|
851
705
|
</div>
|
852
706
|
</div>
|
853
707
|
|
854
|
-
|
855
|
-
|
856
|
-
<a name="M000034"></a>
|
708
|
+
<div id="method-M000092" class="method-detail">
|
709
|
+
<a name="M000092"></a>
|
857
710
|
|
858
711
|
<div class="method-heading">
|
859
|
-
|
860
|
-
<a href="#M000034" class="method-signature">
|
861
|
-
|
712
|
+
<a href="#M000092" class="method-signature">
|
862
713
|
<span class="method-name">take_snapshot</span><span class="method-args">()</span>
|
863
|
-
|
864
714
|
</a>
|
865
|
-
|
866
715
|
</div>
|
867
|
-
|
716
|
+
|
868
717
|
<div class="method-description">
|
869
|
-
|
870
718
|
<p>
|
871
|
-
This method takes a snapshot from the
|
872
|
-
|
719
|
+
This method takes a snapshot from the <a
|
720
|
+
href="Session.html#M000083">current</a> state of the root component and
|
721
|
+
returns it.
|
873
722
|
</p>
|
874
|
-
|
875
723
|
<p><a class="source-toggle" href="#"
|
876
|
-
onclick="toggleCode('
|
877
|
-
<div class="method-source-code" id="
|
724
|
+
onclick="toggleCode('M000092-source');return false;">[Source]</a></p>
|
725
|
+
<div class="method-source-code" id="M000092-source">
|
878
726
|
<pre>
|
879
727
|
<span class="ruby-comment cmt"># File lib/wee/session.rb, line 334</span>
|
880
728
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">take_snapshot</span>
|
881
|
-
<span class="ruby-ivar">@root_component</span>.<span class="ruby-identifier">decoration</span>.<span class="ruby-identifier">
|
882
|
-
<span class="ruby-keyword kw">return</span> <span class="ruby-identifier">
|
729
|
+
<span class="ruby-ivar">@root_component</span>.<span class="ruby-identifier">decoration</span>.<span class="ruby-identifier">state</span>(<span class="ruby-identifier">s</span> = <span class="ruby-constant">Wee</span><span class="ruby-operator">::</span><span class="ruby-constant">State</span>.<span class="ruby-identifier">new</span>)
|
730
|
+
<span class="ruby-keyword kw">return</span> <span class="ruby-identifier">s</span>.<span class="ruby-identifier">freeze</span>
|
883
731
|
<span class="ruby-keyword kw">end</span>
|
884
732
|
</pre>
|
885
733
|
</div>
|
886
|
-
|
887
734
|
</div>
|
888
735
|
</div>
|
889
736
|
|
890
737
|
|
891
|
-
|
892
738
|
</div>
|
893
739
|
|
894
740
|
|
895
|
-
|
896
|
-
|
897
741
|
</div>
|
898
742
|
|
743
|
+
|
899
744
|
<div id="validator-badges">
|
900
745
|
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
901
746
|
</div>
|
902
747
|
|
903
748
|
</body>
|
904
|
-
</html>
|
749
|
+
</html>
|