wee 0.8.0 → 0.9.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (231) hide show
  1. data/ChangeLog +286 -0
  2. data/Features +185 -0
  3. data/doc/rdoc/classes/ActionView.html +107 -0
  4. data/doc/rdoc/classes/ActionView/Base.html +133 -0
  5. data/doc/rdoc/classes/Array.html +7 -59
  6. data/doc/rdoc/classes/Cache/StorageCache.html +38 -38
  7. data/doc/rdoc/classes/Cache/Strategy/CapacityBounded.html +30 -30
  8. data/doc/rdoc/classes/Cache/Strategy/LFU.html +24 -24
  9. data/doc/rdoc/classes/Cache/Strategy/LRU.html +24 -24
  10. data/doc/rdoc/classes/Cache/Strategy/Unbounded.html +24 -24
  11. data/doc/rdoc/classes/Enumerable.html +6 -6
  12. data/doc/rdoc/classes/Hash.html +120 -0
  13. data/doc/rdoc/classes/Main.html +58 -34
  14. data/doc/rdoc/classes/Object.html +12 -12
  15. data/doc/rdoc/classes/OgScaffolder.html +165 -166
  16. data/doc/rdoc/classes/OgScaffolder/Editor.html +112 -112
  17. data/doc/rdoc/classes/String.html +7 -59
  18. data/doc/rdoc/classes/Struct.html +14 -14
  19. data/doc/rdoc/classes/Wee.html +70 -6
  20. data/doc/rdoc/classes/Wee/AbstractSession.html +502 -0
  21. data/doc/rdoc/classes/Wee/AnswerDecoration.html +11 -11
  22. data/doc/rdoc/classes/Wee/Application.html +139 -84
  23. data/doc/rdoc/classes/Wee/Brush.html +21 -18
  24. data/doc/rdoc/classes/Wee/Brush/AnchorTag.html +90 -17
  25. data/doc/rdoc/classes/Wee/Brush/CheckboxTag.html +162 -0
  26. data/doc/rdoc/classes/Wee/Brush/FileUploadTag.html +7 -7
  27. data/doc/rdoc/classes/Wee/Brush/FormTag.html +41 -17
  28. data/doc/rdoc/classes/Wee/Brush/GenericEncodedTextBrush.html +12 -12
  29. data/doc/rdoc/classes/Wee/Brush/GenericSingleTagBrush.html +7 -7
  30. data/doc/rdoc/classes/Wee/Brush/GenericTagBrush.html +112 -86
  31. data/doc/rdoc/classes/Wee/Brush/GenericTextBrush.html +12 -12
  32. data/doc/rdoc/classes/Wee/Brush/HiddenInputTag.html +160 -0
  33. data/doc/rdoc/classes/Wee/Brush/ImageButtonTag.html +15 -15
  34. data/doc/rdoc/classes/Wee/Brush/ImageTag.html +21 -21
  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/RadioButtonTag.html +234 -0
  39. data/doc/rdoc/classes/Wee/Brush/RadioButtonTag/RadioGroup.html +207 -0
  40. data/doc/rdoc/classes/Wee/Brush/SelectListTag.html +124 -28
  41. data/doc/rdoc/classes/Wee/Brush/SelectListTag/SelectListCallback.html +7 -7
  42. data/doc/rdoc/classes/Wee/Brush/SelectOptionTag.html +7 -7
  43. data/doc/rdoc/classes/Wee/Brush/SubmitButtonTag.html +7 -7
  44. data/doc/rdoc/classes/Wee/Brush/TableDataTag.html +14 -14
  45. data/doc/rdoc/classes/Wee/Brush/TableHeaderTag.html +7 -7
  46. data/doc/rdoc/classes/Wee/Brush/TableRowTag.html +42 -42
  47. data/doc/rdoc/classes/Wee/Brush/TableTag.html +7 -7
  48. data/doc/rdoc/classes/Wee/Brush/TextAreaTag.html +48 -15
  49. data/doc/rdoc/classes/Wee/Brush/TextInputTag.html +7 -7
  50. data/doc/rdoc/classes/Wee/CallbackRegistry.html +38 -38
  51. data/doc/rdoc/classes/Wee/CallbackStream.html +18 -18
  52. data/doc/rdoc/classes/Wee/CanvasMixin.html +225 -0
  53. data/doc/rdoc/classes/Wee/Component.html +202 -201
  54. data/doc/rdoc/classes/Wee/Component/OnAnswer.html +7 -7
  55. data/doc/rdoc/classes/Wee/ComponentDispatcher.html +289 -0
  56. data/doc/rdoc/classes/Wee/ComponentRunner.html +321 -0
  57. data/doc/rdoc/classes/Wee/Context.html +63 -3
  58. data/doc/rdoc/classes/Wee/Decoration.html +45 -45
  59. data/doc/rdoc/classes/Wee/Delegate.html +30 -30
  60. data/doc/rdoc/classes/Wee/DupReplaceSnapshotMixin.html +164 -0
  61. data/doc/rdoc/classes/Wee/ErrorResponse.html +16 -16
  62. data/doc/rdoc/classes/Wee/Examples.html +114 -0
  63. data/doc/rdoc/classes/Wee/Examples/Calculator.html +319 -0
  64. data/doc/rdoc/classes/Wee/Examples/Counter.html +289 -0
  65. data/doc/rdoc/classes/Wee/Examples/EditableCounter.html +210 -0
  66. data/doc/rdoc/classes/Wee/Examples/Window.html +346 -0
  67. data/doc/rdoc/classes/Wee/FastCGIAdaptor.html +227 -0
  68. data/doc/rdoc/classes/Wee/FormDecoration.html +6 -6
  69. data/doc/rdoc/classes/Wee/GenericResponse.html +7 -7
  70. data/doc/rdoc/classes/Wee/HtmlCanvasRenderer.html +1230 -0
  71. data/doc/rdoc/classes/Wee/HtmlWriter.html +40 -40
  72. data/doc/rdoc/classes/Wee/IdGenerator.html +148 -0
  73. data/doc/rdoc/classes/Wee/LiteralMethodCallback.html +27 -14
  74. data/doc/rdoc/classes/Wee/LoginDecoration.html +261 -0
  75. data/doc/rdoc/classes/Wee/Md5IdGenerator.html +14 -14
  76. data/doc/rdoc/classes/Wee/MessageBox.html +14 -14
  77. data/doc/rdoc/classes/Wee/Nitro.html +114 -0
  78. data/doc/rdoc/classes/Wee/Nitro/ControllerClassMixin.html +192 -0
  79. data/doc/rdoc/classes/Wee/Nitro/ControllerMixin.html +345 -0
  80. data/doc/rdoc/classes/Wee/Nitro/FormTag.html +155 -0
  81. data/doc/rdoc/classes/Wee/Nitro/HtmlCanvasRenderer.html +178 -0
  82. data/doc/rdoc/classes/Wee/Page.html +4 -0
  83. data/doc/rdoc/classes/Wee/PageDecoration.html +18 -18
  84. data/doc/rdoc/classes/Wee/PagelessApplication.html +13 -11
  85. data/doc/rdoc/classes/Wee/PagelessComponentDriver.html +296 -0
  86. data/doc/rdoc/classes/Wee/PagelessRequest.html +52 -21
  87. data/doc/rdoc/classes/Wee/PagelessSession.html +130 -91
  88. data/doc/rdoc/classes/Wee/Pager.html +534 -0
  89. data/doc/rdoc/classes/Wee/Presenter.html +482 -298
  90. data/doc/rdoc/classes/Wee/Rails.html +114 -0
  91. data/doc/rdoc/classes/Wee/Rails/ControllerClassMixin.html +192 -0
  92. data/doc/rdoc/classes/Wee/Rails/ControllerMixin.html +342 -0
  93. data/doc/rdoc/classes/Wee/Rails/FormTag.html +155 -0
  94. data/doc/rdoc/classes/Wee/Rails/HtmlCanvasRenderer.html +177 -0
  95. data/doc/rdoc/classes/Wee/RedirectResponse.html +7 -7
  96. data/doc/rdoc/classes/Wee/RefreshResponse.html +7 -7
  97. data/doc/rdoc/classes/Wee/Renderer.html +208 -0
  98. data/doc/rdoc/classes/Wee/RenderingContext.html +175 -3
  99. data/doc/rdoc/classes/Wee/Request.html +197 -46
  100. data/doc/rdoc/classes/Wee/RequestHandler.html +31 -31
  101. data/doc/rdoc/classes/Wee/Response.html +44 -43
  102. data/doc/rdoc/classes/Wee/Session.html +296 -402
  103. data/doc/rdoc/classes/Wee/SimpleIdGenerator.html +14 -14
  104. data/doc/rdoc/classes/Wee/Snapshot.html +19 -19
  105. data/doc/rdoc/classes/Wee/Utils.html +22 -22
  106. data/doc/rdoc/classes/Wee/Utils/LRUCache.html +6 -6
  107. data/doc/rdoc/classes/Wee/ValueHolder.html +19 -19
  108. data/doc/rdoc/classes/Wee/WEBrickAdaptor.html +72 -46
  109. data/doc/rdoc/classes/Wee/WrapperDecoration.html +6 -6
  110. data/doc/rdoc/created.rid +1 -1
  111. data/doc/rdoc/files/INSTALL.html +1 -1
  112. data/doc/rdoc/files/README.html +8 -12
  113. data/doc/rdoc/files/lib/cache/cache_rb.html +1 -1
  114. data/doc/rdoc/files/lib/wee/abstractsession_rb.html +108 -0
  115. data/doc/rdoc/files/lib/wee/adaptors/fastcgi_rb.html +108 -0
  116. data/doc/rdoc/files/lib/wee/adaptors/nitro_rb.html +101 -0
  117. data/doc/rdoc/files/lib/wee/adaptors/rails_rb.html +101 -0
  118. data/doc/rdoc/files/lib/wee/adaptors/webrick_rb.html +1 -1
  119. data/doc/rdoc/files/lib/wee/application_rb.html +1 -1
  120. data/doc/rdoc/files/lib/wee/components/component_dispatcher_rb.html +108 -0
  121. data/doc/rdoc/files/lib/wee/components/form_decoration_rb.html +1 -1
  122. data/doc/rdoc/files/lib/wee/components/login_decoration_rb.html +101 -0
  123. data/doc/rdoc/files/lib/wee/components/messagebox_rb.html +1 -1
  124. data/doc/rdoc/files/lib/wee/components/page_decoration_rb.html +1 -1
  125. data/doc/rdoc/files/lib/wee/components/pager_rb.html +101 -0
  126. data/doc/rdoc/files/lib/wee/components/wrapper_decoration_rb.html +1 -1
  127. data/doc/rdoc/files/lib/wee/components_rb.html +4 -1
  128. data/doc/rdoc/files/lib/wee/continuation/core/component_rb.html +1 -1
  129. data/doc/rdoc/files/lib/wee/continuation/session_rb.html +1 -1
  130. data/doc/rdoc/files/lib/wee/continuation_rb.html +1 -1
  131. data/doc/rdoc/files/lib/wee/core/callback_rb.html +1 -1
  132. data/doc/rdoc/files/lib/wee/core/component_rb.html +1 -1
  133. data/doc/rdoc/files/lib/wee/core/componentrunner_rb.html +110 -0
  134. data/doc/rdoc/files/lib/wee/core/context_rb.html +101 -0
  135. data/doc/rdoc/files/lib/wee/core/decoration_rb.html +1 -1
  136. data/doc/rdoc/files/lib/wee/core/idgen_rb.html +101 -0
  137. data/doc/rdoc/files/lib/wee/core/page_rb.html +101 -0
  138. data/doc/rdoc/files/lib/wee/core/presenter_rb.html +1 -1
  139. data/doc/rdoc/files/lib/wee/core/renderer_rb.html +107 -0
  140. data/doc/rdoc/files/lib/wee/core/snapshot_rb.html +1 -1
  141. data/doc/rdoc/files/lib/wee/core/valueholder_rb.html +2 -2
  142. data/doc/rdoc/files/lib/wee/core_ext_rb.html +101 -0
  143. data/doc/rdoc/files/lib/wee/core_rb.html +7 -14
  144. data/doc/rdoc/files/lib/wee/databases/og/application_rb.html +1 -1
  145. data/doc/rdoc/files/lib/wee/databases/og/old_scaffolder_rb.html +1 -1
  146. data/doc/rdoc/files/lib/wee/databases/og/scaffolder_rb.html +1 -1
  147. data/doc/rdoc/files/lib/wee/databases/og/session_rb.html +1 -1
  148. data/doc/rdoc/files/lib/wee/databases/og_rb.html +1 -1
  149. data/doc/rdoc/files/lib/wee/examples/calculator_rb.html +107 -0
  150. data/doc/rdoc/files/lib/wee/examples/counter_rb.html +101 -0
  151. data/doc/rdoc/files/lib/wee/examples/editable_counter_rb.html +114 -0
  152. data/doc/rdoc/files/lib/wee/examples/window_rb.html +101 -0
  153. data/doc/rdoc/files/lib/wee/idgen/md5_rb.html +1 -1
  154. data/doc/rdoc/files/lib/wee/idgen/simple_rb.html +1 -1
  155. data/doc/rdoc/files/lib/wee/page_rb.html +1 -1
  156. data/doc/rdoc/files/lib/wee/pageless/application_rb.html +8 -1
  157. data/doc/rdoc/files/lib/wee/pageless/request_rb.html +1 -1
  158. data/doc/rdoc/files/lib/wee/pageless/session_rb.html +2 -1
  159. data/doc/rdoc/files/lib/wee/pageless_rb.html +1 -1
  160. data/doc/rdoc/files/lib/wee/renderer/html/brushes_rb.html +1 -1
  161. data/doc/rdoc/files/lib/wee/renderer/html/canvas_rb.html +1 -1
  162. data/doc/rdoc/files/lib/wee/renderer/html/writer_rb.html +1 -1
  163. data/doc/rdoc/files/lib/wee/request_rb.html +5 -4
  164. data/doc/rdoc/files/lib/wee/requesthandler_rb.html +1 -1
  165. data/doc/rdoc/files/lib/wee/response_rb.html +2 -1
  166. data/doc/rdoc/files/lib/wee/session_rb.html +2 -3
  167. data/doc/rdoc/files/lib/wee/skeleton/og/components/main_rb.html +1 -1
  168. data/doc/rdoc/files/lib/wee/skeleton/og/conf/db_rb.html +2 -2
  169. data/doc/rdoc/files/lib/wee/skeleton/og/models/recipe_rb.html +1 -1
  170. data/doc/rdoc/files/lib/wee/skeleton/og/run_rb.html +1 -1
  171. data/doc/rdoc/files/lib/wee/skeleton/simple/components/main_rb.html +1 -1
  172. data/doc/rdoc/files/lib/wee/skeleton/simple/run_rb.html +1 -1
  173. data/doc/rdoc/files/lib/wee/snapshot_ext_rb.html +1 -1
  174. data/doc/rdoc/files/lib/wee/template_rb.html +1 -1
  175. data/doc/rdoc/files/lib/wee/utils/autoreload_rb.html +1 -1
  176. data/doc/rdoc/files/lib/wee/utils/cache_rb.html +1 -1
  177. data/doc/rdoc/files/lib/wee/utils/helper_rb.html +1 -1
  178. data/doc/rdoc/files/lib/wee/utils_rb.html +1 -1
  179. data/doc/rdoc/files/lib/wee_rb.html +5 -3
  180. data/doc/rdoc/fr_class_index.html +34 -2
  181. data/doc/rdoc/fr_file_index.html +17 -1
  182. data/doc/rdoc/fr_method_index.html +464 -314
  183. data/examples/ajax/ajax.rb +1 -1
  184. data/examples/demo.rb +47 -0
  185. data/examples/{calendar.rb → demo/calendar.rb} +89 -97
  186. data/examples/{example.rb → demo/example.rb} +17 -97
  187. data/examples/dispatcher.rb +37 -0
  188. data/examples/draw.rb +14 -11
  189. data/examples/nitro/run.rb +42 -0
  190. data/examples/radio.rb +44 -0
  191. data/examples/test.rb +3 -27
  192. data/lib/wee.rb +15 -3
  193. data/lib/wee/adaptors/nitro.rb +154 -0
  194. data/lib/wee/adaptors/rails.rb +154 -0
  195. data/lib/wee/application.rb +22 -20
  196. data/lib/wee/components.rb +3 -0
  197. data/lib/wee/components/component_dispatcher.rb +46 -0
  198. data/lib/wee/components/login_decoration.rb +35 -0
  199. data/lib/wee/components/messagebox.rb +2 -2
  200. data/lib/wee/components/pager.rb +102 -0
  201. data/lib/wee/continuation/core/component.rb +13 -12
  202. data/lib/wee/continuation/session.rb +11 -19
  203. data/lib/wee/core.rb +8 -7
  204. data/lib/wee/core/component.rb +8 -28
  205. data/lib/wee/core/componentrunner.rb +73 -0
  206. data/lib/wee/core/context.rb +27 -0
  207. data/lib/wee/core/idgen.rb +5 -0
  208. data/lib/wee/core/page.rb +1 -0
  209. data/lib/wee/core/presenter.rb +10 -126
  210. data/lib/wee/core/renderer.rb +23 -0
  211. data/lib/wee/core_ext.rb +122 -0
  212. data/lib/wee/databases/og/scaffolder.rb +0 -1
  213. data/lib/wee/examples/calculator.rb +70 -0
  214. data/lib/wee/examples/counter.rb +33 -0
  215. data/lib/wee/examples/editable_counter.rb +31 -0
  216. data/{examples → lib/wee/examples}/window.rb +29 -23
  217. data/lib/wee/idgen/md5.rb +1 -1
  218. data/lib/wee/idgen/simple.rb +1 -1
  219. data/lib/wee/pageless/session.rb +2 -3
  220. data/lib/wee/renderer/html/brushes.rb +142 -22
  221. data/lib/wee/renderer/html/canvas.rb +57 -19
  222. data/lib/wee/response.rb +3 -2
  223. data/lib/wee/session.rb +10 -54
  224. data/lib/wee/skeleton/og/components/main.rb +5 -1
  225. data/lib/wee/skeleton/og/conf/db.rb +1 -1
  226. data/lib/wee/snapshot_ext.rb +4 -10
  227. data/lib/wee/template.rb +19 -5
  228. data/lib/wee/utils/helper.rb +2 -2
  229. metadata +90 -13
  230. data/examples/calculator.rb +0 -67
  231. data/lib/wee/context.rb +0 -2
@@ -84,19 +84,18 @@
84
84
 
85
85
  </div>
86
86
 
87
- <div id="method-list">
88
- <h3 class="section-bar">Methods</h3>
89
-
90
- <div class="name-list">
91
- <a href="#M000080">restore_snapshot</a>&nbsp;&nbsp;
92
- <a href="#M000079">take_snapshot</a>&nbsp;&nbsp;
93
- </div>
94
- </div>
95
87
 
96
88
  </div>
97
89
 
98
90
 
99
91
  <!-- if includes -->
92
+ <div id="includes">
93
+ <h3 class="section-bar">Included Modules</h3>
94
+
95
+ <div id="includes-list">
96
+ <span class="include-name"><a href="Wee/DupReplaceSnapshotMixin.html">Wee::DupReplaceSnapshotMixin</a></span>
97
+ </div>
98
+ </div>
100
99
 
101
100
  <div id="section">
102
101
 
@@ -108,57 +107,6 @@
108
107
 
109
108
 
110
109
  <!-- if method_list -->
111
- <div id="methods">
112
- <h3 class="section-bar">Public Instance methods</h3>
113
-
114
- <div id="method-M000080" class="method-detail">
115
- <a name="M000080"></a>
116
-
117
- <div class="method-heading">
118
- <a href="#M000080" class="method-signature">
119
- <span class="method-name">restore_snapshot</span><span class="method-args">(snap)</span>
120
- </a>
121
- </div>
122
-
123
- <div class="method-description">
124
- <p><a class="source-toggle" href="#"
125
- onclick="toggleCode('M000080-source');return false;">[Source]</a></p>
126
- <div class="method-source-code" id="M000080-source">
127
- <pre>
128
- <span class="ruby-comment cmt"># File lib/wee/snapshot_ext.rb, line 32</span>
129
- <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">restore_snapshot</span>(<span class="ruby-identifier">snap</span>)
130
- <span class="ruby-identifier">replace</span>(<span class="ruby-identifier">snap</span>)
131
- <span class="ruby-keyword kw">end</span>
132
- </pre>
133
- </div>
134
- </div>
135
- </div>
136
-
137
- <div id="method-M000079" class="method-detail">
138
- <a name="M000079"></a>
139
-
140
- <div class="method-heading">
141
- <a href="#M000079" class="method-signature">
142
- <span class="method-name">take_snapshot</span><span class="method-args">()</span>
143
- </a>
144
- </div>
145
-
146
- <div class="method-description">
147
- <p><a class="source-toggle" href="#"
148
- onclick="toggleCode('M000079-source');return false;">[Source]</a></p>
149
- <div class="method-source-code" id="M000079-source">
150
- <pre>
151
- <span class="ruby-comment cmt"># File lib/wee/snapshot_ext.rb, line 28</span>
152
- <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">take_snapshot</span>
153
- <span class="ruby-identifier">dup</span>
154
- <span class="ruby-keyword kw">end</span>
155
- </pre>
156
- </div>
157
- </div>
158
- </div>
159
-
160
-
161
- </div>
162
110
 
163
111
 
164
112
  </div>
@@ -88,8 +88,8 @@
88
88
  <h3 class="section-bar">Methods</h3>
89
89
 
90
90
  <div class="name-list">
91
- <a href="#M000009">restore_snapshot</a>&nbsp;&nbsp;
92
- <a href="#M000008">take_snapshot</a>&nbsp;&nbsp;
91
+ <a href="#M000010">restore_snapshot</a>&nbsp;&nbsp;
92
+ <a href="#M000009">take_snapshot</a>&nbsp;&nbsp;
93
93
  </div>
94
94
  </div>
95
95
 
@@ -111,21 +111,21 @@
111
111
  <div id="methods">
112
112
  <h3 class="section-bar">Public Instance methods</h3>
113
113
 
114
- <div id="method-M000009" class="method-detail">
115
- <a name="M000009"></a>
114
+ <div id="method-M000010" class="method-detail">
115
+ <a name="M000010"></a>
116
116
 
117
117
  <div class="method-heading">
118
- <a href="#M000009" class="method-signature">
118
+ <a href="#M000010" class="method-signature">
119
119
  <span class="method-name">restore_snapshot</span><span class="method-args">(snap)</span>
120
120
  </a>
121
121
  </div>
122
122
 
123
123
  <div class="method-description">
124
124
  <p><a class="source-toggle" href="#"
125
- onclick="toggleCode('M000009-source');return false;">[Source]</a></p>
126
- <div class="method-source-code" id="M000009-source">
125
+ onclick="toggleCode('M000010-source');return false;">[Source]</a></p>
126
+ <div class="method-source-code" id="M000010-source">
127
127
  <pre>
128
- <span class="ruby-comment cmt"># File lib/wee/snapshot_ext.rb, line 44</span>
128
+ <span class="ruby-comment cmt"># File lib/wee/snapshot_ext.rb, line 38</span>
129
129
  <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">restore_snapshot</span>(<span class="ruby-identifier">snap</span>)
130
130
  <span class="ruby-identifier">snap</span>.<span class="ruby-identifier">each_pair</span> {<span class="ruby-operator">|</span><span class="ruby-identifier">k</span>,<span class="ruby-identifier">v</span><span class="ruby-operator">|</span> <span class="ruby-identifier">send</span>(<span class="ruby-identifier">k</span>.<span class="ruby-identifier">to_s</span> <span class="ruby-operator">+</span> <span class="ruby-value str">&quot;=&quot;</span>, <span class="ruby-identifier">v</span>)}
131
131
  <span class="ruby-keyword kw">end</span>
@@ -134,21 +134,21 @@
134
134
  </div>
135
135
  </div>
136
136
 
137
- <div id="method-M000008" class="method-detail">
138
- <a name="M000008"></a>
137
+ <div id="method-M000009" class="method-detail">
138
+ <a name="M000009"></a>
139
139
 
140
140
  <div class="method-heading">
141
- <a href="#M000008" class="method-signature">
141
+ <a href="#M000009" class="method-signature">
142
142
  <span class="method-name">take_snapshot</span><span class="method-args">()</span>
143
143
  </a>
144
144
  </div>
145
145
 
146
146
  <div class="method-description">
147
147
  <p><a class="source-toggle" href="#"
148
- onclick="toggleCode('M000008-source');return false;">[Source]</a></p>
149
- <div class="method-source-code" id="M000008-source">
148
+ onclick="toggleCode('M000009-source');return false;">[Source]</a></p>
149
+ <div class="method-source-code" id="M000009-source">
150
150
  <pre>
151
- <span class="ruby-comment cmt"># File lib/wee/snapshot_ext.rb, line 38</span>
151
+ <span class="ruby-comment cmt"># File lib/wee/snapshot_ext.rb, line 32</span>
152
152
  <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">take_snapshot</span>
153
153
  <span class="ruby-identifier">snap</span> = <span class="ruby-constant">Hash</span>.<span class="ruby-identifier">new</span>
154
154
  <span class="ruby-identifier">each_pair</span> {<span class="ruby-operator">|</span><span class="ruby-identifier">k</span>,<span class="ruby-identifier">v</span><span class="ruby-operator">|</span> <span class="ruby-identifier">snap</span>[<span class="ruby-identifier">k</span>] = <span class="ruby-identifier">v</span>}
@@ -59,13 +59,17 @@
59
59
  lib/wee.rb
60
60
  </a>
61
61
  <br />
62
- <a href="../files/lib/wee/renderer/html/canvas_rb.html">
63
- lib/wee/renderer/html/canvas.rb
62
+ <a href="../files/lib/wee/core_rb.html">
63
+ lib/wee/core.rb
64
64
  </a>
65
65
  <br />
66
66
  <a href="../files/lib/wee/renderer/html/brushes_rb.html">
67
67
  lib/wee/renderer/html/brushes.rb
68
68
  </a>
69
+ <br />
70
+ <a href="../files/lib/wee/renderer/html/canvas_rb.html">
71
+ lib/wee/renderer/html/canvas.rb
72
+ </a>
69
73
  <br />
70
74
  </td>
71
75
  </tr>
@@ -80,10 +84,23 @@
80
84
 
81
85
  <div id="contextContent">
82
86
 
87
+ <div id="description">
88
+ <p>
89
+ There are no dependencies to outer classes!
90
+ </p>
91
+
92
+ </div>
83
93
 
84
94
 
85
95
  </div>
86
96
 
97
+ <div id="method-list">
98
+ <h3 class="section-bar">Methods</h3>
99
+
100
+ <div class="name-list">
101
+ <a href="#M000078">run</a>&nbsp;&nbsp;
102
+ </div>
103
+ </div>
87
104
 
88
105
  </div>
89
106
 
@@ -95,33 +112,46 @@
95
112
  <div id="class-list">
96
113
  <h3 class="section-bar">Classes and Modules</h3>
97
114
 
98
- Module <a href="Wee/Utils.html" class="link">Wee::Utils</a><br />
115
+ Module <a href="Wee/CanvasMixin.html" class="link">Wee::CanvasMixin</a><br />
116
+ Module <a href="Wee/DupReplaceSnapshotMixin.html" class="link">Wee::DupReplaceSnapshotMixin</a><br />
117
+ Module <a href="Wee/Examples.html" class="link">Wee::Examples</a><br />
118
+ Module <a href="Wee/Nitro.html" class="link">Wee::Nitro</a><br />
119
+ Module <a href="Wee/Rails.html" class="link">Wee::Rails</a><br />
120
+ Module <a href="Wee/Utils.html" class="link">Wee::Utils</a><br />
121
+ Class <a href="Wee/AbstractSession.html" class="link">Wee::AbstractSession</a><br />
99
122
  Class <a href="Wee/AnswerDecoration.html" class="link">Wee::AnswerDecoration</a><br />
100
123
  Class <a href="Wee/Application.html" class="link">Wee::Application</a><br />
101
124
  Class <a href="Wee/Brush.html" class="link">Wee::Brush</a><br />
102
125
  Class <a href="Wee/CallbackRegistry.html" class="link">Wee::CallbackRegistry</a><br />
103
126
  Class <a href="Wee/CallbackStream.html" class="link">Wee::CallbackStream</a><br />
104
- Class <a href="Wee/Canvas.html" class="link">Wee::Canvas</a><br />
105
127
  Class <a href="Wee/Component.html" class="link">Wee::Component</a><br />
128
+ Class <a href="Wee/ComponentDispatcher.html" class="link">Wee::ComponentDispatcher</a><br />
129
+ Class <a href="Wee/ComponentRunner.html" class="link">Wee::ComponentRunner</a><br />
106
130
  Class <a href="Wee/Context.html" class="link">Wee::Context</a><br />
107
131
  Class <a href="Wee/Decoration.html" class="link">Wee::Decoration</a><br />
108
132
  Class <a href="Wee/Delegate.html" class="link">Wee::Delegate</a><br />
109
133
  Class <a href="Wee/ErrorResponse.html" class="link">Wee::ErrorResponse</a><br />
134
+ Class <a href="Wee/FastCGIAdaptor.html" class="link">Wee::FastCGIAdaptor</a><br />
110
135
  Class <a href="Wee/FormDecoration.html" class="link">Wee::FormDecoration</a><br />
111
136
  Class <a href="Wee/GenericResponse.html" class="link">Wee::GenericResponse</a><br />
112
- Class <a href="Wee/HtmlCanvas.html" class="link">Wee::HtmlCanvas</a><br />
137
+ Class <a href="Wee/HtmlCanvasRenderer.html" class="link">Wee::HtmlCanvasRenderer</a><br />
113
138
  Class <a href="Wee/HtmlWriter.html" class="link">Wee::HtmlWriter</a><br />
139
+ Class <a href="Wee/IdGenerator.html" class="link">Wee::IdGenerator</a><br />
114
140
  Class <a href="Wee/LiteralMethodCallback.html" class="link">Wee::LiteralMethodCallback</a><br />
141
+ Class <a href="Wee/LoginDecoration.html" class="link">Wee::LoginDecoration</a><br />
115
142
  Class <a href="Wee/Md5IdGenerator.html" class="link">Wee::Md5IdGenerator</a><br />
116
143
  Class <a href="Wee/MessageBox.html" class="link">Wee::MessageBox</a><br />
117
144
  Class <a href="Wee/Page.html" class="link">Wee::Page</a><br />
118
145
  Class <a href="Wee/PageDecoration.html" class="link">Wee::PageDecoration</a><br />
119
146
  Class <a href="Wee/PagelessApplication.html" class="link">Wee::PagelessApplication</a><br />
147
+ Class <a href="Wee/PagelessComponentDriver.html" class="link">Wee::PagelessComponentDriver</a><br />
120
148
  Class <a href="Wee/PagelessRequest.html" class="link">Wee::PagelessRequest</a><br />
121
149
  Class <a href="Wee/PagelessSession.html" class="link">Wee::PagelessSession</a><br />
150
+ Class <a href="Wee/Pager.html" class="link">Wee::Pager</a><br />
122
151
  Class <a href="Wee/Presenter.html" class="link">Wee::Presenter</a><br />
123
152
  Class <a href="Wee/RedirectResponse.html" class="link">Wee::RedirectResponse</a><br />
124
153
  Class <a href="Wee/RefreshResponse.html" class="link">Wee::RefreshResponse</a><br />
154
+ Class <a href="Wee/Renderer.html" class="link">Wee::Renderer</a><br />
125
155
  Class <a href="Wee/RenderingContext.html" class="link">Wee::RenderingContext</a><br />
126
156
  Class <a href="Wee/Request.html" class="link">Wee::Request</a><br />
127
157
  Class <a href="Wee/RequestHandler.html" class="link">Wee::RequestHandler</a><br />
@@ -143,7 +173,7 @@ Class <a href="Wee/WrapperDecoration.html" class="link">Wee::WrapperDecoration</
143
173
  <tr class="top-aligned-row context-row">
144
174
  <td class="context-item-name">Version</td>
145
175
  <td>=</td>
146
- <td class="context-item-value">&quot;0.6.0&quot;</td>
176
+ <td class="context-item-value">&quot;0.9.0&quot;</td>
147
177
  </tr>
148
178
  <tr class="top-aligned-row context-row">
149
179
  <td class="context-item-name">LibPath</td>
@@ -160,6 +190,40 @@ Class <a href="Wee/WrapperDecoration.html" class="link">Wee::WrapperDecoration</
160
190
 
161
191
 
162
192
  <!-- if method_list -->
193
+ <div id="methods">
194
+ <h3 class="section-bar">Public Class methods</h3>
195
+
196
+ <div id="method-M000078" class="method-detail">
197
+ <a name="M000078"></a>
198
+
199
+ <div class="method-heading">
200
+ <a href="#M000078" class="method-signature">
201
+ <span class="method-name">run</span><span class="method-args">(component, add_page_decoration=true, mount_path='/app')</span>
202
+ </a>
203
+ </div>
204
+
205
+ <div class="method-description">
206
+ <p><a class="source-toggle" href="#"
207
+ onclick="toggleCode('M000078-source');return false;">[Source]</a></p>
208
+ <div class="method-source-code" id="M000078-source">
209
+ <pre>
210
+ <span class="ruby-comment cmt"># File lib/wee.rb, line 30</span>
211
+ <span class="ruby-keyword kw">def</span> <span class="ruby-constant">Wee</span>.<span class="ruby-identifier">run</span>(<span class="ruby-identifier">component</span>, <span class="ruby-identifier">add_page_decoration</span>=<span class="ruby-keyword kw">true</span>, <span class="ruby-identifier">mount_path</span>=<span class="ruby-value str">'/app'</span>)
212
+ <span class="ruby-identifier">require</span> <span class="ruby-value str">'wee/utils'</span>
213
+ <span class="ruby-identifier">require</span> <span class="ruby-value str">'wee/adaptors/webrick'</span>
214
+
215
+ <span class="ruby-identifier">component</span> = <span class="ruby-identifier">component</span>.<span class="ruby-identifier">new</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">component</span>.<span class="ruby-identifier">kind_of?</span>(<span class="ruby-constant">Class</span>)
216
+ <span class="ruby-identifier">component</span>.<span class="ruby-identifier">add_decoration</span>(<span class="ruby-constant">Wee</span><span class="ruby-operator">::</span><span class="ruby-constant">PageDecoration</span>.<span class="ruby-identifier">new</span>(<span class="ruby-value str">'Welcome to Wee!'</span>)) <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">add_page_decoration</span>
217
+ <span class="ruby-identifier">component</span>.<span class="ruby-identifier">add_decoration</span>(<span class="ruby-constant">Wee</span><span class="ruby-operator">::</span><span class="ruby-constant">FormDecoration</span>.<span class="ruby-identifier">new</span>)
218
+ <span class="ruby-constant">Wee</span><span class="ruby-operator">::</span><span class="ruby-constant">WEBrickAdaptor</span>.<span class="ruby-identifier">register</span>(<span class="ruby-identifier">mount_path</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-constant">Wee</span><span class="ruby-operator">::</span><span class="ruby-constant">Utils</span>.<span class="ruby-identifier">app_for</span> { <span class="ruby-identifier">component</span> }).<span class="ruby-identifier">start</span>
219
+ <span class="ruby-keyword kw">end</span>
220
+ </pre>
221
+ </div>
222
+ </div>
223
+ </div>
224
+
225
+
226
+ </div>
163
227
 
164
228
 
165
229
  </div>
@@ -0,0 +1,502 @@
1
+ <?xml version="1.0" encoding="iso-8859-1"?>
2
+ <!DOCTYPE html
3
+ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
4
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
5
+
6
+ <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
7
+ <head>
8
+ <title>Class: Wee::AbstractSession</title>
9
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
10
+ <meta http-equiv="Content-Script-Type" content="text/javascript" />
11
+ <link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
12
+ <script type="text/javascript">
13
+ // <![CDATA[
14
+
15
+ function popupCode( url ) {
16
+ window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
17
+ }
18
+
19
+ function toggleCode( id ) {
20
+ if ( document.getElementById )
21
+ elem = document.getElementById( id );
22
+ else if ( document.all )
23
+ elem = eval( "document.all." + id );
24
+ else
25
+ return false;
26
+
27
+ elemStyle = elem.style;
28
+
29
+ if ( elemStyle.display != "block" ) {
30
+ elemStyle.display = "block"
31
+ } else {
32
+ elemStyle.display = "none"
33
+ }
34
+
35
+ return true;
36
+ }
37
+
38
+ // Make codeblocks hidden by default
39
+ document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
40
+
41
+ // ]]>
42
+ </script>
43
+
44
+ </head>
45
+ <body>
46
+
47
+
48
+
49
+ <div id="classHeader">
50
+ <table class="header-table">
51
+ <tr class="top-aligned-row">
52
+ <td><strong>Class</strong></td>
53
+ <td class="class-name-in-header">Wee::AbstractSession</td>
54
+ </tr>
55
+ <tr class="top-aligned-row">
56
+ <td><strong>In:</strong></td>
57
+ <td>
58
+ <a href="../../files/lib/wee/abstractsession_rb.html">
59
+ lib/wee/abstractsession.rb
60
+ </a>
61
+ <br />
62
+ <a href="../../files/lib/wee/continuation/session_rb.html">
63
+ lib/wee/continuation/session.rb
64
+ </a>
65
+ <br />
66
+ </td>
67
+ </tr>
68
+
69
+ <tr class="top-aligned-row">
70
+ <td><strong>Parent:</strong></td>
71
+ <td>
72
+ <a href="RequestHandler.html">
73
+ Wee::RequestHandler
74
+ </a>
75
+ </td>
76
+ </tr>
77
+ </table>
78
+ </div>
79
+ <!-- banner header -->
80
+
81
+ <div id="bodyContent">
82
+
83
+
84
+
85
+ <div id="contextContent">
86
+
87
+
88
+
89
+ <div id="contents-list">
90
+ <h3 class="section-bar">Contents</h3>
91
+ <ul>
92
+ <li><a href="#SEC00039">Properties</a></li>
93
+ </ul>
94
+ </div>
95
+
96
+ <div id="method-list">
97
+ <h3 class="section-bar">Methods</h3>
98
+
99
+ <div class="name-list">
100
+ <a href="#M000408">awake</a>&nbsp;&nbsp;
101
+ <a href="#M000403">current</a>&nbsp;&nbsp;
102
+ <a href="#M000405">current_context</a>&nbsp;&nbsp;
103
+ <a href="#M000413">get_property</a>&nbsp;&nbsp;
104
+ <a href="#M000406">handle_request</a>&nbsp;&nbsp;
105
+ <a href="#M000414">handle_request</a>&nbsp;&nbsp;
106
+ <a href="#M000404">new</a>&nbsp;&nbsp;
107
+ <a href="#M000411">properties</a>&nbsp;&nbsp;
108
+ <a href="#M000412">properties=</a>&nbsp;&nbsp;
109
+ <a href="#M000407">set_response</a>&nbsp;&nbsp;
110
+ <a href="#M000409">sleep</a>&nbsp;&nbsp;
111
+ <a href="#M000410">with_session</a>&nbsp;&nbsp;
112
+ </div>
113
+ </div>
114
+
115
+ </div>
116
+
117
+
118
+ <!-- if includes -->
119
+
120
+ <div id="section">
121
+
122
+
123
+
124
+
125
+
126
+
127
+
128
+
129
+ <!-- if method_list -->
130
+ <div id="methods">
131
+ <h3 class="section-bar">Public Class methods</h3>
132
+
133
+ <div id="method-M000403" class="method-detail">
134
+ <a name="M000403"></a>
135
+
136
+ <div class="method-heading">
137
+ <a href="#M000403" class="method-signature">
138
+ <span class="method-name">current</span><span class="method-args">()</span>
139
+ </a>
140
+ </div>
141
+
142
+ <div class="method-description">
143
+ <p><a class="source-toggle" href="#"
144
+ onclick="toggleCode('M000403-source');return false;">[Source]</a></p>
145
+ <div class="method-source-code" id="M000403-source">
146
+ <pre>
147
+ <span class="ruby-comment cmt"># File lib/wee/abstractsession.rb, line 5</span>
148
+ <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">current</span>
149
+ <span class="ruby-constant">Thread</span>.<span class="ruby-identifier">current</span>[<span class="ruby-identifier">:wee_session</span>] <span class="ruby-operator">||</span> (<span class="ruby-identifier">raise</span> <span class="ruby-value str">&quot;Not in session&quot;</span>)
150
+ <span class="ruby-keyword kw">end</span>
151
+ </pre>
152
+ </div>
153
+ </div>
154
+ </div>
155
+
156
+ <div id="method-M000404" class="method-detail">
157
+ <a name="M000404"></a>
158
+
159
+ <div class="method-heading">
160
+ <a href="#M000404" class="method-signature">
161
+ <span class="method-name">new</span><span class="method-args">()</span>
162
+ </a>
163
+ </div>
164
+
165
+ <div class="method-description">
166
+ <p><a class="source-toggle" href="#"
167
+ onclick="toggleCode('M000404-source');return false;">[Source]</a></p>
168
+ <div class="method-source-code" id="M000404-source">
169
+ <pre>
170
+ <span class="ruby-comment cmt"># File lib/wee/abstractsession.rb, line 9</span>
171
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>
172
+ <span class="ruby-comment cmt"># to serialize the requests we need a mutex</span>
173
+ <span class="ruby-ivar">@mutex</span> = <span class="ruby-constant">Mutex</span>.<span class="ruby-identifier">new</span>
174
+
175
+ <span class="ruby-keyword kw">super</span>()
176
+ <span class="ruby-keyword kw">end</span>
177
+ </pre>
178
+ </div>
179
+ </div>
180
+ </div>
181
+
182
+ <h3 class="section-bar">Public Instance methods</h3>
183
+
184
+ <div id="method-M000405" class="method-detail">
185
+ <a name="M000405"></a>
186
+
187
+ <div class="method-heading">
188
+ <a href="#M000405" class="method-signature">
189
+ <span class="method-name">current_context</span><span class="method-args">()</span>
190
+ </a>
191
+ </div>
192
+
193
+ <div class="method-description">
194
+ <p>
195
+ Returns the current context.
196
+ </p>
197
+ <p><a class="source-toggle" href="#"
198
+ onclick="toggleCode('M000405-source');return false;">[Source]</a></p>
199
+ <div class="method-source-code" id="M000405-source">
200
+ <pre>
201
+ <span class="ruby-comment cmt"># File lib/wee/abstractsession.rb, line 18</span>
202
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">current_context</span>
203
+ <span class="ruby-ivar">@context</span>
204
+ <span class="ruby-keyword kw">end</span>
205
+ </pre>
206
+ </div>
207
+ </div>
208
+ </div>
209
+
210
+ <div id="method-M000406" class="method-detail">
211
+ <a name="M000406"></a>
212
+
213
+ <div class="method-heading">
214
+ <a href="#M000406" class="method-signature">
215
+ <span class="method-name">handle_request</span><span class="method-args">(context)</span>
216
+ </a>
217
+ </div>
218
+
219
+ <div class="method-description">
220
+ <p>
221
+ Called by <a href="Application.html">Wee::Application</a> to send the
222
+ session a request.
223
+ </p>
224
+ <p><a class="source-toggle" href="#"
225
+ onclick="toggleCode('M000406-source');return false;">[Source]</a></p>
226
+ <div class="method-source-code" id="M000406-source">
227
+ <pre>
228
+ <span class="ruby-comment cmt"># File lib/wee/abstractsession.rb, line 24</span>
229
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">handle_request</span>(<span class="ruby-identifier">context</span>)
230
+ <span class="ruby-identifier">with_session</span> {
231
+ <span class="ruby-ivar">@mutex</span>.<span class="ruby-identifier">synchronize</span> {
232
+ <span class="ruby-keyword kw">begin</span>
233
+ <span class="ruby-ivar">@context</span> = <span class="ruby-identifier">context</span>
234
+ <span class="ruby-keyword kw">super</span>
235
+ <span class="ruby-identifier">awake</span>
236
+ <span class="ruby-identifier">process_request</span>
237
+ <span class="ruby-identifier">sleep</span>
238
+ <span class="ruby-keyword kw">ensure</span>
239
+ <span class="ruby-ivar">@context</span> = <span class="ruby-keyword kw">nil</span> <span class="ruby-comment cmt"># clean up</span>
240
+ <span class="ruby-keyword kw">end</span>
241
+ }
242
+ }
243
+ <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>
244
+ <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>))
245
+ <span class="ruby-keyword kw">end</span>
246
+ </pre>
247
+ </div>
248
+ </div>
249
+ </div>
250
+
251
+ <h3 class="section-bar">Protected Instance methods</h3>
252
+
253
+ <div id="method-M000408" class="method-detail">
254
+ <a name="M000408"></a>
255
+
256
+ <div class="method-heading">
257
+ <a href="#M000408" class="method-signature">
258
+ <span class="method-name">awake</span><span class="method-args">()</span>
259
+ </a>
260
+ </div>
261
+
262
+ <div class="method-description">
263
+ <p>
264
+ Is called before process_request is invoked. Can be used to setup e.g. a
265
+ database connection.
266
+ </p>
267
+ <p>
268
+ OVERWRITE IT (if you like)!
269
+ </p>
270
+ <p><a class="source-toggle" href="#"
271
+ onclick="toggleCode('M000408-source');return false;">[Source]</a></p>
272
+ <div class="method-source-code" id="M000408-source">
273
+ <pre>
274
+ <span class="ruby-comment cmt"># File lib/wee/abstractsession.rb, line 55</span>
275
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">awake</span>
276
+ <span class="ruby-keyword kw">end</span>
277
+ </pre>
278
+ </div>
279
+ </div>
280
+ </div>
281
+
282
+ <div id="method-M000407" class="method-detail">
283
+ <a name="M000407"></a>
284
+
285
+ <div class="method-heading">
286
+ <a href="#M000407" class="method-signature">
287
+ <span class="method-name">set_response</span><span class="method-args">(context, response)</span>
288
+ </a>
289
+ </div>
290
+
291
+ <div class="method-description">
292
+ <p><a class="source-toggle" href="#"
293
+ onclick="toggleCode('M000407-source');return false;">[Source]</a></p>
294
+ <div class="method-source-code" id="M000407-source">
295
+ <pre>
296
+ <span class="ruby-comment cmt"># File lib/wee/abstractsession.rb, line 44</span>
297
+ <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>)
298
+ <span class="ruby-identifier">context</span>.<span class="ruby-identifier">response</span> = <span class="ruby-identifier">response</span>
299
+ <span class="ruby-keyword kw">end</span>
300
+ </pre>
301
+ </div>
302
+ </div>
303
+ </div>
304
+
305
+ <div id="method-M000409" class="method-detail">
306
+ <a name="M000409"></a>
307
+
308
+ <div class="method-heading">
309
+ <a href="#M000409" class="method-signature">
310
+ <span class="method-name">sleep</span><span class="method-args">()</span>
311
+ </a>
312
+ </div>
313
+
314
+ <div class="method-description">
315
+ <p>
316
+ Is called after process_request is run. Can be used to release e.g. a
317
+ database connection.
318
+ </p>
319
+ <p>
320
+ OVERWRITE IT (if you like)!
321
+ </p>
322
+ <p><a class="source-toggle" href="#"
323
+ onclick="toggleCode('M000409-source');return false;">[Source]</a></p>
324
+ <div class="method-source-code" id="M000409-source">
325
+ <pre>
326
+ <span class="ruby-comment cmt"># File lib/wee/abstractsession.rb, line 63</span>
327
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">sleep</span>
328
+ <span class="ruby-keyword kw">end</span>
329
+ </pre>
330
+ </div>
331
+ </div>
332
+ </div>
333
+
334
+ <h3 class="section-bar">Private Instance methods</h3>
335
+
336
+ <div id="method-M000410" class="method-detail">
337
+ <a name="M000410"></a>
338
+
339
+ <div class="method-heading">
340
+ <a href="#M000410" class="method-signature">
341
+ <span class="method-name">with_session</span><span class="method-args">() {|| ...}</span>
342
+ </a>
343
+ </div>
344
+
345
+ <div class="method-description">
346
+ <p>
347
+ The block is run inside a session.
348
+ </p>
349
+ <p><a class="source-toggle" href="#"
350
+ onclick="toggleCode('M000410-source');return false;">[Source]</a></p>
351
+ <div class="method-source-code" id="M000410-source">
352
+ <pre>
353
+ <span class="ruby-comment cmt"># File lib/wee/abstractsession.rb, line 70</span>
354
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">with_session</span>
355
+ <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>
356
+ <span class="ruby-keyword kw">yield</span>
357
+ <span class="ruby-keyword kw">ensure</span>
358
+ <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>
359
+ <span class="ruby-keyword kw">end</span>
360
+ </pre>
361
+ </div>
362
+ </div>
363
+ </div>
364
+
365
+
366
+ </div>
367
+ <div id="section">
368
+ <h2 class="section-title"><a name="SEC00039">Properties</a></h2>
369
+ <div class="section-comment">
370
+
371
+ </div>
372
+
373
+
374
+
375
+
376
+
377
+
378
+
379
+
380
+ <!-- if method_list -->
381
+ <div id="methods">
382
+ <h3 class="section-bar">Public Instance methods</h3>
383
+
384
+ <div id="method-M000413" class="method-detail">
385
+ <a name="M000413"></a>
386
+
387
+ <div class="method-heading">
388
+ <a href="#M000413" class="method-signature">
389
+ <span class="method-name">get_property</span><span class="method-args">(prop, klass)</span>
390
+ </a>
391
+ </div>
392
+
393
+ <div class="method-description">
394
+ <p>
395
+ Returns an &quot;owned&quot; property for the given <tt>klass</tt>.
396
+ </p>
397
+ <p><a class="source-toggle" href="#"
398
+ onclick="toggleCode('M000413-source');return false;">[Source]</a></p>
399
+ <div class="method-source-code" id="M000413-source">
400
+ <pre>
401
+ <span class="ruby-comment cmt"># File lib/wee/abstractsession.rb, line 88</span>
402
+ <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>)
403
+ <span class="ruby-keyword kw">if</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">properties</span>
404
+ <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">properties</span>.<span class="ruby-identifier">fetch</span>(<span class="ruby-identifier">klass</span>, {})[<span class="ruby-identifier">prop</span>]
405
+ <span class="ruby-keyword kw">else</span>
406
+ <span class="ruby-keyword kw">nil</span>
407
+ <span class="ruby-keyword kw">end</span>
408
+ <span class="ruby-keyword kw">end</span>
409
+ </pre>
410
+ </div>
411
+ </div>
412
+ </div>
413
+
414
+ <div id="method-M000414" class="method-detail">
415
+ <a name="M000414"></a>
416
+
417
+ <div class="method-heading">
418
+ <a href="#M000414" class="method-signature">
419
+ <span class="method-name">handle_request</span><span class="method-args">(context)</span>
420
+ </a>
421
+ </div>
422
+
423
+ <div class="method-description">
424
+ <p>
425
+ Called by <a href="Application.html">Wee::Application</a> to send the
426
+ session a request.
427
+ </p>
428
+ <p><a class="source-toggle" href="#"
429
+ onclick="toggleCode('M000414-source');return false;">[Source]</a></p>
430
+ <div class="method-source-code" id="M000414-source">
431
+ <pre>
432
+ <span class="ruby-comment cmt"># File lib/wee/continuation/session.rb, line 7</span>
433
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">handle_request</span>(<span class="ruby-identifier">context</span>)
434
+ <span class="ruby-keyword kw">super</span>
435
+
436
+ <span class="ruby-comment cmt"># Send a request to the session. If the session is currently busy</span>
437
+ <span class="ruby-comment cmt"># processing another request, this will block. </span>
438
+ <span class="ruby-ivar">@in_queue</span>.<span class="ruby-identifier">push</span>(<span class="ruby-identifier">context</span>)
439
+
440
+ <span class="ruby-comment cmt"># Wait for the response.</span>
441
+ <span class="ruby-keyword kw">return</span> <span class="ruby-ivar">@out_queue</span>.<span class="ruby-identifier">pop</span>
442
+ <span class="ruby-keyword kw">end</span>
443
+ </pre>
444
+ </div>
445
+ </div>
446
+ </div>
447
+
448
+ <div id="method-M000411" class="method-detail">
449
+ <a name="M000411"></a>
450
+
451
+ <div class="method-heading">
452
+ <a href="#M000411" class="method-signature">
453
+ <span class="method-name">properties</span><span class="method-args">()</span>
454
+ </a>
455
+ </div>
456
+
457
+ <div class="method-description">
458
+ <p><a class="source-toggle" href="#"
459
+ onclick="toggleCode('M000411-source');return false;">[Source]</a></p>
460
+ <div class="method-source-code" id="M000411-source">
461
+ <pre>
462
+ <span class="ruby-comment cmt"># File lib/wee/abstractsession.rb, line 83</span>
463
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">properties</span>() <span class="ruby-ivar">@__properties</span> <span class="ruby-keyword kw">end</span>
464
+ </pre>
465
+ </div>
466
+ </div>
467
+ </div>
468
+
469
+ <div id="method-M000412" class="method-detail">
470
+ <a name="M000412"></a>
471
+
472
+ <div class="method-heading">
473
+ <a href="#M000412" class="method-signature">
474
+ <span class="method-name">properties=</span><span class="method-args">(props)</span>
475
+ </a>
476
+ </div>
477
+
478
+ <div class="method-description">
479
+ <p><a class="source-toggle" href="#"
480
+ onclick="toggleCode('M000412-source');return false;">[Source]</a></p>
481
+ <div class="method-source-code" id="M000412-source">
482
+ <pre>
483
+ <span class="ruby-comment cmt"># File lib/wee/abstractsession.rb, line 84</span>
484
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">properties=</span>(<span class="ruby-identifier">props</span>) <span class="ruby-ivar">@__properties</span> = <span class="ruby-identifier">props</span> <span class="ruby-keyword kw">end</span>
485
+ </pre>
486
+ </div>
487
+ </div>
488
+ </div>
489
+
490
+
491
+ </div>
492
+
493
+
494
+ </div>
495
+
496
+
497
+ <div id="validator-badges">
498
+ <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
499
+ </div>
500
+
501
+ </body>
502
+ </html>