wee 0.5.0 → 0.6.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (157) hide show
  1. data/ChangeLog +132 -0
  2. data/INSTALL +13 -3
  3. data/README +3 -3
  4. data/Rakefile +5 -1
  5. data/bin/wee +100 -0
  6. data/doc/rdoc/classes/Array.html +12 -12
  7. data/doc/rdoc/classes/Cache/StorageCache.html +38 -38
  8. data/doc/rdoc/classes/Cache/Strategy/CapacityBounded.html +30 -30
  9. data/doc/rdoc/classes/Cache/Strategy/LFU.html +24 -24
  10. data/doc/rdoc/classes/Cache/Strategy/LRU.html +24 -24
  11. data/doc/rdoc/classes/Cache/Strategy/Unbounded.html +24 -24
  12. data/doc/rdoc/classes/Enumerable.html +6 -6
  13. data/doc/rdoc/classes/Main.html +265 -0
  14. data/doc/rdoc/classes/Object.html +12 -12
  15. data/doc/rdoc/classes/OgApplication.html +2 -2
  16. data/doc/rdoc/classes/OgScaffolder.html +444 -64
  17. data/doc/rdoc/classes/OgScaffolder/Editor.html +490 -0
  18. data/doc/rdoc/classes/OgSession.html +4 -4
  19. data/doc/rdoc/classes/Recipe.html +113 -0
  20. data/doc/rdoc/classes/String.html +12 -12
  21. data/doc/rdoc/classes/Struct.html +12 -12
  22. data/doc/rdoc/classes/Wee.html +10 -1
  23. data/doc/rdoc/classes/Wee/AnswerDecoration.html +9 -9
  24. data/doc/rdoc/classes/Wee/Application.html +48 -47
  25. data/doc/rdoc/classes/Wee/Brush.html +19 -23
  26. data/doc/rdoc/classes/Wee/Brush/AnchorTag.html +17 -14
  27. data/doc/rdoc/classes/Wee/Brush/FileUploadTag.html +20 -14
  28. data/doc/rdoc/classes/Wee/Brush/FormTag.html +25 -21
  29. data/doc/rdoc/classes/Wee/Brush/GenericEncodedTextBrush.html +12 -12
  30. data/doc/rdoc/classes/Wee/Brush/GenericSingleTagBrush.html +7 -7
  31. data/doc/rdoc/classes/Wee/Brush/GenericTagBrush.html +234 -100
  32. data/doc/rdoc/classes/Wee/Brush/GenericTextBrush.html +12 -12
  33. data/doc/rdoc/classes/Wee/Brush/ImageButtonTag.html +28 -22
  34. data/doc/rdoc/classes/Wee/Brush/ImageTag.html +23 -24
  35. data/doc/rdoc/classes/Wee/Brush/InputTag.html +14 -14
  36. data/doc/rdoc/classes/Wee/Brush/JavascriptTag.html +7 -7
  37. data/doc/rdoc/classes/Wee/Brush/Page.html +14 -14
  38. data/doc/rdoc/classes/Wee/Brush/SelectListTag.html +33 -57
  39. data/doc/rdoc/classes/Wee/Brush/SelectListTag/SelectListCallback.html +154 -0
  40. data/doc/rdoc/classes/Wee/Brush/SelectOptionTag.html +7 -7
  41. data/doc/rdoc/classes/Wee/Brush/SubmitButtonTag.html +20 -14
  42. data/doc/rdoc/classes/Wee/Brush/TableDataTag.html +14 -14
  43. data/doc/rdoc/classes/Wee/Brush/TableHeaderTag.html +7 -7
  44. data/doc/rdoc/classes/Wee/Brush/TableRowTag.html +42 -42
  45. data/doc/rdoc/classes/Wee/Brush/TableTag.html +7 -7
  46. data/doc/rdoc/classes/Wee/Brush/TextAreaTag.html +27 -21
  47. data/doc/rdoc/classes/Wee/Brush/TextInputTag.html +20 -14
  48. data/doc/rdoc/classes/Wee/CallbackRegistry.html +64 -36
  49. data/doc/rdoc/classes/Wee/CallbackStream.html +21 -21
  50. data/doc/rdoc/classes/Wee/Canvas.html +24 -24
  51. data/doc/rdoc/classes/Wee/Component.html +179 -151
  52. data/doc/rdoc/classes/Wee/Component/OnAnswer.html +12 -12
  53. data/doc/rdoc/classes/Wee/Decoration.html +42 -42
  54. data/doc/rdoc/classes/Wee/Delegate.html +27 -27
  55. data/doc/rdoc/classes/Wee/ErrorResponse.html +14 -14
  56. data/doc/rdoc/classes/Wee/FormDecoration.html +6 -6
  57. data/doc/rdoc/classes/Wee/GenericResponse.html +7 -7
  58. data/doc/rdoc/classes/Wee/HtmlCanvas.html +326 -219
  59. data/doc/rdoc/classes/Wee/HtmlWriter.html +40 -40
  60. data/doc/rdoc/classes/Wee/LiteralMethodCallback.html +19 -19
  61. data/doc/rdoc/classes/Wee/Md5IdGenerator.html +181 -0
  62. data/doc/rdoc/classes/Wee/MessageBox.html +12 -12
  63. data/doc/rdoc/classes/Wee/PageDecoration.html +18 -18
  64. data/doc/rdoc/classes/Wee/PagelessApplication.html +152 -0
  65. data/doc/rdoc/classes/Wee/PagelessRequest.html +177 -0
  66. data/doc/rdoc/classes/Wee/PagelessSession.html +320 -0
  67. data/doc/rdoc/classes/Wee/Presenter.html +145 -89
  68. data/doc/rdoc/classes/Wee/RedirectResponse.html +7 -7
  69. data/doc/rdoc/classes/Wee/RefreshResponse.html +7 -7
  70. data/doc/rdoc/classes/Wee/Request.html +116 -50
  71. data/doc/rdoc/classes/Wee/RequestHandler.html +31 -31
  72. data/doc/rdoc/classes/Wee/Response.html +76 -28
  73. data/doc/rdoc/classes/Wee/Session.html +129 -506
  74. data/doc/rdoc/classes/Wee/SimpleIdGenerator.html +22 -40
  75. data/doc/rdoc/classes/Wee/Snapshot.html +19 -19
  76. data/doc/rdoc/classes/Wee/Utils.html +70 -17
  77. data/doc/rdoc/classes/Wee/Utils/LRUCache.html +6 -6
  78. data/doc/rdoc/classes/Wee/ValueHolder.html +18 -18
  79. data/doc/rdoc/classes/Wee/WEBrickAdaptor.html +82 -49
  80. data/doc/rdoc/classes/Wee/WrapperDecoration.html +6 -6
  81. data/doc/rdoc/created.rid +1 -1
  82. data/doc/rdoc/files/INSTALL.html +17 -5
  83. data/doc/rdoc/files/README.html +9 -11
  84. data/doc/rdoc/files/lib/wee/adaptors/webrick_rb.html +1 -1
  85. data/doc/rdoc/files/lib/wee/application_rb.html +1 -1
  86. data/doc/rdoc/files/lib/wee/components/page_decoration_rb.html +1 -1
  87. data/doc/rdoc/files/lib/wee/continuation/session_rb.html +1 -3
  88. data/doc/rdoc/files/lib/wee/core/callback_rb.html +1 -1
  89. data/doc/rdoc/files/lib/wee/core/component_rb.html +1 -1
  90. data/doc/rdoc/files/lib/wee/core_rb.html +3 -3
  91. data/doc/rdoc/files/lib/wee/databases/og/application_rb.html +101 -0
  92. data/doc/rdoc/files/lib/wee/databases/og/old_scaffolder_rb.html +101 -0
  93. data/doc/rdoc/files/lib/wee/databases/og/scaffolder_rb.html +108 -0
  94. data/doc/rdoc/files/lib/wee/databases/og/session_rb.html +101 -0
  95. data/doc/rdoc/files/lib/wee/databases/og_rb.html +4 -1
  96. data/doc/rdoc/files/lib/wee/idgen/md5_rb.html +115 -0
  97. data/doc/rdoc/files/lib/wee/idgen/simple_rb.html +107 -0
  98. data/doc/rdoc/files/lib/wee/pageless/application_rb.html +101 -0
  99. data/doc/rdoc/files/lib/wee/pageless/request_rb.html +101 -0
  100. data/doc/rdoc/files/lib/wee/pageless/session_rb.html +108 -0
  101. data/doc/rdoc/files/lib/wee/pageless_rb.html +110 -0
  102. data/doc/rdoc/files/lib/wee/renderer/html/brushes_rb.html +1 -1
  103. data/doc/rdoc/files/lib/wee/renderer/html/canvas_rb.html +8 -1
  104. data/doc/rdoc/files/lib/wee/request_rb.html +1 -1
  105. data/doc/rdoc/files/lib/wee/response_rb.html +1 -1
  106. data/doc/rdoc/files/lib/wee/session_rb.html +1 -1
  107. data/doc/rdoc/files/lib/wee/skeleton/og/components/main_rb.html +101 -0
  108. data/doc/rdoc/files/lib/wee/skeleton/og/conf/db_rb.html +114 -0
  109. data/doc/rdoc/files/lib/wee/skeleton/og/models/recipe_rb.html +101 -0
  110. data/doc/rdoc/files/lib/wee/skeleton/og/run_rb.html +115 -0
  111. data/doc/rdoc/files/lib/wee/skeleton/simple/components/main_rb.html +101 -0
  112. data/doc/rdoc/files/lib/wee/skeleton/simple/run_rb.html +111 -0
  113. data/doc/rdoc/files/lib/wee/template_rb.html +101 -0
  114. data/doc/rdoc/files/lib/wee/utils/autoreload_rb.html +1 -1
  115. data/doc/rdoc/files/lib/wee/utils/helper_rb.html +1 -1
  116. data/doc/rdoc/files/lib/wee_rb.html +4 -2
  117. data/doc/rdoc/fr_class_index.html +8 -4
  118. data/doc/rdoc/fr_file_index.html +17 -1
  119. data/doc/rdoc/fr_method_index.html +312 -267
  120. data/examples/live-update.rb +1 -1
  121. data/install.rb +14 -0
  122. data/lib/wee.rb +6 -2
  123. data/lib/wee/adaptors/webrick.rb +17 -5
  124. data/lib/wee/application.rb +2 -1
  125. data/lib/wee/continuation/session.rb +1 -146
  126. data/lib/wee/core/callback.rb +11 -5
  127. data/lib/wee/core/component.rb +14 -10
  128. data/lib/wee/databases/og.rb +3 -113
  129. data/lib/wee/databases/og/application.rb +3 -0
  130. data/lib/wee/databases/og/old_scaffolder.rb +98 -0
  131. data/lib/wee/databases/og/scaffolder.rb +174 -0
  132. data/lib/wee/databases/og/session.rb +9 -0
  133. data/lib/wee/idgen/md5.rb +21 -0
  134. data/lib/wee/{idgen.rb → idgen/simple.rb} +2 -4
  135. data/lib/wee/pageless.rb +3 -0
  136. data/lib/wee/pageless/application.rb +9 -0
  137. data/lib/wee/pageless/request.rb +15 -0
  138. data/lib/wee/pageless/session.rb +89 -0
  139. data/lib/wee/renderer/html/brushes.rb +100 -115
  140. data/lib/wee/renderer/html/canvas.rb +32 -2
  141. data/lib/wee/request.rb +36 -24
  142. data/lib/wee/response.rb +8 -1
  143. data/lib/wee/session.rb +13 -7
  144. data/lib/wee/skeleton/og/README +38 -0
  145. data/lib/wee/skeleton/og/components/main.rb +16 -0
  146. data/lib/wee/skeleton/og/conf/db.rb +8 -0
  147. data/lib/wee/skeleton/og/models/recipe.rb +5 -0
  148. data/lib/wee/skeleton/og/run.rb +23 -0
  149. data/lib/wee/skeleton/simple/README +32 -0
  150. data/lib/wee/skeleton/simple/components/main.rb +25 -0
  151. data/lib/wee/skeleton/simple/run.rb +12 -0
  152. data/lib/wee/template.rb +28 -0
  153. data/lib/wee/utils/autoreload.rb +29 -0
  154. data/lib/wee/utils/helper.rb +9 -5
  155. data/test/test_request.rb +4 -3
  156. data/wee.gemspec +3 -1
  157. metadata +91 -22
@@ -88,10 +88,12 @@
88
88
  <h3 class="section-bar">Methods</h3>
89
89
 
90
90
  <div class="name-list">
91
- <a href="#M000191">&lt;&lt;</a>&nbsp;&nbsp;
92
- <a href="#M000189">content_type</a>&nbsp;&nbsp;
93
- <a href="#M000190">content_type=</a>&nbsp;&nbsp;
94
- <a href="#M000188">new</a>&nbsp;&nbsp;
91
+ <a href="#M000230">&lt;&lt;</a>&nbsp;&nbsp;
92
+ <a href="#M000228">content_type</a>&nbsp;&nbsp;
93
+ <a href="#M000229">content_type=</a>&nbsp;&nbsp;
94
+ <a href="#M000226">cookies</a>&nbsp;&nbsp;
95
+ <a href="#M000225">cookies?</a>&nbsp;&nbsp;
96
+ <a href="#M000227">new</a>&nbsp;&nbsp;
95
97
  </div>
96
98
  </div>
97
99
 
@@ -149,21 +151,21 @@
149
151
  <div id="methods">
150
152
  <h3 class="section-bar">Public Class methods</h3>
151
153
 
152
- <div id="method-M000188" class="method-detail">
153
- <a name="M000188"></a>
154
+ <div id="method-M000227" class="method-detail">
155
+ <a name="M000227"></a>
154
156
 
155
157
  <div class="method-heading">
156
- <a href="#M000188" class="method-signature">
158
+ <a href="#M000227" class="method-signature">
157
159
  <span class="method-name">new</span><span class="method-args">(mime_type = 'text/html', content='')</span>
158
160
  </a>
159
161
  </div>
160
162
 
161
163
  <div class="method-description">
162
164
  <p><a class="source-toggle" href="#"
163
- onclick="toggleCode('M000188-source');return false;">[Source]</a></p>
164
- <div class="method-source-code" id="M000188-source">
165
+ onclick="toggleCode('M000227-source');return false;">[Source]</a></p>
166
+ <div class="method-source-code" id="M000227-source">
165
167
  <pre>
166
- <span class="ruby-comment cmt"># File lib/wee/response.rb, line 9</span>
168
+ <span class="ruby-comment cmt"># File lib/wee/response.rb, line 17</span>
167
169
  <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">mime_type</span> = <span class="ruby-value str">'text/html'</span>, <span class="ruby-identifier">content</span>=<span class="ruby-value str">''</span>)
168
170
  <span class="ruby-ivar">@status</span> = <span class="ruby-value">200</span>
169
171
  <span class="ruby-ivar">@header</span> = <span class="ruby-constant">DEFAULT_HEADER</span>.<span class="ruby-identifier">dup</span>
@@ -176,21 +178,21 @@
176
178
 
177
179
  <h3 class="section-bar">Public Instance methods</h3>
178
180
 
179
- <div id="method-M000191" class="method-detail">
180
- <a name="M000191"></a>
181
+ <div id="method-M000230" class="method-detail">
182
+ <a name="M000230"></a>
181
183
 
182
184
  <div class="method-heading">
183
- <a href="#M000191" class="method-signature">
185
+ <a href="#M000230" class="method-signature">
184
186
  <span class="method-name">&lt;&lt;</span><span class="method-args">(str)</span>
185
187
  </a>
186
188
  </div>
187
189
 
188
190
  <div class="method-description">
189
191
  <p><a class="source-toggle" href="#"
190
- onclick="toggleCode('M000191-source');return false;">[Source]</a></p>
191
- <div class="method-source-code" id="M000191-source">
192
+ onclick="toggleCode('M000230-source');return false;">[Source]</a></p>
193
+ <div class="method-source-code" id="M000230-source">
192
194
  <pre>
193
- <span class="ruby-comment cmt"># File lib/wee/response.rb, line 23</span>
195
+ <span class="ruby-comment cmt"># File lib/wee/response.rb, line 31</span>
194
196
  <span class="ruby-keyword kw">def</span> <span class="ruby-operator">&lt;&lt;</span>(<span class="ruby-identifier">str</span>)
195
197
  <span class="ruby-ivar">@content</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-identifier">str</span>
196
198
  <span class="ruby-keyword kw">end</span>
@@ -199,21 +201,21 @@
199
201
  </div>
200
202
  </div>
201
203
 
202
- <div id="method-M000189" class="method-detail">
203
- <a name="M000189"></a>
204
+ <div id="method-M000228" class="method-detail">
205
+ <a name="M000228"></a>
204
206
 
205
207
  <div class="method-heading">
206
- <a href="#M000189" class="method-signature">
208
+ <a href="#M000228" class="method-signature">
207
209
  <span class="method-name">content_type</span><span class="method-args">()</span>
208
210
  </a>
209
211
  </div>
210
212
 
211
213
  <div class="method-description">
212
214
  <p><a class="source-toggle" href="#"
213
- onclick="toggleCode('M000189-source');return false;">[Source]</a></p>
214
- <div class="method-source-code" id="M000189-source">
215
+ onclick="toggleCode('M000228-source');return false;">[Source]</a></p>
216
+ <div class="method-source-code" id="M000228-source">
215
217
  <pre>
216
- <span class="ruby-comment cmt"># File lib/wee/response.rb, line 15</span>
218
+ <span class="ruby-comment cmt"># File lib/wee/response.rb, line 23</span>
217
219
  <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">content_type</span>
218
220
  <span class="ruby-ivar">@header</span>[<span class="ruby-value str">'Content-Type'</span>]
219
221
  <span class="ruby-keyword kw">end</span>
@@ -222,21 +224,21 @@
222
224
  </div>
223
225
  </div>
224
226
 
225
- <div id="method-M000190" class="method-detail">
226
- <a name="M000190"></a>
227
+ <div id="method-M000229" class="method-detail">
228
+ <a name="M000229"></a>
227
229
 
228
230
  <div class="method-heading">
229
- <a href="#M000190" class="method-signature">
231
+ <a href="#M000229" class="method-signature">
230
232
  <span class="method-name">content_type=</span><span class="method-args">(mime_type)</span>
231
233
  </a>
232
234
  </div>
233
235
 
234
236
  <div class="method-description">
235
237
  <p><a class="source-toggle" href="#"
236
- onclick="toggleCode('M000190-source');return false;">[Source]</a></p>
237
- <div class="method-source-code" id="M000190-source">
238
+ onclick="toggleCode('M000229-source');return false;">[Source]</a></p>
239
+ <div class="method-source-code" id="M000229-source">
238
240
  <pre>
239
- <span class="ruby-comment cmt"># File lib/wee/response.rb, line 19</span>
241
+ <span class="ruby-comment cmt"># File lib/wee/response.rb, line 27</span>
240
242
  <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">content_type=</span>(<span class="ruby-identifier">mime_type</span>)
241
243
  <span class="ruby-ivar">@header</span>[<span class="ruby-value str">'Content-Type'</span>] = <span class="ruby-identifier">mime_type</span>
242
244
  <span class="ruby-keyword kw">end</span>
@@ -245,6 +247,52 @@
245
247
  </div>
246
248
  </div>
247
249
 
250
+ <div id="method-M000226" class="method-detail">
251
+ <a name="M000226"></a>
252
+
253
+ <div class="method-heading">
254
+ <a href="#M000226" class="method-signature">
255
+ <span class="method-name">cookies</span><span class="method-args">()</span>
256
+ </a>
257
+ </div>
258
+
259
+ <div class="method-description">
260
+ <p><a class="source-toggle" href="#"
261
+ onclick="toggleCode('M000226-source');return false;">[Source]</a></p>
262
+ <div class="method-source-code" id="M000226-source">
263
+ <pre>
264
+ <span class="ruby-comment cmt"># File lib/wee/response.rb, line 13</span>
265
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">cookies</span>
266
+ <span class="ruby-ivar">@cookies</span> <span class="ruby-operator">||=</span> []
267
+ <span class="ruby-keyword kw">end</span>
268
+ </pre>
269
+ </div>
270
+ </div>
271
+ </div>
272
+
273
+ <div id="method-M000225" class="method-detail">
274
+ <a name="M000225"></a>
275
+
276
+ <div class="method-heading">
277
+ <a href="#M000225" class="method-signature">
278
+ <span class="method-name">cookies?</span><span class="method-args">()</span>
279
+ </a>
280
+ </div>
281
+
282
+ <div class="method-description">
283
+ <p><a class="source-toggle" href="#"
284
+ onclick="toggleCode('M000225-source');return false;">[Source]</a></p>
285
+ <div class="method-source-code" id="M000225-source">
286
+ <pre>
287
+ <span class="ruby-comment cmt"># File lib/wee/response.rb, line 9</span>
288
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">cookies?</span>
289
+ <span class="ruby-ivar">@cookies</span>
290
+ <span class="ruby-keyword kw">end</span>
291
+ </pre>
292
+ </div>
293
+ </div>
294
+ </div>
295
+
248
296
 
249
297
  </div>
250
298
 
@@ -90,7 +90,6 @@
90
90
  <h3 class="section-bar">Contents</h3>
91
91
  <ul>
92
92
  <li><a href="#SEC00016">Properties</a></li>
93
- <li><a href="#SEC00118">Properties</a></li>
94
93
  </ul>
95
94
  </div>
96
95
 
@@ -98,33 +97,23 @@
98
97
  <h3 class="section-bar">Methods</h3>
99
98
 
100
99
  <div class="name-list">
101
- <a href="#M000153">awake</a>&nbsp;&nbsp;
102
- <a href="#M000167">awake</a>&nbsp;&nbsp;
103
- <a href="#M000152">create_page</a>&nbsp;&nbsp;
104
- <a href="#M000166">create_page</a>&nbsp;&nbsp;
105
- <a href="#M000148">current</a>&nbsp;&nbsp;
106
- <a href="#M000161">current</a>&nbsp;&nbsp;
107
- <a href="#M000170">current_context</a>&nbsp;&nbsp;
108
- <a href="#M000156">current_context</a>&nbsp;&nbsp;
109
- <a href="#M000171">current_page</a>&nbsp;&nbsp;
110
- <a href="#M000157">current_page</a>&nbsp;&nbsp;
111
- <a href="#M000172">get_property</a>&nbsp;&nbsp;
112
- <a href="#M000158">get_property</a>&nbsp;&nbsp;
113
- <a href="#M000159">handle_new_page_view</a>&nbsp;&nbsp;
114
- <a href="#M000173">handle_new_page_view</a>&nbsp;&nbsp;
115
- <a href="#M000151">handle_request</a>&nbsp;&nbsp;
116
- <a href="#M000164">handle_request</a>&nbsp;&nbsp;
117
- <a href="#M000149">new</a>&nbsp;&nbsp;
118
- <a href="#M000162">new</a>&nbsp;&nbsp;
119
- <a href="#M000155">process_request</a>&nbsp;&nbsp;
120
- <a href="#M000169">process_request</a>&nbsp;&nbsp;
121
- <a href="#M000160">respond</a>&nbsp;&nbsp;
122
- <a href="#M000174">respond</a>&nbsp;&nbsp;
123
- <a href="#M000168">sleep</a>&nbsp;&nbsp;
124
- <a href="#M000154">sleep</a>&nbsp;&nbsp;
125
- <a href="#M000150">snapshot</a>&nbsp;&nbsp;
126
- <a href="#M000163">snapshot</a>&nbsp;&nbsp;
127
- <a href="#M000165">start_request_response_loop</a>&nbsp;&nbsp;
100
+ <a href="#M000200">awake</a>&nbsp;&nbsp;
101
+ <a href="#M000199">create_page</a>&nbsp;&nbsp;
102
+ <a href="#M000195">current</a>&nbsp;&nbsp;
103
+ <a href="#M000204">current_callbacks</a>&nbsp;&nbsp;
104
+ <a href="#M000203">current_context</a>&nbsp;&nbsp;
105
+ <a href="#M000205">get_property</a>&nbsp;&nbsp;
106
+ <a href="#M000206">handle_new_page_view</a>&nbsp;&nbsp;
107
+ <a href="#M000198">handle_request</a>&nbsp;&nbsp;
108
+ <a href="#M000210">handle_request</a>&nbsp;&nbsp;
109
+ <a href="#M000196">new</a>&nbsp;&nbsp;
110
+ <a href="#M000209">new</a>&nbsp;&nbsp;
111
+ <a href="#M000202">process_request</a>&nbsp;&nbsp;
112
+ <a href="#M000208">respond</a>&nbsp;&nbsp;
113
+ <a href="#M000207">set_response</a>&nbsp;&nbsp;
114
+ <a href="#M000201">sleep</a>&nbsp;&nbsp;
115
+ <a href="#M000197">snapshot</a>&nbsp;&nbsp;
116
+ <a href="#M000211">start_request_response_loop</a>&nbsp;&nbsp;
128
117
  </div>
129
118
  </div>
130
119
 
@@ -164,19 +153,19 @@
164
153
  <div id="methods">
165
154
  <h3 class="section-bar">Public Class methods</h3>
166
155
 
167
- <div id="method-M000148" class="method-detail">
168
- <a name="M000148"></a>
156
+ <div id="method-M000195" class="method-detail">
157
+ <a name="M000195"></a>
169
158
 
170
159
  <div class="method-heading">
171
- <a href="#M000148" class="method-signature">
160
+ <a href="#M000195" class="method-signature">
172
161
  <span class="method-name">current</span><span class="method-args">()</span>
173
162
  </a>
174
163
  </div>
175
164
 
176
165
  <div class="method-description">
177
166
  <p><a class="source-toggle" href="#"
178
- onclick="toggleCode('M000148-source');return false;">[Source]</a></p>
179
- <div class="method-source-code" id="M000148-source">
167
+ onclick="toggleCode('M000195-source');return false;">[Source]</a></p>
168
+ <div class="method-source-code" id="M000195-source">
180
169
  <pre>
181
170
  <span class="ruby-comment cmt"># File lib/wee/session.rb, line 7</span>
182
171
  <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">current</span>
@@ -189,19 +178,19 @@
189
178
  </div>
190
179
  </div>
191
180
 
192
- <div id="method-M000149" class="method-detail">
193
- <a name="M000149"></a>
181
+ <div id="method-M000196" class="method-detail">
182
+ <a name="M000196"></a>
194
183
 
195
184
  <div class="method-heading">
196
- <a href="#M000149" class="method-signature">
185
+ <a href="#M000196" class="method-signature">
197
186
  <span class="method-name">new</span><span class="method-args">(&amp;block)</span>
198
187
  </a>
199
188
  </div>
200
189
 
201
190
  <div class="method-description">
202
191
  <p><a class="source-toggle" href="#"
203
- onclick="toggleCode('M000149-source');return false;">[Source]</a></p>
204
- <div class="method-source-code" id="M000149-source">
192
+ onclick="toggleCode('M000196-source');return false;">[Source]</a></p>
193
+ <div class="method-source-code" id="M000196-source">
205
194
  <pre>
206
195
  <span class="ruby-comment cmt"># File lib/wee/session.rb, line 13</span>
207
196
  <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-operator">&amp;</span><span class="ruby-identifier">block</span>)
@@ -230,23 +219,23 @@
230
219
 
231
220
  <h3 class="section-bar">Public Instance methods</h3>
232
221
 
233
- <div id="method-M000153" class="method-detail">
234
- <a name="M000153"></a>
222
+ <div id="method-M000200" class="method-detail">
223
+ <a name="M000200"></a>
235
224
 
236
225
  <div class="method-heading">
237
- <a href="#M000153" class="method-signature">
226
+ <a href="#M000200" class="method-signature">
238
227
  <span class="method-name">awake</span><span class="method-args">()</span>
239
228
  </a>
240
229
  </div>
241
230
 
242
231
  <div class="method-description">
243
232
  <p>
244
- Is called before <a href="Session.html#M000155">process_request</a> is
233
+ Is called before <a href="Session.html#M000202">process_request</a> is
245
234
  invoked Can be used to setup e.g. a database connection.
246
235
  </p>
247
236
  <p><a class="source-toggle" href="#"
248
- onclick="toggleCode('M000153-source');return false;">[Source]</a></p>
249
- <div class="method-source-code" id="M000153-source">
237
+ onclick="toggleCode('M000200-source');return false;">[Source]</a></p>
238
+ <div class="method-source-code" id="M000200-source">
250
239
  <pre>
251
240
  <span class="ruby-comment cmt"># File lib/wee/session.rb, line 66</span>
252
241
  <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">awake</span>
@@ -256,19 +245,19 @@ invoked Can be used to setup e.g. a database connection.
256
245
  </div>
257
246
  </div>
258
247
 
259
- <div id="method-M000152" class="method-detail">
260
- <a name="M000152"></a>
248
+ <div id="method-M000199" class="method-detail">
249
+ <a name="M000199"></a>
261
250
 
262
251
  <div class="method-heading">
263
- <a href="#M000152" class="method-signature">
252
+ <a href="#M000199" class="method-signature">
264
253
  <span class="method-name">create_page</span><span class="method-args">(snapshot)</span>
265
254
  </a>
266
255
  </div>
267
256
 
268
257
  <div class="method-description">
269
258
  <p><a class="source-toggle" href="#"
270
- onclick="toggleCode('M000152-source');return false;">[Source]</a></p>
271
- <div class="method-source-code" id="M000152-source">
259
+ onclick="toggleCode('M000199-source');return false;">[Source]</a></p>
260
+ <div class="method-source-code" id="M000199-source">
272
261
  <pre>
273
262
  <span class="ruby-comment cmt"># File lib/wee/session.rb, line 59</span>
274
263
  <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">create_page</span>(<span class="ruby-identifier">snapshot</span>)
@@ -280,57 +269,57 @@ invoked Can be used to setup e.g. a database connection.
280
269
  </div>
281
270
  </div>
282
271
 
283
- <div id="method-M000156" class="method-detail">
284
- <a name="M000156"></a>
272
+ <div id="method-M000204" class="method-detail">
273
+ <a name="M000204"></a>
285
274
 
286
275
  <div class="method-heading">
287
- <a href="#M000156" class="method-signature">
288
- <span class="method-name">current_context</span><span class="method-args">()</span>
276
+ <a href="#M000204" class="method-signature">
277
+ <span class="method-name">current_callbacks</span><span class="method-args">()</span>
289
278
  </a>
290
279
  </div>
291
280
 
292
281
  <div class="method-description">
293
282
  <p><a class="source-toggle" href="#"
294
- onclick="toggleCode('M000156-source');return false;">[Source]</a></p>
295
- <div class="method-source-code" id="M000156-source">
283
+ onclick="toggleCode('M000204-source');return false;">[Source]</a></p>
284
+ <div class="method-source-code" id="M000204-source">
296
285
  <pre>
297
- <span class="ruby-comment cmt"># File lib/wee/session.rb, line 148</span>
298
- <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">current_context</span>
299
- <span class="ruby-ivar">@context</span>
286
+ <span class="ruby-comment cmt"># File lib/wee/session.rb, line 153</span>
287
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">current_callbacks</span>
288
+ <span class="ruby-ivar">@page</span>.<span class="ruby-identifier">callbacks</span>
300
289
  <span class="ruby-keyword kw">end</span>
301
290
  </pre>
302
291
  </div>
303
292
  </div>
304
293
  </div>
305
294
 
306
- <div id="method-M000157" class="method-detail">
307
- <a name="M000157"></a>
295
+ <div id="method-M000203" class="method-detail">
296
+ <a name="M000203"></a>
308
297
 
309
298
  <div class="method-heading">
310
- <a href="#M000157" class="method-signature">
311
- <span class="method-name">current_page</span><span class="method-args">()</span>
299
+ <a href="#M000203" class="method-signature">
300
+ <span class="method-name">current_context</span><span class="method-args">()</span>
312
301
  </a>
313
302
  </div>
314
303
 
315
304
  <div class="method-description">
316
305
  <p><a class="source-toggle" href="#"
317
- onclick="toggleCode('M000157-source');return false;">[Source]</a></p>
318
- <div class="method-source-code" id="M000157-source">
306
+ onclick="toggleCode('M000203-source');return false;">[Source]</a></p>
307
+ <div class="method-source-code" id="M000203-source">
319
308
  <pre>
320
- <span class="ruby-comment cmt"># File lib/wee/session.rb, line 152</span>
321
- <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">current_page</span>
322
- <span class="ruby-ivar">@page</span>
309
+ <span class="ruby-comment cmt"># File lib/wee/session.rb, line 149</span>
310
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">current_context</span>
311
+ <span class="ruby-ivar">@context</span>
323
312
  <span class="ruby-keyword kw">end</span>
324
313
  </pre>
325
314
  </div>
326
315
  </div>
327
316
  </div>
328
317
 
329
- <div id="method-M000151" class="method-detail">
330
- <a name="M000151"></a>
318
+ <div id="method-M000198" class="method-detail">
319
+ <a name="M000198"></a>
331
320
 
332
321
  <div class="method-heading">
333
- <a href="#M000151" class="method-signature">
322
+ <a href="#M000198" class="method-signature">
334
323
  <span class="method-name">handle_request</span><span class="method-args">(context)</span>
335
324
  </a>
336
325
  </div>
@@ -340,8 +329,8 @@ invoked Can be used to setup e.g. a database connection.
340
329
  called by application to send the session a request
341
330
  </p>
342
331
  <p><a class="source-toggle" href="#"
343
- onclick="toggleCode('M000151-source');return false;">[Source]</a></p>
344
- <div class="method-source-code" id="M000151-source">
332
+ onclick="toggleCode('M000198-source');return false;">[Source]</a></p>
333
+ <div class="method-source-code" id="M000198-source">
345
334
  <pre>
346
335
  <span class="ruby-comment cmt"># File lib/wee/session.rb, line 40</span>
347
336
  <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">handle_request</span>(<span class="ruby-identifier">context</span>)
@@ -354,7 +343,7 @@ called by application to send the session a request
354
343
  <span class="ruby-identifier">process_request</span>
355
344
  <span class="ruby-identifier">sleep</span>
356
345
  <span class="ruby-keyword kw">rescue</span> <span class="ruby-constant">Exception</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">exn</span>
357
- <span class="ruby-identifier">context</span>.<span class="ruby-identifier">response</span> = <span class="ruby-constant">Wee</span><span class="ruby-operator">::</span><span class="ruby-constant">ErrorResponse</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">exn</span>)
346
+ <span class="ruby-identifier">set_response</span>(<span class="ruby-identifier">context</span>, <span class="ruby-constant">Wee</span><span class="ruby-operator">::</span><span class="ruby-constant">ErrorResponse</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">exn</span>))
358
347
  <span class="ruby-keyword kw">ensure</span>
359
348
  <span class="ruby-constant">Thread</span>.<span class="ruby-identifier">current</span>[<span class="ruby-identifier">:wee_session</span>] = <span class="ruby-keyword kw">nil</span>
360
349
  <span class="ruby-ivar">@context</span> = <span class="ruby-keyword kw">nil</span>
@@ -367,19 +356,19 @@ called by application to send the session a request
367
356
  </div>
368
357
  </div>
369
358
 
370
- <div id="method-M000155" class="method-detail">
371
- <a name="M000155"></a>
359
+ <div id="method-M000202" class="method-detail">
360
+ <a name="M000202"></a>
372
361
 
373
362
  <div class="method-heading">
374
- <a href="#M000155" class="method-signature">
363
+ <a href="#M000202" class="method-signature">
375
364
  <span class="method-name">process_request</span><span class="method-args">()</span>
376
365
  </a>
377
366
  </div>
378
367
 
379
368
  <div class="method-description">
380
369
  <p><a class="source-toggle" href="#"
381
- onclick="toggleCode('M000155-source');return false;">[Source]</a></p>
382
- <div class="method-source-code" id="M000155-source">
370
+ onclick="toggleCode('M000202-source');return false;">[Source]</a></p>
371
+ <div class="method-source-code" id="M000202-source">
383
372
  <pre>
384
373
  <span class="ruby-comment cmt"># File lib/wee/session.rb, line 74</span>
385
374
  <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">process_request</span>
@@ -394,7 +383,7 @@ called by application to send the session a request
394
383
 
395
384
  <span class="ruby-comment cmt"># A valid page_id was specified and the corresponding page exists.</span>
396
385
 
397
- <span class="ruby-ivar">@page</span>.<span class="ruby-identifier">snapshot</span>.<span class="ruby-identifier">restore</span>
386
+ <span class="ruby-ivar">@page</span>.<span class="ruby-identifier">snapshot</span>.<span class="ruby-identifier">restore</span> <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@context</span>.<span class="ruby-identifier">request</span>.<span class="ruby-identifier">page_id</span> <span class="ruby-operator">!=</span> <span class="ruby-ivar">@snapshot_page_id</span>
398
387
 
399
388
  <span class="ruby-identifier">p</span> <span class="ruby-ivar">@context</span>.<span class="ruby-identifier">request</span>.<span class="ruby-identifier">fields</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">$DEBUG</span>
400
389
 
@@ -435,7 +424,8 @@ called by application to send the session a request
435
424
  <span class="ruby-comment cmt"># replace existing page with new snapshot</span>
436
425
  <span class="ruby-ivar">@page</span>.<span class="ruby-identifier">snapshot</span> = <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">snapshot</span>
437
426
  <span class="ruby-ivar">@page_store</span>[<span class="ruby-ivar">@context</span>.<span class="ruby-identifier">request</span>.<span class="ruby-identifier">page_id</span>] = <span class="ruby-ivar">@page</span>
438
- <span class="ruby-ivar">@context</span>.<span class="ruby-identifier">response</span> = <span class="ruby-identifier">live_update_response</span>
427
+ <span class="ruby-ivar">@snapshot_page_id</span> = <span class="ruby-ivar">@context</span>.<span class="ruby-identifier">request</span>.<span class="ruby-identifier">page_id</span>
428
+ <span class="ruby-identifier">set_response</span>(<span class="ruby-ivar">@context</span>, <span class="ruby-identifier">live_update_response</span>)
439
429
  <span class="ruby-keyword kw">else</span>
440
430
  <span class="ruby-identifier">handle_new_page_view</span>(<span class="ruby-ivar">@context</span>)
441
431
  <span class="ruby-keyword kw">end</span>
@@ -460,23 +450,23 @@ called by application to send the session a request
460
450
  </div>
461
451
  </div>
462
452
 
463
- <div id="method-M000154" class="method-detail">
464
- <a name="M000154"></a>
453
+ <div id="method-M000201" class="method-detail">
454
+ <a name="M000201"></a>
465
455
 
466
456
  <div class="method-heading">
467
- <a href="#M000154" class="method-signature">
457
+ <a href="#M000201" class="method-signature">
468
458
  <span class="method-name">sleep</span><span class="method-args">()</span>
469
459
  </a>
470
460
  </div>
471
461
 
472
462
  <div class="method-description">
473
463
  <p>
474
- Is called after <a href="Session.html#M000155">process_request</a> is run
464
+ Is called after <a href="Session.html#M000202">process_request</a> is run
475
465
  Can be used to release e.g. a database connection.
476
466
  </p>
477
467
  <p><a class="source-toggle" href="#"
478
- onclick="toggleCode('M000154-source');return false;">[Source]</a></p>
479
- <div class="method-source-code" id="M000154-source">
468
+ onclick="toggleCode('M000201-source');return false;">[Source]</a></p>
469
+ <div class="method-source-code" id="M000201-source">
480
470
  <pre>
481
471
  <span class="ruby-comment cmt"># File lib/wee/session.rb, line 71</span>
482
472
  <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">sleep</span>
@@ -486,19 +476,19 @@ Can be used to release e.g. a database connection.
486
476
  </div>
487
477
  </div>
488
478
 
489
- <div id="method-M000150" class="method-detail">
490
- <a name="M000150"></a>
479
+ <div id="method-M000197" class="method-detail">
480
+ <a name="M000197"></a>
491
481
 
492
482
  <div class="method-heading">
493
- <a href="#M000150" class="method-signature">
483
+ <a href="#M000197" class="method-signature">
494
484
  <span class="method-name">snapshot</span><span class="method-args">()</span>
495
485
  </a>
496
486
  </div>
497
487
 
498
488
  <div class="method-description">
499
489
  <p><a class="source-toggle" href="#"
500
- onclick="toggleCode('M000150-source');return false;">[Source]</a></p>
501
- <div class="method-source-code" id="M000150-source">
490
+ onclick="toggleCode('M000197-source');return false;">[Source]</a></p>
491
+ <div class="method-source-code" id="M000197-source">
502
492
  <pre>
503
493
  <span class="ruby-comment cmt"># File lib/wee/session.rb, line 33</span>
504
494
  <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">snapshot</span>
@@ -527,21 +517,11 @@ Can be used to release e.g. a database connection.
527
517
 
528
518
  <div class="name-list">
529
519
  <table>
530
- <tr class="top-aligned-row context-row">
531
- <td class="context-item-name">page_store</td>
532
- <td class="context-item-value">&nbsp;[RW]&nbsp;</td>
533
- <td class="context-item-desc"></td>
534
- </tr>
535
520
  <tr class="top-aligned-row context-row">
536
521
  <td class="context-item-name">properties</td>
537
522
  <td class="context-item-value">&nbsp;[RW]&nbsp;</td>
538
523
  <td class="context-item-desc"></td>
539
524
  </tr>
540
- <tr class="top-aligned-row context-row">
541
- <td class="context-item-name">root_component</td>
542
- <td class="context-item-value">&nbsp;[RW]&nbsp;</td>
543
- <td class="context-item-desc"></td>
544
- </tr>
545
525
  </table>
546
526
  </div>
547
527
  </div>
@@ -552,46 +532,21 @@ Can be used to release e.g. a database connection.
552
532
  <div id="methods">
553
533
  <h3 class="section-bar">Public Class methods</h3>
554
534
 
555
- <div id="method-M000161" class="method-detail">
556
- <a name="M000161"></a>
535
+ <div id="method-M000209" class="method-detail">
536
+ <a name="M000209"></a>
557
537
 
558
538
  <div class="method-heading">
559
- <a href="#M000161" class="method-signature">
560
- <span class="method-name">current</span><span class="method-args">()</span>
561
- </a>
562
- </div>
563
-
564
- <div class="method-description">
565
- <p><a class="source-toggle" href="#"
566
- onclick="toggleCode('M000161-source');return false;">[Source]</a></p>
567
- <div class="method-source-code" id="M000161-source">
568
- <pre>
569
- <span class="ruby-comment cmt"># File lib/wee/continuation/session.rb, line 8</span>
570
- <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">current</span>
571
- <span class="ruby-identifier">sess</span> = <span class="ruby-constant">Thread</span>.<span class="ruby-identifier">current</span>[<span class="ruby-identifier">:wee_session</span>]
572
- <span class="ruby-identifier">raise</span> <span class="ruby-value str">&quot;not in session&quot;</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">sess</span>.<span class="ruby-identifier">nil?</span>
573
- <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">sess</span>
574
- <span class="ruby-keyword kw">end</span>
575
- </pre>
576
- </div>
577
- </div>
578
- </div>
579
-
580
- <div id="method-M000162" class="method-detail">
581
- <a name="M000162"></a>
582
-
583
- <div class="method-heading">
584
- <a href="#M000162" class="method-signature">
539
+ <a href="#M000209" class="method-signature">
585
540
  <span class="method-name">new</span><span class="method-args">(&amp;block)</span>
586
541
  </a>
587
542
  </div>
588
543
 
589
544
  <div class="method-description">
590
545
  <p><a class="source-toggle" href="#"
591
- onclick="toggleCode('M000162-source');return false;">[Source]</a></p>
592
- <div class="method-source-code" id="M000162-source">
546
+ onclick="toggleCode('M000209-source');return false;">[Source]</a></p>
547
+ <div class="method-source-code" id="M000209-source">
593
548
  <pre>
594
- <span class="ruby-comment cmt"># File lib/wee/continuation/session.rb, line 14</span>
549
+ <span class="ruby-comment cmt"># File lib/wee/continuation/session.rb, line 4</span>
595
550
  <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-operator">&amp;</span><span class="ruby-identifier">block</span>)
596
551
  <span class="ruby-constant">Thread</span>.<span class="ruby-identifier">current</span>[<span class="ruby-identifier">:wee_session</span>] = <span class="ruby-keyword kw">self</span>
597
552
 
@@ -617,107 +572,11 @@ Can be used to release e.g. a database connection.
617
572
 
618
573
  <h3 class="section-bar">Public Instance methods</h3>
619
574
 
620
- <div id="method-M000167" class="method-detail">
621
- <a name="M000167"></a>
622
-
623
- <div class="method-heading">
624
- <a href="#M000167" class="method-signature">
625
- <span class="method-name">awake</span><span class="method-args">()</span>
626
- </a>
627
- </div>
628
-
629
- <div class="method-description">
630
- <p>
631
- Is called before <a href="Session.html#M000155">process_request</a> is
632
- invoked Can be used to setup e.g. a database connection.
633
- </p>
634
- <p><a class="source-toggle" href="#"
635
- onclick="toggleCode('M000167-source');return false;">[Source]</a></p>
636
- <div class="method-source-code" id="M000167-source">
637
- <pre>
638
- <span class="ruby-comment cmt"># File lib/wee/continuation/session.rb, line 94</span>
639
- <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">awake</span>
640
- <span class="ruby-keyword kw">end</span>
641
- </pre>
642
- </div>
643
- </div>
644
- </div>
645
-
646
- <div id="method-M000166" class="method-detail">
647
- <a name="M000166"></a>
648
-
649
- <div class="method-heading">
650
- <a href="#M000166" class="method-signature">
651
- <span class="method-name">create_page</span><span class="method-args">(snapshot)</span>
652
- </a>
653
- </div>
654
-
655
- <div class="method-description">
656
- <p><a class="source-toggle" href="#"
657
- onclick="toggleCode('M000166-source');return false;">[Source]</a></p>
658
- <div class="method-source-code" id="M000166-source">
659
- <pre>
660
- <span class="ruby-comment cmt"># File lib/wee/continuation/session.rb, line 87</span>
661
- <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">create_page</span>(<span class="ruby-identifier">snapshot</span>)
662
- <span class="ruby-identifier">idgen</span> = <span class="ruby-constant">Wee</span><span class="ruby-operator">::</span><span class="ruby-constant">SimpleIdGenerator</span>.<span class="ruby-identifier">new</span>
663
- <span class="ruby-identifier">page</span> = <span class="ruby-constant">Wee</span><span class="ruby-operator">::</span><span class="ruby-constant">Page</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">snapshot</span>, <span class="ruby-constant">Wee</span><span class="ruby-operator">::</span><span class="ruby-constant">CallbackRegistry</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">idgen</span>))
664
- <span class="ruby-keyword kw">end</span>
665
- </pre>
666
- </div>
667
- </div>
668
- </div>
669
-
670
- <div id="method-M000170" class="method-detail">
671
- <a name="M000170"></a>
672
-
673
- <div class="method-heading">
674
- <a href="#M000170" class="method-signature">
675
- <span class="method-name">current_context</span><span class="method-args">()</span>
676
- </a>
677
- </div>
678
-
679
- <div class="method-description">
680
- <p><a class="source-toggle" href="#"
681
- onclick="toggleCode('M000170-source');return false;">[Source]</a></p>
682
- <div class="method-source-code" id="M000170-source">
683
- <pre>
684
- <span class="ruby-comment cmt"># File lib/wee/continuation/session.rb, line 176</span>
685
- <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">current_context</span>
686
- <span class="ruby-ivar">@context</span>
687
- <span class="ruby-keyword kw">end</span>
688
- </pre>
689
- </div>
690
- </div>
691
- </div>
692
-
693
- <div id="method-M000171" class="method-detail">
694
- <a name="M000171"></a>
575
+ <div id="method-M000205" class="method-detail">
576
+ <a name="M000205"></a>
695
577
 
696
578
  <div class="method-heading">
697
- <a href="#M000171" class="method-signature">
698
- <span class="method-name">current_page</span><span class="method-args">()</span>
699
- </a>
700
- </div>
701
-
702
- <div class="method-description">
703
- <p><a class="source-toggle" href="#"
704
- onclick="toggleCode('M000171-source');return false;">[Source]</a></p>
705
- <div class="method-source-code" id="M000171-source">
706
- <pre>
707
- <span class="ruby-comment cmt"># File lib/wee/continuation/session.rb, line 180</span>
708
- <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">current_page</span>
709
- <span class="ruby-ivar">@page</span>
710
- <span class="ruby-keyword kw">end</span>
711
- </pre>
712
- </div>
713
- </div>
714
- </div>
715
-
716
- <div id="method-M000158" class="method-detail">
717
- <a name="M000158"></a>
718
-
719
- <div class="method-heading">
720
- <a href="#M000158" class="method-signature">
579
+ <a href="#M000205" class="method-signature">
721
580
  <span class="method-name">get_property</span><span class="method-args">(prop, klass)</span>
722
581
  </a>
723
582
  </div>
@@ -727,10 +586,10 @@ invoked Can be used to setup e.g. a database connection.
727
586
  Returns an &quot;owned&quot; property for the given <tt>klass</tt>.
728
587
  </p>
729
588
  <p><a class="source-toggle" href="#"
730
- onclick="toggleCode('M000158-source');return false;">[Source]</a></p>
731
- <div class="method-source-code" id="M000158-source">
589
+ onclick="toggleCode('M000205-source');return false;">[Source]</a></p>
590
+ <div class="method-source-code" id="M000205-source">
732
591
  <pre>
733
- <span class="ruby-comment cmt"># File lib/wee/session.rb, line 164</span>
592
+ <span class="ruby-comment cmt"># File lib/wee/session.rb, line 165</span>
734
593
  <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">get_property</span>(<span class="ruby-identifier">prop</span>, <span class="ruby-identifier">klass</span>)
735
594
  <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@properties</span>
736
595
  <span class="ruby-ivar">@properties</span>.<span class="ruby-identifier">fetch</span>(<span class="ruby-identifier">klass</span>, {})[<span class="ruby-identifier">prop</span>]
@@ -743,11 +602,11 @@ Returns an &quot;owned&quot; property for the given <tt>klass</tt>.
743
602
  </div>
744
603
  </div>
745
604
 
746
- <div id="method-M000164" class="method-detail">
747
- <a name="M000164"></a>
605
+ <div id="method-M000210" class="method-detail">
606
+ <a name="M000210"></a>
748
607
 
749
608
  <div class="method-heading">
750
- <a href="#M000164" class="method-signature">
609
+ <a href="#M000210" class="method-signature">
751
610
  <span class="method-name">handle_request</span><span class="method-args">(context)</span>
752
611
  </a>
753
612
  </div>
@@ -757,10 +616,10 @@ Returns an &quot;owned&quot; property for the given <tt>klass</tt>.
757
616
  called by application to send the session a request
758
617
  </p>
759
618
  <p><a class="source-toggle" href="#"
760
- onclick="toggleCode('M000164-source');return false;">[Source]</a></p>
761
- <div class="method-source-code" id="M000164-source">
619
+ onclick="toggleCode('M000210-source');return false;">[Source]</a></p>
620
+ <div class="method-source-code" id="M000210-source">
762
621
  <pre>
763
- <span class="ruby-comment cmt"># File lib/wee/continuation/session.rb, line 39</span>
622
+ <span class="ruby-comment cmt"># File lib/wee/continuation/session.rb, line 24</span>
764
623
  <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">handle_request</span>(<span class="ruby-identifier">context</span>)
765
624
  <span class="ruby-keyword kw">super</span>
766
625
 
@@ -776,164 +635,21 @@ called by application to send the session a request
776
635
  </div>
777
636
  </div>
778
637
 
779
- <div id="method-M000169" class="method-detail">
780
- <a name="M000169"></a>
638
+ <div id="method-M000211" class="method-detail">
639
+ <a name="M000211"></a>
781
640
 
782
641
  <div class="method-heading">
783
- <a href="#M000169" class="method-signature">
784
- <span class="method-name">process_request</span><span class="method-args">()</span>
785
- </a>
786
- </div>
787
-
788
- <div class="method-description">
789
- <p><a class="source-toggle" href="#"
790
- onclick="toggleCode('M000169-source');return false;">[Source]</a></p>
791
- <div class="method-source-code" id="M000169-source">
792
- <pre>
793
- <span class="ruby-comment cmt"># File lib/wee/continuation/session.rb, line 102</span>
794
- <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">process_request</span>
795
- <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@context</span>.<span class="ruby-identifier">request</span>.<span class="ruby-identifier">page_id</span>.<span class="ruby-identifier">nil?</span>
796
-
797
- <span class="ruby-comment cmt"># No page_id was specified in the URL. This means that we start with a</span>
798
- <span class="ruby-comment cmt"># fresh component and a fresh page_id, then redirect to render itself.</span>
799
-
800
- <span class="ruby-identifier">handle_new_page_view</span>(<span class="ruby-ivar">@context</span>, <span class="ruby-ivar">@initial_snapshot</span>)
801
-
802
- <span class="ruby-keyword kw">elsif</span> <span class="ruby-ivar">@page</span> = <span class="ruby-ivar">@page_store</span>.<span class="ruby-identifier">fetch</span>(<span class="ruby-ivar">@context</span>.<span class="ruby-identifier">request</span>.<span class="ruby-identifier">page_id</span>, <span class="ruby-keyword kw">false</span>)
803
-
804
- <span class="ruby-comment cmt"># A valid page_id was specified and the corresponding page exists.</span>
805
-
806
- <span class="ruby-ivar">@page</span>.<span class="ruby-identifier">snapshot</span>.<span class="ruby-identifier">restore</span>
807
-
808
- <span class="ruby-identifier">p</span> <span class="ruby-ivar">@context</span>.<span class="ruby-identifier">request</span>.<span class="ruby-identifier">fields</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">$DEBUG</span>
809
-
810
- <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@context</span>.<span class="ruby-identifier">request</span>.<span class="ruby-identifier">fields</span>.<span class="ruby-identifier">empty?</span>
811
-
812
- <span class="ruby-comment cmt"># No action/inputs were specified -&gt; render page</span>
813
- <span class="ruby-comment cmt">#</span>
814
- <span class="ruby-comment cmt"># 1. Reset the action/input fields (as they are regenerated in the</span>
815
- <span class="ruby-comment cmt"># rendering process).</span>
816
- <span class="ruby-comment cmt"># 2. Render the page (respond).</span>
817
- <span class="ruby-comment cmt"># 3. Store the page back into the store</span>
818
-
819
- <span class="ruby-ivar">@page</span> = <span class="ruby-identifier">create_page</span>(<span class="ruby-ivar">@page</span>.<span class="ruby-identifier">snapshot</span>) <span class="ruby-comment cmt"># remove all action/input handlers</span>
820
- <span class="ruby-identifier">respond</span>(<span class="ruby-ivar">@context</span>, <span class="ruby-ivar">@page</span>.<span class="ruby-identifier">callbacks</span>) <span class="ruby-comment cmt"># render</span>
821
- <span class="ruby-ivar">@page_store</span>[<span class="ruby-ivar">@context</span>.<span class="ruby-identifier">request</span>.<span class="ruby-identifier">page_id</span>] = <span class="ruby-ivar">@page</span> <span class="ruby-comment cmt"># store</span>
822
-
823
- <span class="ruby-keyword kw">else</span>
824
-
825
- <span class="ruby-comment cmt"># Actions/inputs were specified.</span>
826
- <span class="ruby-comment cmt">#</span>
827
- <span class="ruby-comment cmt"># We process the request and invoke actions/inputs. Then we generate a</span>
828
- <span class="ruby-comment cmt"># new page view. </span>
829
-
830
- <span class="ruby-identifier">callback_stream</span> = <span class="ruby-constant">Wee</span><span class="ruby-operator">::</span><span class="ruby-constant">CallbackStream</span>.<span class="ruby-identifier">new</span>(<span class="ruby-ivar">@page</span>.<span class="ruby-identifier">callbacks</span>, <span class="ruby-ivar">@context</span>.<span class="ruby-identifier">request</span>.<span class="ruby-identifier">fields</span>)
831
-
832
- <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">callback_stream</span>.<span class="ruby-identifier">all_of_type</span>(<span class="ruby-identifier">:action</span>).<span class="ruby-identifier">size</span> <span class="ruby-operator">&gt;</span> <span class="ruby-value">1</span>
833
- <span class="ruby-identifier">raise</span> <span class="ruby-value str">&quot;Not allowed to specify more than one action callback&quot;</span>
834
- <span class="ruby-keyword kw">end</span>
835
-
836
- <span class="ruby-identifier">live_update_response</span> = <span class="ruby-identifier">catch</span>(<span class="ruby-identifier">:wee_live_update</span>) {
837
- <span class="ruby-identifier">catch</span>(<span class="ruby-identifier">:wee_back_to_session</span>) {
838
- <span class="ruby-ivar">@root_component</span>.<span class="ruby-identifier">process_callbacks_chain</span>(<span class="ruby-identifier">callback_stream</span>)
839
- }
840
- <span class="ruby-keyword kw">nil</span>
841
- }
842
-
843
- <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">live_update_response</span>
844
- <span class="ruby-comment cmt"># replace existing page with new snapshot</span>
845
- <span class="ruby-ivar">@page</span>.<span class="ruby-identifier">snapshot</span> = <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">snapshot</span>
846
- <span class="ruby-ivar">@page_store</span>[<span class="ruby-ivar">@context</span>.<span class="ruby-identifier">request</span>.<span class="ruby-identifier">page_id</span>] = <span class="ruby-ivar">@page</span>
847
- <span class="ruby-ivar">@context</span>.<span class="ruby-identifier">response</span> = <span class="ruby-identifier">live_update_response</span>
848
- <span class="ruby-keyword kw">else</span>
849
- <span class="ruby-identifier">handle_new_page_view</span>(<span class="ruby-ivar">@context</span>)
850
- <span class="ruby-keyword kw">end</span>
851
-
852
- <span class="ruby-keyword kw">end</span>
853
-
854
- <span class="ruby-keyword kw">else</span>
855
-
856
- <span class="ruby-comment cmt"># A page_id was specified in the URL, but there's no page for it in the</span>
857
- <span class="ruby-comment cmt"># page store. Either the page has timed out, or an invalid page_id was</span>
858
- <span class="ruby-comment cmt"># specified. </span>
859
- <span class="ruby-comment cmt">#</span>
860
- <span class="ruby-comment cmt"># TODO:: Display an &quot;invalid page or page timed out&quot; message, which</span>
861
- <span class="ruby-comment cmt"># forwards to /app/session-id</span>
862
-
863
- <span class="ruby-identifier">raise</span> <span class="ruby-value str">&quot;Not yet implemented&quot;</span>
864
-
865
- <span class="ruby-keyword kw">end</span>
866
- <span class="ruby-keyword kw">end</span>
867
- </pre>
868
- </div>
869
- </div>
870
- </div>
871
-
872
- <div id="method-M000168" class="method-detail">
873
- <a name="M000168"></a>
874
-
875
- <div class="method-heading">
876
- <a href="#M000168" class="method-signature">
877
- <span class="method-name">sleep</span><span class="method-args">()</span>
878
- </a>
879
- </div>
880
-
881
- <div class="method-description">
882
- <p>
883
- Is called after <a href="Session.html#M000155">process_request</a> is run
884
- Can be used to release e.g. a database connection.
885
- </p>
886
- <p><a class="source-toggle" href="#"
887
- onclick="toggleCode('M000168-source');return false;">[Source]</a></p>
888
- <div class="method-source-code" id="M000168-source">
889
- <pre>
890
- <span class="ruby-comment cmt"># File lib/wee/continuation/session.rb, line 99</span>
891
- <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">sleep</span>
892
- <span class="ruby-keyword kw">end</span>
893
- </pre>
894
- </div>
895
- </div>
896
- </div>
897
-
898
- <div id="method-M000163" class="method-detail">
899
- <a name="M000163"></a>
900
-
901
- <div class="method-heading">
902
- <a href="#M000163" class="method-signature">
903
- <span class="method-name">snapshot</span><span class="method-args">()</span>
904
- </a>
905
- </div>
906
-
907
- <div class="method-description">
908
- <p><a class="source-toggle" href="#"
909
- onclick="toggleCode('M000163-source');return false;">[Source]</a></p>
910
- <div class="method-source-code" id="M000163-source">
911
- <pre>
912
- <span class="ruby-comment cmt"># File lib/wee/continuation/session.rb, line 33</span>
913
- <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">snapshot</span>
914
- <span class="ruby-ivar">@root_component</span>.<span class="ruby-identifier">backtrack_state_chain</span>(<span class="ruby-identifier">snap</span> = <span class="ruby-constant">Wee</span><span class="ruby-operator">::</span><span class="ruby-constant">Snapshot</span>.<span class="ruby-identifier">new</span>)
915
- <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">snap</span>.<span class="ruby-identifier">freeze</span>
916
- <span class="ruby-keyword kw">end</span>
917
- </pre>
918
- </div>
919
- </div>
920
- </div>
921
-
922
- <div id="method-M000165" class="method-detail">
923
- <a name="M000165"></a>
924
-
925
- <div class="method-heading">
926
- <a href="#M000165" class="method-signature">
642
+ <a href="#M000211" class="method-signature">
927
643
  <span class="method-name">start_request_response_loop</span><span class="method-args">()</span>
928
644
  </a>
929
645
  </div>
930
646
 
931
647
  <div class="method-description">
932
648
  <p><a class="source-toggle" href="#"
933
- onclick="toggleCode('M000165-source');return false;">[Source]</a></p>
934
- <div class="method-source-code" id="M000165-source">
649
+ onclick="toggleCode('M000211-source');return false;">[Source]</a></p>
650
+ <div class="method-source-code" id="M000211-source">
935
651
  <pre>
936
- <span class="ruby-comment cmt"># File lib/wee/continuation/session.rb, line 50</span>
652
+ <span class="ruby-comment cmt"># File lib/wee/continuation/session.rb, line 35</span>
937
653
  <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">start_request_response_loop</span>
938
654
  <span class="ruby-constant">Thread</span>.<span class="ruby-identifier">abort_on_exception</span> = <span class="ruby-keyword kw">true</span>
939
655
  <span class="ruby-constant">Thread</span>.<span class="ruby-identifier">new</span> {
@@ -977,50 +693,51 @@ Can be used to release e.g. a database connection.
977
693
 
978
694
  <h3 class="section-bar">Private Instance methods</h3>
979
695
 
980
- <div id="method-M000159" class="method-detail">
981
- <a name="M000159"></a>
696
+ <div id="method-M000206" class="method-detail">
697
+ <a name="M000206"></a>
982
698
 
983
699
  <div class="method-heading">
984
- <a href="#M000159" class="method-signature">
700
+ <a href="#M000206" class="method-signature">
985
701
  <span class="method-name">handle_new_page_view</span><span class="method-args">(context, snapshot=nil)</span>
986
702
  </a>
987
703
  </div>
988
704
 
989
705
  <div class="method-description">
990
706
  <p><a class="source-toggle" href="#"
991
- onclick="toggleCode('M000159-source');return false;">[Source]</a></p>
992
- <div class="method-source-code" id="M000159-source">
707
+ onclick="toggleCode('M000206-source');return false;">[Source]</a></p>
708
+ <div class="method-source-code" id="M000206-source">
993
709
  <pre>
994
- <span class="ruby-comment cmt"># File lib/wee/session.rb, line 174</span>
710
+ <span class="ruby-comment cmt"># File lib/wee/session.rb, line 175</span>
995
711
  <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">handle_new_page_view</span>(<span class="ruby-identifier">context</span>, <span class="ruby-identifier">snapshot</span>=<span class="ruby-keyword kw">nil</span>)
996
712
  <span class="ruby-identifier">new_page_id</span> = <span class="ruby-ivar">@idgen</span>.<span class="ruby-identifier">next</span>.<span class="ruby-identifier">to_s</span>
997
713
  <span class="ruby-identifier">new_page</span> = <span class="ruby-identifier">create_page</span>(<span class="ruby-identifier">snapshot</span> <span class="ruby-operator">||</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">snapshot</span>())
998
714
  <span class="ruby-ivar">@page_store</span>[<span class="ruby-identifier">new_page_id</span>] = <span class="ruby-identifier">new_page</span>
715
+ <span class="ruby-ivar">@snapshot_page_id</span> = <span class="ruby-identifier">new_page_id</span>
999
716
  <span class="ruby-identifier">redirect_url</span> = <span class="ruby-identifier">context</span>.<span class="ruby-identifier">request</span>.<span class="ruby-identifier">build_url</span>(<span class="ruby-identifier">context</span>.<span class="ruby-identifier">request</span>.<span class="ruby-identifier">request_handler_id</span>, <span class="ruby-identifier">new_page_id</span>)
1000
- <span class="ruby-identifier">context</span>.<span class="ruby-identifier">response</span> = <span class="ruby-constant">Wee</span><span class="ruby-operator">::</span><span class="ruby-constant">RedirectResponse</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">redirect_url</span>)
717
+ <span class="ruby-identifier">set_response</span>(<span class="ruby-identifier">context</span>, <span class="ruby-constant">Wee</span><span class="ruby-operator">::</span><span class="ruby-constant">RedirectResponse</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">redirect_url</span>))
1001
718
  <span class="ruby-keyword kw">end</span>
1002
719
  </pre>
1003
720
  </div>
1004
721
  </div>
1005
722
  </div>
1006
723
 
1007
- <div id="method-M000160" class="method-detail">
1008
- <a name="M000160"></a>
724
+ <div id="method-M000208" class="method-detail">
725
+ <a name="M000208"></a>
1009
726
 
1010
727
  <div class="method-heading">
1011
- <a href="#M000160" class="method-signature">
728
+ <a href="#M000208" class="method-signature">
1012
729
  <span class="method-name">respond</span><span class="method-args">(context, callbacks)</span>
1013
730
  </a>
1014
731
  </div>
1015
732
 
1016
733
  <div class="method-description">
1017
734
  <p><a class="source-toggle" href="#"
1018
- onclick="toggleCode('M000160-source');return false;">[Source]</a></p>
1019
- <div class="method-source-code" id="M000160-source">
735
+ onclick="toggleCode('M000208-source');return false;">[Source]</a></p>
736
+ <div class="method-source-code" id="M000208-source">
1020
737
  <pre>
1021
- <span class="ruby-comment cmt"># File lib/wee/session.rb, line 182</span>
738
+ <span class="ruby-comment cmt"># File lib/wee/session.rb, line 188</span>
1022
739
  <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">respond</span>(<span class="ruby-identifier">context</span>, <span class="ruby-identifier">callbacks</span>)
1023
- <span class="ruby-identifier">context</span>.<span class="ruby-identifier">response</span> = <span class="ruby-constant">Wee</span><span class="ruby-operator">::</span><span class="ruby-constant">GenericResponse</span>.<span class="ruby-identifier">new</span>(<span class="ruby-value str">'text/html'</span>, <span class="ruby-value str">''</span>)
740
+ <span class="ruby-identifier">set_response</span>(<span class="ruby-identifier">context</span>, <span class="ruby-constant">Wee</span><span class="ruby-operator">::</span><span class="ruby-constant">GenericResponse</span>.<span class="ruby-identifier">new</span>(<span class="ruby-value str">'text/html'</span>, <span class="ruby-value str">''</span>))
1024
741
 
1025
742
  <span class="ruby-identifier">rctx</span> = <span class="ruby-constant">Wee</span><span class="ruby-operator">::</span><span class="ruby-constant">RenderingContext</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">context</span>.<span class="ruby-identifier">request</span>, <span class="ruby-identifier">context</span>.<span class="ruby-identifier">response</span>, <span class="ruby-identifier">callbacks</span>, <span class="ruby-constant">Wee</span><span class="ruby-operator">::</span><span class="ruby-constant">HtmlWriter</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">context</span>.<span class="ruby-identifier">response</span>.<span class="ruby-identifier">content</span>))
1026
743
  <span class="ruby-ivar">@root_component</span>.<span class="ruby-identifier">do_render_chain</span>(<span class="ruby-identifier">rctx</span>)
@@ -1030,117 +747,23 @@ Can be used to release e.g. a database connection.
1030
747
  </div>
1031
748
  </div>
1032
749
 
1033
-
1034
- </div>
1035
- <div id="section">
1036
- <h2 class="section-title"><a name="SEC00118">Properties</a></h2>
1037
- <div class="section-comment">
1038
-
1039
- </div>
1040
-
1041
-
1042
-
1043
-
1044
-
1045
- <div id="attribute-list">
1046
- <h3 class="section-bar">Attributes</h3>
1047
-
1048
- <div class="name-list">
1049
- <table>
1050
- <tr class="top-aligned-row context-row">
1051
- <td class="context-item-name">properties</td>
1052
- <td class="context-item-value">&nbsp;[RW]&nbsp;</td>
1053
- <td class="context-item-desc"></td>
1054
- </tr>
1055
- </table>
1056
- </div>
1057
- </div>
1058
-
1059
-
1060
-
1061
- <!-- if method_list -->
1062
- <div id="methods">
1063
- <h3 class="section-bar">Public Instance methods</h3>
1064
-
1065
- <div id="method-M000172" class="method-detail">
1066
- <a name="M000172"></a>
1067
-
1068
- <div class="method-heading">
1069
- <a href="#M000172" class="method-signature">
1070
- <span class="method-name">get_property</span><span class="method-args">(prop, klass)</span>
1071
- </a>
1072
- </div>
1073
-
1074
- <div class="method-description">
1075
- <p>
1076
- Returns an &quot;owned&quot; property for the given <tt>klass</tt>.
1077
- </p>
1078
- <p><a class="source-toggle" href="#"
1079
- onclick="toggleCode('M000172-source');return false;">[Source]</a></p>
1080
- <div class="method-source-code" id="M000172-source">
1081
- <pre>
1082
- <span class="ruby-comment cmt"># File lib/wee/continuation/session.rb, line 192</span>
1083
- <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">get_property</span>(<span class="ruby-identifier">prop</span>, <span class="ruby-identifier">klass</span>)
1084
- <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@properties</span>
1085
- <span class="ruby-ivar">@properties</span>.<span class="ruby-identifier">fetch</span>(<span class="ruby-identifier">klass</span>, {})[<span class="ruby-identifier">prop</span>]
1086
- <span class="ruby-keyword kw">else</span>
1087
- <span class="ruby-keyword kw">nil</span>
1088
- <span class="ruby-keyword kw">end</span>
1089
- <span class="ruby-keyword kw">end</span>
1090
- </pre>
1091
- </div>
1092
- </div>
1093
- </div>
1094
-
1095
- <h3 class="section-bar">Private Instance methods</h3>
1096
-
1097
- <div id="method-M000173" class="method-detail">
1098
- <a name="M000173"></a>
1099
-
1100
- <div class="method-heading">
1101
- <a href="#M000173" class="method-signature">
1102
- <span class="method-name">handle_new_page_view</span><span class="method-args">(context, snapshot=nil)</span>
1103
- </a>
1104
- </div>
1105
-
1106
- <div class="method-description">
1107
- <p><a class="source-toggle" href="#"
1108
- onclick="toggleCode('M000173-source');return false;">[Source]</a></p>
1109
- <div class="method-source-code" id="M000173-source">
1110
- <pre>
1111
- <span class="ruby-comment cmt"># File lib/wee/continuation/session.rb, line 202</span>
1112
- <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">handle_new_page_view</span>(<span class="ruby-identifier">context</span>, <span class="ruby-identifier">snapshot</span>=<span class="ruby-keyword kw">nil</span>)
1113
- <span class="ruby-identifier">new_page_id</span> = <span class="ruby-ivar">@idgen</span>.<span class="ruby-identifier">next</span>.<span class="ruby-identifier">to_s</span>
1114
- <span class="ruby-identifier">new_page</span> = <span class="ruby-identifier">create_page</span>(<span class="ruby-identifier">snapshot</span> <span class="ruby-operator">||</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">snapshot</span>())
1115
- <span class="ruby-ivar">@page_store</span>[<span class="ruby-identifier">new_page_id</span>] = <span class="ruby-identifier">new_page</span>
1116
- <span class="ruby-identifier">redirect_url</span> = <span class="ruby-identifier">context</span>.<span class="ruby-identifier">request</span>.<span class="ruby-identifier">build_url</span>(<span class="ruby-identifier">context</span>.<span class="ruby-identifier">request</span>.<span class="ruby-identifier">request_handler_id</span>, <span class="ruby-identifier">new_page_id</span>)
1117
- <span class="ruby-identifier">context</span>.<span class="ruby-identifier">response</span> = <span class="ruby-constant">Wee</span><span class="ruby-operator">::</span><span class="ruby-constant">RedirectResponse</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">redirect_url</span>)
1118
- <span class="ruby-keyword kw">end</span>
1119
- </pre>
1120
- </div>
1121
- </div>
1122
- </div>
1123
-
1124
- <div id="method-M000174" class="method-detail">
1125
- <a name="M000174"></a>
750
+ <div id="method-M000207" class="method-detail">
751
+ <a name="M000207"></a>
1126
752
 
1127
753
  <div class="method-heading">
1128
- <a href="#M000174" class="method-signature">
1129
- <span class="method-name">respond</span><span class="method-args">(context, callbacks)</span>
754
+ <a href="#M000207" class="method-signature">
755
+ <span class="method-name">set_response</span><span class="method-args">(context, response)</span>
1130
756
  </a>
1131
757
  </div>
1132
758
 
1133
759
  <div class="method-description">
1134
760
  <p><a class="source-toggle" href="#"
1135
- onclick="toggleCode('M000174-source');return false;">[Source]</a></p>
1136
- <div class="method-source-code" id="M000174-source">
761
+ onclick="toggleCode('M000207-source');return false;">[Source]</a></p>
762
+ <div class="method-source-code" id="M000207-source">
1137
763
  <pre>
1138
- <span class="ruby-comment cmt"># File lib/wee/continuation/session.rb, line 210</span>
1139
- <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">respond</span>(<span class="ruby-identifier">context</span>, <span class="ruby-identifier">callbacks</span>)
1140
- <span class="ruby-identifier">context</span>.<span class="ruby-identifier">response</span> = <span class="ruby-constant">Wee</span><span class="ruby-operator">::</span><span class="ruby-constant">GenericResponse</span>.<span class="ruby-identifier">new</span>(<span class="ruby-value str">'text/html'</span>, <span class="ruby-value str">''</span>)
1141
-
1142
- <span class="ruby-identifier">rctx</span> = <span class="ruby-constant">Wee</span><span class="ruby-operator">::</span><span class="ruby-constant">RenderingContext</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">context</span>.<span class="ruby-identifier">request</span>, <span class="ruby-identifier">context</span>.<span class="ruby-identifier">response</span>, <span class="ruby-identifier">callbacks</span>, <span class="ruby-constant">Wee</span><span class="ruby-operator">::</span><span class="ruby-constant">HtmlWriter</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">context</span>.<span class="ruby-identifier">response</span>.<span class="ruby-identifier">content</span>))
1143
- <span class="ruby-ivar">@root_component</span>.<span class="ruby-identifier">do_render_chain</span>(<span class="ruby-identifier">rctx</span>)
764
+ <span class="ruby-comment cmt"># File lib/wee/session.rb, line 184</span>
765
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">set_response</span>(<span class="ruby-identifier">context</span>, <span class="ruby-identifier">response</span>)
766
+ <span class="ruby-identifier">context</span>.<span class="ruby-identifier">response</span> = <span class="ruby-identifier">response</span>
1144
767
  <span class="ruby-keyword kw">end</span>
1145
768
  </pre>
1146
769
  </div>