wee 0.3.1 → 0.4.0
Sign up to get free protection for your applications and to get access to all the features.
- data/README +0 -1
- data/Rakefile +5 -0
- data/TODO +6 -0
- data/doc/rdoc/classes/Enumerable.html +6 -6
- data/doc/rdoc/classes/Wee/AnswerDecoration.html +10 -10
- data/doc/rdoc/classes/Wee/Application.html +110 -52
- data/doc/rdoc/classes/Wee/Brush/ActionCallbackMixin.html +8 -15
- data/doc/rdoc/classes/Wee/Brush/ActionURLCallbackMixin.html +8 -19
- data/doc/rdoc/classes/Wee/Brush/AnchorTag.html +22 -22
- data/doc/rdoc/classes/Wee/Brush/FileUploadTag.html +156 -0
- data/doc/rdoc/classes/Wee/Brush/FormTag.html +50 -25
- data/doc/rdoc/classes/Wee/Brush/GenericEncodedTextBrush.html +12 -12
- data/doc/rdoc/classes/Wee/Brush/GenericTagBrush.html +36 -36
- data/doc/rdoc/classes/Wee/Brush/GenericTextBrush.html +12 -12
- data/doc/rdoc/classes/Wee/Brush/ImageButtonTag.html +16 -16
- data/doc/rdoc/classes/Wee/Brush/InputCallbackMixin.html +8 -15
- data/doc/rdoc/classes/Wee/Brush/InputTag.html +12 -12
- data/doc/rdoc/classes/Wee/Brush/Page.html +14 -14
- data/doc/rdoc/classes/Wee/Brush/SelectListTag.html +28 -28
- data/doc/rdoc/classes/Wee/Brush/SelectOptionTag.html +14 -14
- data/doc/rdoc/classes/Wee/Brush/SubmitButtonTag.html +7 -7
- data/doc/rdoc/classes/Wee/Brush/TableDataTag.html +14 -14
- data/doc/rdoc/classes/Wee/Brush/TableHeaderTag.html +7 -7
- data/doc/rdoc/classes/Wee/Brush/TableRowTag.html +36 -36
- data/doc/rdoc/classes/Wee/Brush/TableTag.html +6 -6
- data/doc/rdoc/classes/Wee/Brush/TextAreaTag.html +28 -28
- data/doc/rdoc/classes/Wee/Brush/TextInputTag.html +7 -7
- data/doc/rdoc/classes/Wee/Brush.html +19 -19
- data/doc/rdoc/classes/Wee/CallbackRegistry.html +33 -33
- data/doc/rdoc/classes/Wee/CallbackStream.html +18 -18
- data/doc/rdoc/classes/Wee/Canvas.html +24 -24
- data/doc/rdoc/classes/Wee/Component.html +163 -138
- data/doc/rdoc/classes/Wee/Decoration.html +72 -41
- data/doc/rdoc/classes/Wee/Delegate.html +31 -31
- data/doc/rdoc/classes/Wee/ErrorResponse.html +12 -12
- data/doc/rdoc/classes/Wee/GenericResponse.html +6 -6
- data/doc/rdoc/classes/Wee/Helper.html +148 -0
- data/doc/rdoc/classes/Wee/HtmlCanvas.html +267 -166
- data/doc/rdoc/classes/Wee/HtmlWriter.html +40 -40
- data/doc/rdoc/classes/Wee/LiteralMethodCallback.html +12 -12
- data/doc/rdoc/classes/Wee/PageDecoration.html +199 -0
- data/doc/rdoc/classes/Wee/Presenter.html +69 -69
- data/doc/rdoc/classes/Wee/RedirectResponse.html +6 -6
- data/doc/rdoc/classes/Wee/RefreshResponse.html +6 -6
- data/doc/rdoc/classes/Wee/Request.html +18 -18
- data/doc/rdoc/classes/Wee/RequestHandler.html +32 -31
- data/doc/rdoc/classes/Wee/Response.html +24 -24
- data/doc/rdoc/classes/Wee/Session.html +83 -64
- data/doc/rdoc/classes/Wee/SimpleIdGenerator.html +18 -18
- data/doc/rdoc/classes/Wee/Snapshot.html +19 -19
- data/doc/rdoc/classes/Wee/Utils/LRUCache.html +6 -6
- data/doc/rdoc/classes/Wee/ValueHolder.html +18 -18
- data/doc/rdoc/classes/Wee/WEBrickAdaptor.html +66 -62
- data/doc/rdoc/classes/Wee.html +63 -2
- data/doc/rdoc/created.rid +1 -1
- data/doc/rdoc/files/README.html +6 -9
- data/doc/rdoc/files/lib/wee/adaptors/webrick_rb.html +1 -1
- data/doc/rdoc/files/lib/wee/application_rb.html +1 -1
- data/doc/rdoc/files/lib/wee/components/page_decoration_rb.html +101 -0
- data/doc/rdoc/files/lib/wee/components_rb.html +108 -0
- data/doc/rdoc/files/lib/wee/core/callback_rb.html +1 -1
- data/doc/rdoc/files/lib/wee/core/component_rb.html +1 -1
- data/doc/rdoc/files/lib/wee/core/decoration_rb.html +1 -1
- data/doc/rdoc/files/lib/wee/core_rb.html +3 -3
- data/doc/rdoc/files/lib/wee/renderer/html/brushes_rb.html +1 -1
- data/doc/rdoc/files/lib/wee/renderer/html/canvas_rb.html +1 -1
- data/doc/rdoc/files/lib/wee/requesthandler_rb.html +1 -1
- data/doc/rdoc/files/lib/wee/session_rb.html +2 -1
- data/doc/rdoc/files/lib/wee/utils/autoreload_rb.html +101 -0
- data/doc/rdoc/files/lib/wee/utils/helper_rb.html +108 -0
- data/doc/rdoc/files/lib/wee_rb.html +2 -1
- data/doc/rdoc/fr_class_index.html +3 -1
- data/doc/rdoc/fr_file_index.html +4 -0
- data/doc/rdoc/fr_method_index.html +203 -191
- data/examples/example.rb +2 -16
- data/examples/test.rb +15 -18
- data/lib/wee/adaptors/webrick.rb +3 -1
- data/lib/wee/application.rb +55 -19
- data/lib/wee/components/page_decoration.rb +14 -0
- data/lib/wee/components.rb +1 -0
- data/lib/wee/core/callback.rb +1 -1
- data/lib/wee/core/component.rb +27 -3
- data/lib/wee/core/decoration.rb +9 -0
- data/lib/wee/renderer/html/brushes.rb +21 -23
- data/lib/wee/renderer/html/canvas.rb +25 -4
- data/lib/wee/requesthandler.rb +1 -0
- data/lib/wee/session.rb +21 -1
- data/lib/wee/utils/autoreload.rb +27 -0
- data/lib/wee/utils/helper.rb +15 -0
- data/lib/wee.rb +2 -1
- metadata +203 -191
- data/test/components/page_decoration.rb +0 -7
@@ -83,9 +83,9 @@
|
|
83
83
|
<div id="description">
|
84
84
|
<p>
|
85
85
|
Abstract base class of all decorations. Forwards the methods <a
|
86
|
-
href="Decoration.html#
|
87
|
-
href="Decoration.html#
|
88
|
-
href="Decoration.html#
|
86
|
+
href="Decoration.html#M000141">process_callbacks</a>, <a
|
87
|
+
href="Decoration.html#M000142">do_render</a> and <a
|
88
|
+
href="Decoration.html#M000143">backtrack_state</a> to the next decoration
|
89
89
|
in the chain. Subclasses should provide special behaviour in these methods,
|
90
90
|
otherwise the decoration does not make sense.
|
91
91
|
</p>
|
@@ -119,7 +119,7 @@ around the decorations or components below itself:
|
|
119
119
|
<div id="contents-list">
|
120
120
|
<h3 class="section-bar">Contents</h3>
|
121
121
|
<ul>
|
122
|
-
<li><a href="#
|
122
|
+
<li><a href="#SEC00078">Snapshot</a></li>
|
123
123
|
</ul>
|
124
124
|
</div>
|
125
125
|
|
@@ -127,11 +127,12 @@ around the decorations or components below itself:
|
|
127
127
|
<h3 class="section-bar">Methods</h3>
|
128
128
|
|
129
129
|
<div class="name-list">
|
130
|
-
<a href="#
|
131
|
-
<a href="#
|
132
|
-
<a href="#
|
133
|
-
<a href="#
|
134
|
-
<a href="#
|
130
|
+
<a href="#M000143">backtrack_state</a>
|
131
|
+
<a href="#M000142">do_render</a>
|
132
|
+
<a href="#M000140">global?</a>
|
133
|
+
<a href="#M000141">process_callbacks</a>
|
134
|
+
<a href="#M000145">restore_snapshot</a>
|
135
|
+
<a href="#M000144">take_snapshot</a>
|
135
136
|
</div>
|
136
137
|
</div>
|
137
138
|
|
@@ -172,11 +173,11 @@ everything "below" itself.
|
|
172
173
|
<div id="methods">
|
173
174
|
<h3 class="section-bar">Public Instance methods</h3>
|
174
175
|
|
175
|
-
<div id="method-
|
176
|
-
<a name="
|
176
|
+
<div id="method-M000143" class="method-detail">
|
177
|
+
<a name="M000143"></a>
|
177
178
|
|
178
179
|
<div class="method-heading">
|
179
|
-
<a href="#
|
180
|
+
<a href="#M000143" class="method-signature">
|
180
181
|
<span class="method-name">backtrack_state</span><span class="method-args">(snapshot)</span>
|
181
182
|
</a>
|
182
183
|
</div>
|
@@ -186,10 +187,10 @@ everything "below" itself.
|
|
186
187
|
Forwards method call to the next decoration in the chain.
|
187
188
|
</p>
|
188
189
|
<p><a class="source-toggle" href="#"
|
189
|
-
onclick="toggleCode('
|
190
|
-
<div class="method-source-code" id="
|
190
|
+
onclick="toggleCode('M000143-source');return false;">[Source]</a></p>
|
191
|
+
<div class="method-source-code" id="M000143-source">
|
191
192
|
<pre>
|
192
|
-
<span class="ruby-comment cmt"># File lib/wee/core/decoration.rb, line
|
193
|
+
<span class="ruby-comment cmt"># File lib/wee/core/decoration.rb, line 59</span>
|
193
194
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">backtrack_state</span>(<span class="ruby-identifier">snapshot</span>)
|
194
195
|
<span class="ruby-ivar">@owner</span>.<span class="ruby-identifier">backtrack_state</span>(<span class="ruby-identifier">snapshot</span>)
|
195
196
|
<span class="ruby-identifier">snapshot</span>.<span class="ruby-identifier">add</span>(<span class="ruby-keyword kw">self</span>)
|
@@ -199,11 +200,11 @@ Forwards method call to the next decoration in the chain.
|
|
199
200
|
</div>
|
200
201
|
</div>
|
201
202
|
|
202
|
-
<div id="method-
|
203
|
-
<a name="
|
203
|
+
<div id="method-M000142" class="method-detail">
|
204
|
+
<a name="M000142"></a>
|
204
205
|
|
205
206
|
<div class="method-heading">
|
206
|
-
<a href="#
|
207
|
+
<a href="#M000142" class="method-signature">
|
207
208
|
<span class="method-name">do_render</span><span class="method-args">(rendering_context)</span>
|
208
209
|
</a>
|
209
210
|
</div>
|
@@ -213,10 +214,10 @@ Forwards method call to the next decoration in the chain.
|
|
213
214
|
Forwards method call to the next decoration in the chain.
|
214
215
|
</p>
|
215
216
|
<p><a class="source-toggle" href="#"
|
216
|
-
onclick="toggleCode('
|
217
|
-
<div class="method-source-code" id="
|
217
|
+
onclick="toggleCode('M000142-source');return false;">[Source]</a></p>
|
218
|
+
<div class="method-source-code" id="M000142-source">
|
218
219
|
<pre>
|
219
|
-
<span class="ruby-comment cmt"># File lib/wee/core/decoration.rb, line
|
220
|
+
<span class="ruby-comment cmt"># File lib/wee/core/decoration.rb, line 53</span>
|
220
221
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">do_render</span>(<span class="ruby-identifier">rendering_context</span>)
|
221
222
|
<span class="ruby-ivar">@owner</span>.<span class="ruby-identifier">do_render</span>(<span class="ruby-identifier">rendering_context</span>)
|
222
223
|
<span class="ruby-keyword kw">end</span>
|
@@ -225,11 +226,41 @@ Forwards method call to the next decoration in the chain.
|
|
225
226
|
</div>
|
226
227
|
</div>
|
227
228
|
|
228
|
-
<div id="method-
|
229
|
-
<a name="
|
229
|
+
<div id="method-M000140" class="method-detail">
|
230
|
+
<a name="M000140"></a>
|
230
231
|
|
231
232
|
<div class="method-heading">
|
232
|
-
<a href="#
|
233
|
+
<a href="#M000140" class="method-signature">
|
234
|
+
<span class="method-name">global?</span><span class="method-args">()</span>
|
235
|
+
</a>
|
236
|
+
</div>
|
237
|
+
|
238
|
+
<div class="method-description">
|
239
|
+
<p>
|
240
|
+
Is this decoration a global or a local one? By default all decorations are
|
241
|
+
local unless this method is overwritten.
|
242
|
+
</p>
|
243
|
+
<p>
|
244
|
+
A global decoration is added in front of the decoration chain, a local
|
245
|
+
decoration is added in front of all other local decorations but after all
|
246
|
+
global decorations.
|
247
|
+
</p>
|
248
|
+
<p><a class="source-toggle" href="#"
|
249
|
+
onclick="toggleCode('M000140-source');return false;">[Source]</a></p>
|
250
|
+
<div class="method-source-code" id="M000140-source">
|
251
|
+
<pre>
|
252
|
+
<span class="ruby-comment cmt"># File lib/wee/core/decoration.rb, line 43</span>
|
253
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">global?</span>() <span class="ruby-keyword kw">false</span> <span class="ruby-keyword kw">end</span>
|
254
|
+
</pre>
|
255
|
+
</div>
|
256
|
+
</div>
|
257
|
+
</div>
|
258
|
+
|
259
|
+
<div id="method-M000141" class="method-detail">
|
260
|
+
<a name="M000141"></a>
|
261
|
+
|
262
|
+
<div class="method-heading">
|
263
|
+
<a href="#M000141" class="method-signature">
|
233
264
|
<span class="method-name">process_callbacks</span><span class="method-args">(callback_stream)</span>
|
234
265
|
</a>
|
235
266
|
</div>
|
@@ -239,10 +270,10 @@ Forwards method call to the next decoration in the chain.
|
|
239
270
|
Forwards method call to the next decoration in the chain.
|
240
271
|
</p>
|
241
272
|
<p><a class="source-toggle" href="#"
|
242
|
-
onclick="toggleCode('
|
243
|
-
<div class="method-source-code" id="
|
273
|
+
onclick="toggleCode('M000141-source');return false;">[Source]</a></p>
|
274
|
+
<div class="method-source-code" id="M000141-source">
|
244
275
|
<pre>
|
245
|
-
<span class="ruby-comment cmt"># File lib/wee/core/decoration.rb, line
|
276
|
+
<span class="ruby-comment cmt"># File lib/wee/core/decoration.rb, line 47</span>
|
246
277
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">process_callbacks</span>(<span class="ruby-identifier">callback_stream</span>)
|
247
278
|
<span class="ruby-ivar">@owner</span>.<span class="ruby-identifier">process_callbacks</span>(<span class="ruby-identifier">callback_stream</span>)
|
248
279
|
<span class="ruby-keyword kw">end</span>
|
@@ -254,7 +285,7 @@ Forwards method call to the next decoration in the chain.
|
|
254
285
|
|
255
286
|
</div>
|
256
287
|
<div id="section">
|
257
|
-
<h2 class="section-title"><a name="
|
288
|
+
<h2 class="section-title"><a name="SEC00078">Snapshot</a></h2>
|
258
289
|
<div class="section-comment">
|
259
290
|
|
260
291
|
</div>
|
@@ -270,21 +301,21 @@ Forwards method call to the next decoration in the chain.
|
|
270
301
|
<div id="methods">
|
271
302
|
<h3 class="section-bar">Public Instance methods</h3>
|
272
303
|
|
273
|
-
<div id="method-
|
274
|
-
<a name="
|
304
|
+
<div id="method-M000145" class="method-detail">
|
305
|
+
<a name="M000145"></a>
|
275
306
|
|
276
307
|
<div class="method-heading">
|
277
|
-
<a href="#
|
308
|
+
<a href="#M000145" class="method-signature">
|
278
309
|
<span class="method-name">restore_snapshot</span><span class="method-args">(snap)</span>
|
279
310
|
</a>
|
280
311
|
</div>
|
281
312
|
|
282
313
|
<div class="method-description">
|
283
314
|
<p><a class="source-toggle" href="#"
|
284
|
-
onclick="toggleCode('
|
285
|
-
<div class="method-source-code" id="
|
315
|
+
onclick="toggleCode('M000145-source');return false;">[Source]</a></p>
|
316
|
+
<div class="method-source-code" id="M000145-source">
|
286
317
|
<pre>
|
287
|
-
<span class="ruby-comment cmt"># File lib/wee/core/decoration.rb, line
|
318
|
+
<span class="ruby-comment cmt"># File lib/wee/core/decoration.rb, line 78</span>
|
288
319
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">restore_snapshot</span>(<span class="ruby-identifier">snap</span>)
|
289
320
|
<span class="ruby-ivar">@owner</span> = <span class="ruby-identifier">snap</span>
|
290
321
|
<span class="ruby-keyword kw">end</span>
|
@@ -293,11 +324,11 @@ Forwards method call to the next decoration in the chain.
|
|
293
324
|
</div>
|
294
325
|
</div>
|
295
326
|
|
296
|
-
<div id="method-
|
297
|
-
<a name="
|
327
|
+
<div id="method-M000144" class="method-detail">
|
328
|
+
<a name="M000144"></a>
|
298
329
|
|
299
330
|
<div class="method-heading">
|
300
|
-
<a href="#
|
331
|
+
<a href="#M000144" class="method-signature">
|
301
332
|
<span class="method-name">take_snapshot</span><span class="method-args">()</span>
|
302
333
|
</a>
|
303
334
|
</div>
|
@@ -305,16 +336,16 @@ Forwards method call to the next decoration in the chain.
|
|
305
336
|
<div class="method-description">
|
306
337
|
<p>
|
307
338
|
We have to save the @owner attribute to be able to correctly backtrack
|
308
|
-
calls, as method <a href="Component.html#
|
339
|
+
calls, as method <a href="Component.html#M000187">Wee::Component#call</a>
|
309
340
|
modifies it in the call to <tt>component.remove_decoration(answer)</tt>.
|
310
341
|
Removing the answer-decoration has the advantage to be able to call a
|
311
342
|
component more than once!
|
312
343
|
</p>
|
313
344
|
<p><a class="source-toggle" href="#"
|
314
|
-
onclick="toggleCode('
|
315
|
-
<div class="method-source-code" id="
|
345
|
+
onclick="toggleCode('M000144-source');return false;">[Source]</a></p>
|
346
|
+
<div class="method-source-code" id="M000144-source">
|
316
347
|
<pre>
|
317
|
-
<span class="ruby-comment cmt"># File lib/wee/core/decoration.rb, line
|
348
|
+
<span class="ruby-comment cmt"># File lib/wee/core/decoration.rb, line 74</span>
|
318
349
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">take_snapshot</span>
|
319
350
|
<span class="ruby-ivar">@owner</span>
|
320
351
|
<span class="ruby-keyword kw">end</span>
|
@@ -83,9 +83,9 @@
|
|
83
83
|
<div id="description">
|
84
84
|
<p>
|
85
85
|
A <a href="Delegate.html">Wee::Delegate</a> breaks the decoration chain and
|
86
|
-
forwards the methods <a href="Delegate.html#
|
87
|
-
<a href="Delegate.html#
|
88
|
-
href="Delegate.html#
|
86
|
+
forwards the methods <a href="Delegate.html#M000216">process_callbacks</a>,
|
87
|
+
<a href="Delegate.html#M000217">do_render</a> and <a
|
88
|
+
href="Delegate.html#M000218">backtrack_state</a> to the corresponding
|
89
89
|
<b>chain</b> method of it’s <em>delegate</em> component (a <a
|
90
90
|
href="Component.html">Wee::Component</a>).
|
91
91
|
</p>
|
@@ -99,10 +99,10 @@ href="Component.html">Wee::Component</a>).
|
|
99
99
|
<h3 class="section-bar">Methods</h3>
|
100
100
|
|
101
101
|
<div class="name-list">
|
102
|
-
<a href="#
|
103
|
-
<a href="#
|
104
|
-
<a href="#
|
105
|
-
<a href="#
|
102
|
+
<a href="#M000218">backtrack_state</a>
|
103
|
+
<a href="#M000217">do_render</a>
|
104
|
+
<a href="#M000215">new</a>
|
105
|
+
<a href="#M000216">process_callbacks</a>
|
106
106
|
</div>
|
107
107
|
</div>
|
108
108
|
|
@@ -124,21 +124,21 @@ href="Component.html">Wee::Component</a>).
|
|
124
124
|
<div id="methods">
|
125
125
|
<h3 class="section-bar">Public Class methods</h3>
|
126
126
|
|
127
|
-
<div id="method-
|
128
|
-
<a name="
|
127
|
+
<div id="method-M000215" class="method-detail">
|
128
|
+
<a name="M000215"></a>
|
129
129
|
|
130
130
|
<div class="method-heading">
|
131
|
-
<a href="#
|
131
|
+
<a href="#M000215" class="method-signature">
|
132
132
|
<span class="method-name">new</span><span class="method-args">(delegate)</span>
|
133
133
|
</a>
|
134
134
|
</div>
|
135
135
|
|
136
136
|
<div class="method-description">
|
137
137
|
<p><a class="source-toggle" href="#"
|
138
|
-
onclick="toggleCode('
|
139
|
-
<div class="method-source-code" id="
|
138
|
+
onclick="toggleCode('M000215-source');return false;">[Source]</a></p>
|
139
|
+
<div class="method-source-code" id="M000215-source">
|
140
140
|
<pre>
|
141
|
-
<span class="ruby-comment cmt"># File lib/wee/core/decoration.rb, line
|
141
|
+
<span class="ruby-comment cmt"># File lib/wee/core/decoration.rb, line 89</span>
|
142
142
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">delegate</span>)
|
143
143
|
<span class="ruby-ivar">@delegate</span> = <span class="ruby-identifier">delegate</span>
|
144
144
|
<span class="ruby-keyword kw">end</span>
|
@@ -149,11 +149,11 @@ href="Component.html">Wee::Component</a>).
|
|
149
149
|
|
150
150
|
<h3 class="section-bar">Public Instance methods</h3>
|
151
151
|
|
152
|
-
<div id="method-
|
153
|
-
<a name="
|
152
|
+
<div id="method-M000218" class="method-detail">
|
153
|
+
<a name="M000218"></a>
|
154
154
|
|
155
155
|
<div class="method-heading">
|
156
|
-
<a href="#
|
156
|
+
<a href="#M000218" class="method-signature">
|
157
157
|
<span class="method-name">backtrack_state</span><span class="method-args">(snapshot)</span>
|
158
158
|
</a>
|
159
159
|
</div>
|
@@ -165,10 +165,10 @@ Forwards method to the corresponding top-level <b>chain</b> method of the
|
|
165
165
|
components, thus we follow the @owner (via super).
|
166
166
|
</p>
|
167
167
|
<p><a class="source-toggle" href="#"
|
168
|
-
onclick="toggleCode('
|
169
|
-
<div class="method-source-code" id="
|
168
|
+
onclick="toggleCode('M000218-source');return false;">[Source]</a></p>
|
169
|
+
<div class="method-source-code" id="M000218-source">
|
170
170
|
<pre>
|
171
|
-
<span class="ruby-comment cmt"># File lib/wee/core/decoration.rb, line
|
171
|
+
<span class="ruby-comment cmt"># File lib/wee/core/decoration.rb, line 111</span>
|
172
172
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">backtrack_state</span>(<span class="ruby-identifier">snapshot</span>)
|
173
173
|
<span class="ruby-keyword kw">super</span>
|
174
174
|
<span class="ruby-ivar">@delegate</span>.<span class="ruby-identifier">backtrack_state_chain</span>(<span class="ruby-identifier">snapshot</span>)
|
@@ -178,11 +178,11 @@ components, thus we follow the @owner (via super).
|
|
178
178
|
</div>
|
179
179
|
</div>
|
180
180
|
|
181
|
-
<div id="method-
|
182
|
-
<a name="
|
181
|
+
<div id="method-M000217" class="method-detail">
|
182
|
+
<a name="M000217"></a>
|
183
183
|
|
184
184
|
<div class="method-heading">
|
185
|
-
<a href="#
|
185
|
+
<a href="#M000217" class="method-signature">
|
186
186
|
<span class="method-name">do_render</span><span class="method-args">(rendering_context)</span>
|
187
187
|
</a>
|
188
188
|
</div>
|
@@ -193,10 +193,10 @@ Forwards method to the corresponding top-level <b>chain</b> method of the
|
|
193
193
|
<em>delegate</em> component.
|
194
194
|
</p>
|
195
195
|
<p><a class="source-toggle" href="#"
|
196
|
-
onclick="toggleCode('
|
197
|
-
<div class="method-source-code" id="
|
196
|
+
onclick="toggleCode('M000217-source');return false;">[Source]</a></p>
|
197
|
+
<div class="method-source-code" id="M000217-source">
|
198
198
|
<pre>
|
199
|
-
<span class="ruby-comment cmt"># File lib/wee/core/decoration.rb, line
|
199
|
+
<span class="ruby-comment cmt"># File lib/wee/core/decoration.rb, line 103</span>
|
200
200
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">do_render</span>(<span class="ruby-identifier">rendering_context</span>)
|
201
201
|
<span class="ruby-ivar">@delegate</span>.<span class="ruby-identifier">do_render_chain</span>(<span class="ruby-identifier">rendering_context</span>)
|
202
202
|
<span class="ruby-keyword kw">end</span>
|
@@ -205,11 +205,11 @@ Forwards method to the corresponding top-level <b>chain</b> method of the
|
|
205
205
|
</div>
|
206
206
|
</div>
|
207
207
|
|
208
|
-
<div id="method-
|
209
|
-
<a name="
|
208
|
+
<div id="method-M000216" class="method-detail">
|
209
|
+
<a name="M000216"></a>
|
210
210
|
|
211
211
|
<div class="method-heading">
|
212
|
-
<a href="#
|
212
|
+
<a href="#M000216" class="method-signature">
|
213
213
|
<span class="method-name">process_callbacks</span><span class="method-args">(callback_stream)</span>
|
214
214
|
</a>
|
215
215
|
</div>
|
@@ -220,10 +220,10 @@ Forwards method to the corresponding top-level <b>chain</b> method of the
|
|
220
220
|
<em>delegate</em> component.
|
221
221
|
</p>
|
222
222
|
<p><a class="source-toggle" href="#"
|
223
|
-
onclick="toggleCode('
|
224
|
-
<div class="method-source-code" id="
|
223
|
+
onclick="toggleCode('M000216-source');return false;">[Source]</a></p>
|
224
|
+
<div class="method-source-code" id="M000216-source">
|
225
225
|
<pre>
|
226
|
-
<span class="ruby-comment cmt"># File lib/wee/core/decoration.rb, line
|
226
|
+
<span class="ruby-comment cmt"># File lib/wee/core/decoration.rb, line 96</span>
|
227
227
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">process_callbacks</span>(<span class="ruby-identifier">callback_stream</span>)
|
228
228
|
<span class="ruby-ivar">@delegate</span>.<span class="ruby-identifier">process_callbacks_chain</span>(<span class="ruby-identifier">callback_stream</span>)
|
229
229
|
<span class="ruby-keyword kw">end</span>
|
@@ -88,8 +88,8 @@
|
|
88
88
|
<h3 class="section-bar">Methods</h3>
|
89
89
|
|
90
90
|
<div class="name-list">
|
91
|
-
<a href="#
|
92
|
-
<a href="#
|
91
|
+
<a href="#M000224">new</a>
|
92
|
+
<a href="#M000225">render</a>
|
93
93
|
</div>
|
94
94
|
</div>
|
95
95
|
|
@@ -111,19 +111,19 @@
|
|
111
111
|
<div id="methods">
|
112
112
|
<h3 class="section-bar">Public Class methods</h3>
|
113
113
|
|
114
|
-
<div id="method-
|
115
|
-
<a name="
|
114
|
+
<div id="method-M000224" class="method-detail">
|
115
|
+
<a name="M000224"></a>
|
116
116
|
|
117
117
|
<div class="method-heading">
|
118
|
-
<a href="#
|
118
|
+
<a href="#M000224" class="method-signature">
|
119
119
|
<span class="method-name">new</span><span class="method-args">(exception)</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('
|
126
|
-
<div class="method-source-code" id="
|
125
|
+
onclick="toggleCode('M000224-source');return false;">[Source]</a></p>
|
126
|
+
<div class="method-source-code" id="M000224-source">
|
127
127
|
<pre>
|
128
128
|
<span class="ruby-comment cmt"># File lib/wee/response.rb, line 64</span>
|
129
129
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">exception</span>)
|
@@ -138,19 +138,19 @@
|
|
138
138
|
|
139
139
|
<h3 class="section-bar">Public Instance methods</h3>
|
140
140
|
|
141
|
-
<div id="method-
|
142
|
-
<a name="
|
141
|
+
<div id="method-M000225" class="method-detail">
|
142
|
+
<a name="M000225"></a>
|
143
143
|
|
144
144
|
<div class="method-heading">
|
145
|
-
<a href="#
|
145
|
+
<a href="#M000225" class="method-signature">
|
146
146
|
<span class="method-name">render</span><span class="method-args">(c)</span>
|
147
147
|
</a>
|
148
148
|
</div>
|
149
149
|
|
150
150
|
<div class="method-description">
|
151
151
|
<p><a class="source-toggle" href="#"
|
152
|
-
onclick="toggleCode('
|
153
|
-
<div class="method-source-code" id="
|
152
|
+
onclick="toggleCode('M000225-source');return false;">[Source]</a></p>
|
153
|
+
<div class="method-source-code" id="M000225-source">
|
154
154
|
<pre>
|
155
155
|
<span class="ruby-comment cmt"># File lib/wee/response.rb, line 70</span>
|
156
156
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">render</span>(<span class="ruby-identifier">c</span>)
|
@@ -88,7 +88,7 @@
|
|
88
88
|
<h3 class="section-bar">Methods</h3>
|
89
89
|
|
90
90
|
<div class="name-list">
|
91
|
-
<a href="#
|
91
|
+
<a href="#M000043">new</a>
|
92
92
|
</div>
|
93
93
|
</div>
|
94
94
|
|
@@ -123,19 +123,19 @@
|
|
123
123
|
<div id="methods">
|
124
124
|
<h3 class="section-bar">Public Class methods</h3>
|
125
125
|
|
126
|
-
<div id="method-
|
127
|
-
<a name="
|
126
|
+
<div id="method-M000043" class="method-detail">
|
127
|
+
<a name="M000043"></a>
|
128
128
|
|
129
129
|
<div class="method-heading">
|
130
|
-
<a href="#
|
130
|
+
<a href="#M000043" class="method-signature">
|
131
131
|
<span class="method-name">new</span><span class="method-args">(mime_type = 'text/html', content='')</span>
|
132
132
|
</a>
|
133
133
|
</div>
|
134
134
|
|
135
135
|
<div class="method-description">
|
136
136
|
<p><a class="source-toggle" href="#"
|
137
|
-
onclick="toggleCode('
|
138
|
-
<div class="method-source-code" id="
|
137
|
+
onclick="toggleCode('M000043-source');return false;">[Source]</a></p>
|
138
|
+
<div class="method-source-code" id="M000043-source">
|
139
139
|
<pre>
|
140
140
|
<span class="ruby-comment cmt"># File lib/wee/response.rb, line 33</span>
|
141
141
|
<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>)
|
@@ -0,0 +1,148 @@
|
|
1
|
+
<?xml version="1.0" encoding="iso-8859-1"?>
|
2
|
+
<!DOCTYPE html
|
3
|
+
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
4
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
5
|
+
|
6
|
+
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
7
|
+
<head>
|
8
|
+
<title>Module: Wee::Helper</title>
|
9
|
+
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
10
|
+
<meta http-equiv="Content-Script-Type" content="text/javascript" />
|
11
|
+
<link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
|
12
|
+
<script type="text/javascript">
|
13
|
+
// <![CDATA[
|
14
|
+
|
15
|
+
function popupCode( url ) {
|
16
|
+
window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
|
17
|
+
}
|
18
|
+
|
19
|
+
function toggleCode( id ) {
|
20
|
+
if ( document.getElementById )
|
21
|
+
elem = document.getElementById( id );
|
22
|
+
else if ( document.all )
|
23
|
+
elem = eval( "document.all." + id );
|
24
|
+
else
|
25
|
+
return false;
|
26
|
+
|
27
|
+
elemStyle = elem.style;
|
28
|
+
|
29
|
+
if ( elemStyle.display != "block" ) {
|
30
|
+
elemStyle.display = "block"
|
31
|
+
} else {
|
32
|
+
elemStyle.display = "none"
|
33
|
+
}
|
34
|
+
|
35
|
+
return true;
|
36
|
+
}
|
37
|
+
|
38
|
+
// Make codeblocks hidden by default
|
39
|
+
document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
|
40
|
+
|
41
|
+
// ]]>
|
42
|
+
</script>
|
43
|
+
|
44
|
+
</head>
|
45
|
+
<body>
|
46
|
+
|
47
|
+
|
48
|
+
|
49
|
+
<div id="classHeader">
|
50
|
+
<table class="header-table">
|
51
|
+
<tr class="top-aligned-row">
|
52
|
+
<td><strong>Module</strong></td>
|
53
|
+
<td class="class-name-in-header">Wee::Helper</td>
|
54
|
+
</tr>
|
55
|
+
<tr class="top-aligned-row">
|
56
|
+
<td><strong>In:</strong></td>
|
57
|
+
<td>
|
58
|
+
<a href="../../files/lib/wee/utils/helper_rb.html">
|
59
|
+
lib/wee/utils/helper.rb
|
60
|
+
</a>
|
61
|
+
<br />
|
62
|
+
</td>
|
63
|
+
</tr>
|
64
|
+
|
65
|
+
</table>
|
66
|
+
</div>
|
67
|
+
<!-- banner header -->
|
68
|
+
|
69
|
+
<div id="bodyContent">
|
70
|
+
|
71
|
+
|
72
|
+
|
73
|
+
<div id="contextContent">
|
74
|
+
|
75
|
+
|
76
|
+
|
77
|
+
</div>
|
78
|
+
|
79
|
+
<div id="method-list">
|
80
|
+
<h3 class="section-bar">Methods</h3>
|
81
|
+
|
82
|
+
<div class="name-list">
|
83
|
+
<a href="#M000034">app_for</a>
|
84
|
+
</div>
|
85
|
+
</div>
|
86
|
+
|
87
|
+
</div>
|
88
|
+
|
89
|
+
|
90
|
+
<!-- if includes -->
|
91
|
+
|
92
|
+
<div id="section">
|
93
|
+
|
94
|
+
|
95
|
+
|
96
|
+
|
97
|
+
|
98
|
+
|
99
|
+
|
100
|
+
|
101
|
+
<!-- if method_list -->
|
102
|
+
<div id="methods">
|
103
|
+
<h3 class="section-bar">Public Class methods</h3>
|
104
|
+
|
105
|
+
<div id="method-M000034" class="method-detail">
|
106
|
+
<a name="M000034"></a>
|
107
|
+
|
108
|
+
<div class="method-heading">
|
109
|
+
<a href="#M000034" class="method-signature">
|
110
|
+
<span class="method-name">app_for</span><span class="method-args">(component, page_cache_capacity=10, id_seed=rand(1_000_000))</span>
|
111
|
+
</a>
|
112
|
+
</div>
|
113
|
+
|
114
|
+
<div class="method-description">
|
115
|
+
<p><a class="source-toggle" href="#"
|
116
|
+
onclick="toggleCode('M000034-source');return false;">[Source]</a></p>
|
117
|
+
<div class="method-source-code" id="M000034-source">
|
118
|
+
<pre>
|
119
|
+
<span class="ruby-comment cmt"># File lib/wee/utils/helper.rb, line 4</span>
|
120
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">app_for</span>(<span class="ruby-identifier">component</span>, <span class="ruby-identifier">page_cache_capacity</span>=<span class="ruby-value">10</span>, <span class="ruby-identifier">id_seed</span>=<span class="ruby-identifier">rand</span>(<span class="ruby-value">1_000_000</span>))
|
121
|
+
<span class="ruby-constant">Wee</span><span class="ruby-operator">::</span><span class="ruby-constant">Application</span>.<span class="ruby-identifier">new</span> {<span class="ruby-operator">|</span><span class="ruby-identifier">app</span><span class="ruby-operator">|</span>
|
122
|
+
<span class="ruby-identifier">app</span>.<span class="ruby-identifier">default_request_handler</span> {
|
123
|
+
<span class="ruby-constant">Wee</span><span class="ruby-operator">::</span><span class="ruby-constant">Session</span>.<span class="ruby-identifier">new</span> {<span class="ruby-operator">|</span><span class="ruby-identifier">sess</span><span class="ruby-operator">|</span>
|
124
|
+
<span class="ruby-identifier">sess</span>.<span class="ruby-identifier">root_component</span> = <span class="ruby-identifier">component</span>.<span class="ruby-identifier">new</span>
|
125
|
+
<span class="ruby-identifier">sess</span>.<span class="ruby-identifier">page_store</span> = <span class="ruby-constant">Wee</span><span class="ruby-operator">::</span><span class="ruby-constant">Utils</span><span class="ruby-operator">::</span><span class="ruby-constant">LRUCache</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">page_cache_capacity</span>)
|
126
|
+
}
|
127
|
+
}
|
128
|
+
<span class="ruby-identifier">app</span>.<span class="ruby-identifier">id_generator</span> = <span class="ruby-constant">Wee</span><span class="ruby-operator">::</span><span class="ruby-constant">SimpleIdGenerator</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">id_seed</span>)
|
129
|
+
}
|
130
|
+
<span class="ruby-keyword kw">end</span>
|
131
|
+
</pre>
|
132
|
+
</div>
|
133
|
+
</div>
|
134
|
+
</div>
|
135
|
+
|
136
|
+
|
137
|
+
</div>
|
138
|
+
|
139
|
+
|
140
|
+
</div>
|
141
|
+
|
142
|
+
|
143
|
+
<div id="validator-badges">
|
144
|
+
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
145
|
+
</div>
|
146
|
+
|
147
|
+
</body>
|
148
|
+
</html>
|