wee 0.5.0 → 0.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
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,10 @@
88
88
  <h3 class="section-bar">Methods</h3>
89
89
 
90
90
  <div class="name-list">
91
- <a href="#M000198">close</a>&nbsp;&nbsp;
92
- <a href="#M000200">nest</a>&nbsp;&nbsp;
93
- <a href="#M000197">new</a>&nbsp;&nbsp;
94
- <a href="#M000199">set_brush</a>&nbsp;&nbsp;
91
+ <a href="#M000240">close</a>&nbsp;&nbsp;
92
+ <a href="#M000242">nest</a>&nbsp;&nbsp;
93
+ <a href="#M000239">new</a>&nbsp;&nbsp;
94
+ <a href="#M000241">set_brush</a>&nbsp;&nbsp;
95
95
  </div>
96
96
  </div>
97
97
 
@@ -113,19 +113,19 @@
113
113
  <div id="methods">
114
114
  <h3 class="section-bar">Public Class methods</h3>
115
115
 
116
- <div id="method-M000197" class="method-detail">
117
- <a name="M000197"></a>
116
+ <div id="method-M000239" class="method-detail">
117
+ <a name="M000239"></a>
118
118
 
119
119
  <div class="method-heading">
120
- <a href="#M000197" class="method-signature">
120
+ <a href="#M000239" class="method-signature">
121
121
  <span class="method-name">new</span><span class="method-args">()</span>
122
122
  </a>
123
123
  </div>
124
124
 
125
125
  <div class="method-description">
126
126
  <p><a class="source-toggle" href="#"
127
- onclick="toggleCode('M000197-source');return false;">[Source]</a></p>
128
- <div class="method-source-code" id="M000197-source">
127
+ onclick="toggleCode('M000239-source');return false;">[Source]</a></p>
128
+ <div class="method-source-code" id="M000239-source">
129
129
  <pre>
130
130
  <span class="ruby-comment cmt"># File lib/wee/renderer/html/canvas.rb, line 4</span>
131
131
  <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>
@@ -139,19 +139,19 @@
139
139
 
140
140
  <h3 class="section-bar">Public Instance methods</h3>
141
141
 
142
- <div id="method-M000198" class="method-detail">
143
- <a name="M000198"></a>
142
+ <div id="method-M000240" class="method-detail">
143
+ <a name="M000240"></a>
144
144
 
145
145
  <div class="method-heading">
146
- <a href="#M000198" class="method-signature">
146
+ <a href="#M000240" class="method-signature">
147
147
  <span class="method-name">close</span><span class="method-args">()</span>
148
148
  </a>
149
149
  </div>
150
150
 
151
151
  <div class="method-description">
152
152
  <p><a class="source-toggle" href="#"
153
- onclick="toggleCode('M000198-source');return false;">[Source]</a></p>
154
- <div class="method-source-code" id="M000198-source">
153
+ onclick="toggleCode('M000240-source');return false;">[Source]</a></p>
154
+ <div class="method-source-code" id="M000240-source">
155
155
  <pre>
156
156
  <span class="ruby-comment cmt"># File lib/wee/renderer/html/canvas.rb, line 9</span>
157
157
  <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">close</span>
@@ -163,19 +163,19 @@
163
163
  </div>
164
164
  </div>
165
165
 
166
- <div id="method-M000200" class="method-detail">
167
- <a name="M000200"></a>
166
+ <div id="method-M000242" class="method-detail">
167
+ <a name="M000242"></a>
168
168
 
169
169
  <div class="method-heading">
170
- <a href="#M000200" class="method-signature">
170
+ <a href="#M000242" class="method-signature">
171
171
  <span class="method-name">nest</span><span class="method-args">(&amp;block)</span>
172
172
  </a>
173
173
  </div>
174
174
 
175
175
  <div class="method-description">
176
176
  <p><a class="source-toggle" href="#"
177
- onclick="toggleCode('M000200-source');return false;">[Source]</a></p>
178
- <div class="method-source-code" id="M000200-source">
177
+ onclick="toggleCode('M000242-source');return false;">[Source]</a></p>
178
+ <div class="method-source-code" id="M000242-source">
179
179
  <pre>
180
180
  <span class="ruby-comment cmt"># File lib/wee/renderer/html/canvas.rb, line 25</span>
181
181
  <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">nest</span>(<span class="ruby-operator">&amp;</span><span class="ruby-identifier">block</span>)
@@ -190,19 +190,19 @@
190
190
  </div>
191
191
  </div>
192
192
 
193
- <div id="method-M000199" class="method-detail">
194
- <a name="M000199"></a>
193
+ <div id="method-M000241" class="method-detail">
194
+ <a name="M000241"></a>
195
195
 
196
196
  <div class="method-heading">
197
- <a href="#M000199" class="method-signature">
197
+ <a href="#M000241" class="method-signature">
198
198
  <span class="method-name">set_brush</span><span class="method-args">(brush)</span>
199
199
  </a>
200
200
  </div>
201
201
 
202
202
  <div class="method-description">
203
203
  <p><a class="source-toggle" href="#"
204
- onclick="toggleCode('M000199-source');return false;">[Source]</a></p>
205
- <div class="method-source-code" id="M000199-source">
204
+ onclick="toggleCode('M000241-source');return false;">[Source]</a></p>
205
+ <div class="method-source-code" id="M000241-source">
206
206
  <pre>
207
207
  <span class="ruby-comment cmt"># File lib/wee/renderer/html/canvas.rb, line 14</span>
208
208
  <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">set_brush</span>(<span class="ruby-identifier">brush</span>)
@@ -87,7 +87,7 @@
87
87
  <div id="description">
88
88
  <p>
89
89
  The base class of all components. You should at least overwrite method <a
90
- href="Component.html#M000209">render</a> in your own subclasses.
90
+ href="Component.html#M000250">render</a> in your own subclasses.
91
91
  </p>
92
92
 
93
93
  </div>
@@ -96,14 +96,14 @@ href="Component.html#M000209">render</a> in your own subclasses.
96
96
  <div id="contents-list">
97
97
  <h3 class="section-bar">Contents</h3>
98
98
  <ul>
99
- <li><a href="#SEC00074">Render</a></li>
100
- <li><a href="#SEC00075">Callback</a></li>
101
- <li><a href="#SEC00076">Init</a></li>
102
- <li><a href="#SEC00077">Children</a></li>
103
- <li><a href="#SEC00078">Decoration</a></li>
104
- <li><a href="#SEC00079">Backtrack</a></li>
105
- <li><a href="#SEC00080">Call/Answer</a></li>
106
- <li><a href="#SEC00120">Call/Answer</a></li>
99
+ <li><a href="#SEC00072">Render</a></li>
100
+ <li><a href="#SEC00073">Callback</a></li>
101
+ <li><a href="#SEC00074">Init</a></li>
102
+ <li><a href="#SEC00075">Children</a></li>
103
+ <li><a href="#SEC00076">Decoration</a></li>
104
+ <li><a href="#SEC00077">Backtrack</a></li>
105
+ <li><a href="#SEC00078">Call/Answer</a></li>
106
+ <li><a href="#SEC00121">Call/Answer</a></li>
107
107
  </ul>
108
108
  </div>
109
109
 
@@ -111,24 +111,24 @@ href="Component.html#M000209">render</a> in your own subclasses.
111
111
  <h3 class="section-bar">Methods</h3>
112
112
 
113
113
  <div class="name-list">
114
- <a href="#M000214">add_child</a>&nbsp;&nbsp;
115
- <a href="#M000218">add_decoration</a>&nbsp;&nbsp;
116
- <a href="#M000224">answer</a>&nbsp;&nbsp;
117
- <a href="#M000222">backtrack_state</a>&nbsp;&nbsp;
118
- <a href="#M000221">backtrack_state_chain</a>&nbsp;&nbsp;
119
- <a href="#M000223">call</a>&nbsp;&nbsp;
120
- <a href="#M000225">call</a>&nbsp;&nbsp;
121
- <a href="#M000213">children</a>&nbsp;&nbsp;
122
- <a href="#M000215">decoration</a>&nbsp;&nbsp;
123
- <a href="#M000216">decoration=</a>&nbsp;&nbsp;
124
- <a href="#M000208">do_render_chain</a>&nbsp;&nbsp;
125
- <a href="#M000217">each_decoration</a>&nbsp;&nbsp;
126
- <a href="#M000212">initialize</a>&nbsp;&nbsp;
127
- <a href="#M000211">process_callbacks</a>&nbsp;&nbsp;
128
- <a href="#M000210">process_callbacks_chain</a>&nbsp;&nbsp;
129
- <a href="#M000219">remove_decoration</a>&nbsp;&nbsp;
130
- <a href="#M000220">remove_decoration_if</a>&nbsp;&nbsp;
131
- <a href="#M000209">render</a>&nbsp;&nbsp;
114
+ <a href="#M000255">add_child</a>&nbsp;&nbsp;
115
+ <a href="#M000259">add_decoration</a>&nbsp;&nbsp;
116
+ <a href="#M000265">answer</a>&nbsp;&nbsp;
117
+ <a href="#M000263">backtrack_state</a>&nbsp;&nbsp;
118
+ <a href="#M000262">backtrack_state_chain</a>&nbsp;&nbsp;
119
+ <a href="#M000264">call</a>&nbsp;&nbsp;
120
+ <a href="#M000266">call</a>&nbsp;&nbsp;
121
+ <a href="#M000254">children</a>&nbsp;&nbsp;
122
+ <a href="#M000256">decoration</a>&nbsp;&nbsp;
123
+ <a href="#M000257">decoration=</a>&nbsp;&nbsp;
124
+ <a href="#M000249">do_render_chain</a>&nbsp;&nbsp;
125
+ <a href="#M000258">each_decoration</a>&nbsp;&nbsp;
126
+ <a href="#M000253">initialize</a>&nbsp;&nbsp;
127
+ <a href="#M000252">process_callbacks</a>&nbsp;&nbsp;
128
+ <a href="#M000251">process_callbacks_chain</a>&nbsp;&nbsp;
129
+ <a href="#M000260">remove_decoration</a>&nbsp;&nbsp;
130
+ <a href="#M000261">remove_decoration_if</a>&nbsp;&nbsp;
131
+ <a href="#M000250">render</a>&nbsp;&nbsp;
132
132
  </div>
133
133
  </div>
134
134
 
@@ -148,7 +148,7 @@ href="Component.html#M000209">render</a> in your own subclasses.
148
148
 
149
149
  <!-- if method_list -->
150
150
  <div id="section">
151
- <h2 class="section-title"><a name="SEC00074">Render</a></h2>
151
+ <h2 class="section-title"><a name="SEC00072">Render</a></h2>
152
152
  <div class="section-comment">
153
153
 
154
154
  </div>
@@ -164,11 +164,11 @@ href="Component.html#M000209">render</a> in your own subclasses.
164
164
  <div id="methods">
165
165
  <h3 class="section-bar">Public Instance methods</h3>
166
166
 
167
- <div id="method-M000208" class="method-detail">
168
- <a name="M000208"></a>
167
+ <div id="method-M000249" class="method-detail">
168
+ <a name="M000249"></a>
169
169
 
170
170
  <div class="method-heading">
171
- <a href="#M000208" class="method-signature">
171
+ <a href="#M000249" class="method-signature">
172
172
  <span class="method-name">do_render_chain</span><span class="method-args">(rendering_context)</span>
173
173
  </a>
174
174
  </div>
@@ -176,7 +176,7 @@ href="Component.html#M000209">render</a> in your own subclasses.
176
176
  <div class="method-description">
177
177
  <p>
178
178
  Starts rendering the decoration chain by calling method <a
179
- href="Presenter.html#M000229">Presenter#do_render</a> for the first
179
+ href="Presenter.html#M000284">Presenter#do_render</a> for the first
180
180
  decoration of the component, or calling <em>do_render</em> for the
181
181
  component itself if no decorations were specified.
182
182
  </p>
@@ -186,8 +186,8 @@ component itself if no decorations were specified.
186
186
  </dd>
187
187
  </dl>
188
188
  <p><a class="source-toggle" href="#"
189
- onclick="toggleCode('M000208-source');return false;">[Source]</a></p>
190
- <div class="method-source-code" id="M000208-source">
189
+ onclick="toggleCode('M000249-source');return false;">[Source]</a></p>
190
+ <div class="method-source-code" id="M000249-source">
191
191
  <pre>
192
192
  <span class="ruby-comment cmt"># File lib/wee/core/component.rb, line 19</span>
193
193
  <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">do_render_chain</span>(<span class="ruby-identifier">rendering_context</span>)
@@ -198,11 +198,11 @@ component itself if no decorations were specified.
198
198
  </div>
199
199
  </div>
200
200
 
201
- <div id="method-M000209" class="method-detail">
202
- <a name="M000209"></a>
201
+ <div id="method-M000250" class="method-detail">
202
+ <a name="M000250"></a>
203
203
 
204
204
  <div class="method-heading">
205
- <a href="#M000209" class="method-signature">
205
+ <a href="#M000250" class="method-signature">
206
206
  <span class="method-name">render</span><span class="method-args">()</span>
207
207
  </a>
208
208
  </div>
@@ -219,8 +219,8 @@ view. By default this method does nothing!
219
219
  Use the current renderer as returned by renderer or it&#8217;s short-cut r.
220
220
  </p>
221
221
  <p><a class="source-toggle" href="#"
222
- onclick="toggleCode('M000209-source');return false;">[Source]</a></p>
223
- <div class="method-source-code" id="M000209-source">
222
+ onclick="toggleCode('M000250-source');return false;">[Source]</a></p>
223
+ <div class="method-source-code" id="M000250-source">
224
224
  <pre>
225
225
  <span class="ruby-comment cmt"># File lib/wee/core/component.rb, line 30</span>
226
226
  <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">render</span>
@@ -233,7 +233,7 @@ Use the current renderer as returned by renderer or it&#8217;s short-cut r.
233
233
 
234
234
  </div>
235
235
  <div id="section">
236
- <h2 class="section-title"><a name="SEC00075">Callback</a></h2>
236
+ <h2 class="section-title"><a name="SEC00073">Callback</a></h2>
237
237
  <div class="section-comment">
238
238
 
239
239
  </div>
@@ -249,11 +249,11 @@ Use the current renderer as returned by renderer or it&#8217;s short-cut r.
249
249
  <div id="methods">
250
250
  <h3 class="section-bar">Public Instance methods</h3>
251
251
 
252
- <div id="method-M000211" class="method-detail">
253
- <a name="M000211"></a>
252
+ <div id="method-M000252" class="method-detail">
253
+ <a name="M000252"></a>
254
254
 
255
255
  <div class="method-heading">
256
- <a href="#M000211" class="method-signature">
256
+ <a href="#M000252" class="method-signature">
257
257
  <span class="method-name">process_callbacks</span><span class="method-args">(callback_stream)</span>
258
258
  </a>
259
259
  </div>
@@ -273,8 +273,8 @@ processed/invoked before any of the action callbacks are processed/invoked.
273
273
  </dd>
274
274
  </dl>
275
275
  <p><a class="source-toggle" href="#"
276
- onclick="toggleCode('M000211-source');return false;">[Source]</a></p>
277
- <div class="method-source-code" id="M000211-source">
276
+ onclick="toggleCode('M000252-source');return false;">[Source]</a></p>
277
+ <div class="method-source-code" id="M000252-source">
278
278
  <pre>
279
279
  <span class="ruby-comment cmt"># File lib/wee/core/component.rb, line 59</span>
280
280
  <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">process_callbacks</span>(<span class="ruby-identifier">callback_stream</span>)
@@ -290,11 +290,11 @@ processed/invoked before any of the action callbacks are processed/invoked.
290
290
  </div>
291
291
  </div>
292
292
 
293
- <div id="method-M000210" class="method-detail">
294
- <a name="M000210"></a>
293
+ <div id="method-M000251" class="method-detail">
294
+ <a name="M000251"></a>
295
295
 
296
296
  <div class="method-heading">
297
- <a href="#M000210" class="method-signature">
297
+ <a href="#M000251" class="method-signature">
298
298
  <span class="method-name">process_callbacks_chain</span><span class="method-args">(callback_stream)</span>
299
299
  </a>
300
300
  </div>
@@ -302,7 +302,7 @@ processed/invoked before any of the action callbacks are processed/invoked.
302
302
  <div class="method-description">
303
303
  <p>
304
304
  Starts processing the callbacks for the decoration chain by invoking method
305
- <a href="Component.html#M000211">process_callbacks</a> of the first
305
+ <a href="Component.html#M000252">process_callbacks</a> of the first
306
306
  decoration or the component itself if no decorations were specified.
307
307
  </p>
308
308
  <dl>
@@ -311,8 +311,8 @@ decoration or the component itself if no decorations were specified.
311
311
  </dd>
312
312
  </dl>
313
313
  <p><a class="source-toggle" href="#"
314
- onclick="toggleCode('M000210-source');return false;">[Source]</a></p>
315
- <div class="method-source-code" id="M000210-source">
314
+ onclick="toggleCode('M000251-source');return false;">[Source]</a></p>
315
+ <div class="method-source-code" id="M000251-source">
316
316
  <pre>
317
317
  <span class="ruby-comment cmt"># File lib/wee/core/component.rb, line 46</span>
318
318
  <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">process_callbacks_chain</span>(<span class="ruby-identifier">callback_stream</span>)
@@ -326,7 +326,7 @@ decoration or the component itself if no decorations were specified.
326
326
 
327
327
  </div>
328
328
  <div id="section">
329
- <h2 class="section-title"><a name="SEC00076">Init</a></h2>
329
+ <h2 class="section-title"><a name="SEC00074">Init</a></h2>
330
330
  <div class="section-comment">
331
331
 
332
332
  </div>
@@ -342,11 +342,11 @@ decoration or the component itself if no decorations were specified.
342
342
  <div id="methods">
343
343
  <h3 class="section-bar">Protected Instance methods</h3>
344
344
 
345
- <div id="method-M000212" class="method-detail">
346
- <a name="M000212"></a>
345
+ <div id="method-M000253" class="method-detail">
346
+ <a name="M000253"></a>
347
347
 
348
348
  <div class="method-heading">
349
- <a href="#M000212" class="method-signature">
349
+ <a href="#M000253" class="method-signature">
350
350
  <span class="method-name">initialize</span><span class="method-args">()</span>
351
351
  </a>
352
352
  </div>
@@ -360,8 +360,8 @@ Call this method from your own components&#8217; <em>initialize</em> method
360
360
  using <tt>super</tt>, before setting up anything else!
361
361
  </p>
362
362
  <p><a class="source-toggle" href="#"
363
- onclick="toggleCode('M000212-source');return false;">[Source]</a></p>
364
- <div class="method-source-code" id="M000212-source">
363
+ onclick="toggleCode('M000253-source');return false;">[Source]</a></p>
364
+ <div class="method-source-code" id="M000253-source">
365
365
  <pre>
366
366
  <span class="ruby-comment cmt"># File lib/wee/core/component.rb, line 79</span>
367
367
  <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>() <span class="ruby-comment cmt"># :notnew:</span>
@@ -376,7 +376,7 @@ using <tt>super</tt>, before setting up anything else!
376
376
 
377
377
  </div>
378
378
  <div id="section">
379
- <h2 class="section-title"><a name="SEC00077">Children</a></h2>
379
+ <h2 class="section-title"><a name="SEC00075">Children</a></h2>
380
380
  <div class="section-comment">
381
381
 
382
382
  </div>
@@ -392,11 +392,11 @@ using <tt>super</tt>, before setting up anything else!
392
392
  <div id="methods">
393
393
  <h3 class="section-bar">Protected Instance methods</h3>
394
394
 
395
- <div id="method-M000214" class="method-detail">
396
- <a name="M000214"></a>
395
+ <div id="method-M000255" class="method-detail">
396
+ <a name="M000255"></a>
397
397
 
398
398
  <div class="method-heading">
399
- <a href="#M000214" class="method-signature">
399
+ <a href="#M000255" class="method-signature">
400
400
  <span class="method-name">add_child</span><span class="method-args">(child)</span>
401
401
  </a>
402
402
  </div>
@@ -425,8 +425,8 @@ course only if you want backtracking at all):
425
425
  end
426
426
  </pre>
427
427
  <p><a class="source-toggle" href="#"
428
- onclick="toggleCode('M000214-source');return false;">[Source]</a></p>
429
- <div class="method-source-code" id="M000214-source">
428
+ onclick="toggleCode('M000255-source');return false;">[Source]</a></p>
429
+ <div class="method-source-code" id="M000255-source">
430
430
  <pre>
431
431
  <span class="ruby-comment cmt"># File lib/wee/core/component.rb, line 115</span>
432
432
  <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">add_child</span>(<span class="ruby-identifier">child</span>)
@@ -438,11 +438,11 @@ course only if you want backtracking at all):
438
438
  </div>
439
439
  </div>
440
440
 
441
- <div id="method-M000213" class="method-detail">
442
- <a name="M000213"></a>
441
+ <div id="method-M000254" class="method-detail">
442
+ <a name="M000254"></a>
443
443
 
444
444
  <div class="method-heading">
445
- <a href="#M000213" class="method-signature">
445
+ <a href="#M000254" class="method-signature">
446
446
  <span class="method-name">children</span><span class="method-args">()</span>
447
447
  </a>
448
448
  </div>
@@ -452,8 +452,8 @@ course only if you want backtracking at all):
452
452
  Returns all direct child components collected in an array.
453
453
  </p>
454
454
  <p><a class="source-toggle" href="#"
455
- onclick="toggleCode('M000213-source');return false;">[Source]</a></p>
456
- <div class="method-source-code" id="M000213-source">
455
+ onclick="toggleCode('M000254-source');return false;">[Source]</a></p>
456
+ <div class="method-source-code" id="M000254-source">
457
457
  <pre>
458
458
  <span class="ruby-comment cmt"># File lib/wee/core/component.rb, line 92</span>
459
459
  <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">children</span>
@@ -467,7 +467,7 @@ Returns all direct child components collected in an array.
467
467
 
468
468
  </div>
469
469
  <div id="section">
470
- <h2 class="section-title"><a name="SEC00078">Decoration</a></h2>
470
+ <h2 class="section-title"><a name="SEC00076">Decoration</a></h2>
471
471
  <div class="section-comment">
472
472
 
473
473
  </div>
@@ -483,11 +483,11 @@ Returns all direct child components collected in an array.
483
483
  <div id="methods">
484
484
  <h3 class="section-bar">Public Instance methods</h3>
485
485
 
486
- <div id="method-M000218" class="method-detail">
487
- <a name="M000218"></a>
486
+ <div id="method-M000259" class="method-detail">
487
+ <a name="M000259"></a>
488
488
 
489
489
  <div class="method-heading">
490
- <a href="#M000218" class="method-signature">
490
+ <a href="#M000259" class="method-signature">
491
491
  <span class="method-name">add_decoration</span><span class="method-args">(d)</span>
492
492
  </a>
493
493
  </div>
@@ -500,12 +500,15 @@ Adds decoration <tt>d</tt> to the decoration chain.
500
500
  A global decoration is added in front of the decoration chain, a local
501
501
  decoration is added in front of all other local decorations but after all
502
502
  global decorations.
503
+ </p>
504
+ <p>
505
+ Returns: <tt>self</tt>
503
506
  </p>
504
507
  <p><a class="source-toggle" href="#"
505
- onclick="toggleCode('M000218-source');return false;">[Source]</a></p>
506
- <div class="method-source-code" id="M000218-source">
508
+ onclick="toggleCode('M000259-source');return false;">[Source]</a></p>
509
+ <div class="method-source-code" id="M000259-source">
507
510
  <pre>
508
- <span class="ruby-comment cmt"># File lib/wee/core/component.rb, line 156</span>
511
+ <span class="ruby-comment cmt"># File lib/wee/core/component.rb, line 158</span>
509
512
  <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">add_decoration</span>(<span class="ruby-identifier">d</span>)
510
513
  <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">d</span>.<span class="ruby-identifier">global?</span>
511
514
  <span class="ruby-identifier">d</span>.<span class="ruby-identifier">owner</span> = <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">decoration</span>
@@ -529,17 +532,19 @@ global decorations.
529
532
  <span class="ruby-identifier">last_global</span>.<span class="ruby-identifier">owner</span> = <span class="ruby-identifier">d</span>
530
533
  <span class="ruby-keyword kw">end</span>
531
534
  <span class="ruby-keyword kw">end</span>
535
+
536
+ <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">self</span>
532
537
  <span class="ruby-keyword kw">end</span>
533
538
  </pre>
534
539
  </div>
535
540
  </div>
536
541
  </div>
537
542
 
538
- <div id="method-M000215" class="method-detail">
539
- <a name="M000215"></a>
543
+ <div id="method-M000256" class="method-detail">
544
+ <a name="M000256"></a>
540
545
 
541
546
  <div class="method-heading">
542
- <a href="#M000215" class="method-signature">
547
+ <a href="#M000256" class="method-signature">
543
548
  <span class="method-name">decoration</span><span class="method-args">()</span>
544
549
  </a>
545
550
  </div>
@@ -550,8 +555,8 @@ Returns the first decoration from the component&#8217;s decoration chain,
550
555
  or <tt>self</tt> if no decorations were specified for the component.
551
556
  </p>
552
557
  <p><a class="source-toggle" href="#"
553
- onclick="toggleCode('M000215-source');return false;">[Source]</a></p>
554
- <div class="method-source-code" id="M000215-source">
558
+ onclick="toggleCode('M000256-source');return false;">[Source]</a></p>
559
+ <div class="method-source-code" id="M000256-source">
555
560
  <pre>
556
561
  <span class="ruby-comment cmt"># File lib/wee/core/component.rb, line 129</span>
557
562
  <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">decoration</span>
@@ -562,11 +567,11 @@ or <tt>self</tt> if no decorations were specified for the component.
562
567
  </div>
563
568
  </div>
564
569
 
565
- <div id="method-M000216" class="method-detail">
566
- <a name="M000216"></a>
570
+ <div id="method-M000257" class="method-detail">
571
+ <a name="M000257"></a>
567
572
 
568
573
  <div class="method-heading">
569
- <a href="#M000216" class="method-signature">
574
+ <a href="#M000257" class="method-signature">
570
575
  <span class="method-name">decoration=</span><span class="method-args">(d)</span>
571
576
  </a>
572
577
  </div>
@@ -576,8 +581,8 @@ or <tt>self</tt> if no decorations were specified for the component.
576
581
  Set the pointer to the first decoration to <tt>d</tt>.
577
582
  </p>
578
583
  <p><a class="source-toggle" href="#"
579
- onclick="toggleCode('M000216-source');return false;">[Source]</a></p>
580
- <div class="method-source-code" id="M000216-source">
584
+ onclick="toggleCode('M000257-source');return false;">[Source]</a></p>
585
+ <div class="method-source-code" id="M000257-source">
581
586
  <pre>
582
587
  <span class="ruby-comment cmt"># File lib/wee/core/component.rb, line 135</span>
583
588
  <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">decoration=</span>(<span class="ruby-identifier">d</span>)
@@ -588,11 +593,11 @@ Set the pointer to the first decoration to <tt>d</tt>.
588
593
  </div>
589
594
  </div>
590
595
 
591
- <div id="method-M000217" class="method-detail">
592
- <a name="M000217"></a>
596
+ <div id="method-M000258" class="method-detail">
597
+ <a name="M000258"></a>
593
598
 
594
599
  <div class="method-heading">
595
- <a href="#M000217" class="method-signature">
600
+ <a href="#M000258" class="method-signature">
596
601
  <span class="method-name">each_decoration</span><span class="method-args">( {|decoration| ...}</span>
597
602
  </a>
598
603
  </div>
@@ -602,8 +607,8 @@ Set the pointer to the first decoration to <tt>d</tt>.
602
607
  Iterates over all decorations (note that the component itself is excluded).
603
608
  </p>
604
609
  <p><a class="source-toggle" href="#"
605
- onclick="toggleCode('M000217-source');return false;">[Source]</a></p>
606
- <div class="method-source-code" id="M000217-source">
610
+ onclick="toggleCode('M000258-source');return false;">[Source]</a></p>
611
+ <div class="method-source-code" id="M000258-source">
607
612
  <pre>
608
613
  <span class="ruby-comment cmt"># File lib/wee/core/component.rb, line 141</span>
609
614
  <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">each_decoration</span> <span class="ruby-comment cmt"># :yields: decoration</span>
@@ -619,11 +624,11 @@ Iterates over all decorations (note that the component itself is excluded).
619
624
  </div>
620
625
  </div>
621
626
 
622
- <div id="method-M000219" class="method-detail">
623
- <a name="M000219"></a>
627
+ <div id="method-M000260" class="method-detail">
628
+ <a name="M000260"></a>
624
629
 
625
630
  <div class="method-heading">
626
- <a href="#M000219" class="method-signature">
631
+ <a href="#M000260" class="method-signature">
627
632
  <span class="method-name">remove_decoration</span><span class="method-args">(d)</span>
628
633
  </a>
629
634
  </div>
@@ -637,10 +642,10 @@ Returns the removed decoration or <tt>nil</tt> if it did not exist in the
637
642
  decoration chain.
638
643
  </p>
639
644
  <p><a class="source-toggle" href="#"
640
- onclick="toggleCode('M000219-source');return false;">[Source]</a></p>
641
- <div class="method-source-code" id="M000219-source">
645
+ onclick="toggleCode('M000260-source');return false;">[Source]</a></p>
646
+ <div class="method-source-code" id="M000260-source">
642
647
  <pre>
643
- <span class="ruby-comment cmt"># File lib/wee/core/component.rb, line 186</span>
648
+ <span class="ruby-comment cmt"># File lib/wee/core/component.rb, line 190</span>
644
649
  <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">remove_decoration</span>(<span class="ruby-identifier">d</span>)
645
650
  <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">d</span> <span class="ruby-operator">==</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">decoration</span> <span class="ruby-comment cmt"># 'd' is in front</span>
646
651
  <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">decoration</span> = <span class="ruby-identifier">d</span>.<span class="ruby-identifier">owner</span>
@@ -663,11 +668,11 @@ decoration chain.
663
668
  </div>
664
669
  </div>
665
670
 
666
- <div id="method-M000220" class="method-detail">
667
- <a name="M000220"></a>
671
+ <div id="method-M000261" class="method-detail">
672
+ <a name="M000261"></a>
668
673
 
669
674
  <div class="method-heading">
670
- <a href="#M000220" class="method-signature">
675
+ <a href="#M000261" class="method-signature">
671
676
  <span class="method-name">remove_decoration_if</span><span class="method-args">( {|decoration| ...}</span>
672
677
  </a>
673
678
  </div>
@@ -683,10 +688,10 @@ Example (removes all decorations of class <tt>HaloDecoration</tt>):
683
688
  remove_decoration_if {|d| d.class == HaloDecoration}
684
689
  </pre>
685
690
  <p><a class="source-toggle" href="#"
686
- onclick="toggleCode('M000220-source');return false;">[Source]</a></p>
687
- <div class="method-source-code" id="M000220-source">
691
+ onclick="toggleCode('M000261-source');return false;">[Source]</a></p>
692
+ <div class="method-source-code" id="M000261-source">
688
693
  <pre>
689
- <span class="ruby-comment cmt"># File lib/wee/core/component.rb, line 211</span>
694
+ <span class="ruby-comment cmt"># File lib/wee/core/component.rb, line 215</span>
690
695
  <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">remove_decoration_if</span> <span class="ruby-comment cmt"># :yields: decoration</span>
691
696
  <span class="ruby-identifier">to_remove</span> = []
692
697
  <span class="ruby-identifier">each_decoration</span> {<span class="ruby-operator">|</span><span class="ruby-identifier">d</span><span class="ruby-operator">|</span> <span class="ruby-identifier">to_remove</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-identifier">d</span> <span class="ruby-keyword kw">if</span> <span class="ruby-keyword kw">yield</span> <span class="ruby-identifier">d</span>}
@@ -700,7 +705,7 @@ Example (removes all decorations of class <tt>HaloDecoration</tt>):
700
705
 
701
706
  </div>
702
707
  <div id="section">
703
- <h2 class="section-title"><a name="SEC00079">Backtrack</a></h2>
708
+ <h2 class="section-title"><a name="SEC00077">Backtrack</a></h2>
704
709
  <div class="section-comment">
705
710
 
706
711
  </div>
@@ -716,11 +721,11 @@ Example (removes all decorations of class <tt>HaloDecoration</tt>):
716
721
  <div id="methods">
717
722
  <h3 class="section-bar">Public Instance methods</h3>
718
723
 
719
- <div id="method-M000222" class="method-detail">
720
- <a name="M000222"></a>
724
+ <div id="method-M000263" class="method-detail">
725
+ <a name="M000263"></a>
721
726
 
722
727
  <div class="method-heading">
723
- <a href="#M000222" class="method-signature">
728
+ <a href="#M000263" class="method-signature">
724
729
  <span class="method-name">backtrack_state</span><span class="method-args">(snapshot)</span>
725
730
  </a>
726
731
  </div>
@@ -747,7 +752,7 @@ the decoration-object itself!).
747
752
  <p>
748
753
  For example if you dynamically add children to your component, you might
749
754
  want to backtrack the children array. Therefore you simply pass it to the
750
- <a href="Snapshot.html#M000093">Snapshot#add</a> method:
755
+ <a href="Snapshot.html#M000138">Snapshot#add</a> method:
751
756
  </p>
752
757
  <pre>
753
758
  def backtrack_state(snapshot)
@@ -756,11 +761,11 @@ want to backtrack the children array. Therefore you simply pass it to the
756
761
  end
757
762
  </pre>
758
763
  <p>
759
- This will call <a href="../Array.html#M000005">Array#take_snapshot</a> to
764
+ This will call <a href="../Array.html#M000010">Array#take_snapshot</a> to
760
765
  take the snapshot for the children array. If at a later point in time a
761
766
  snapshot is restored, <a
762
- href="../Array.html#M000006">Array#restore_snapshot</a> will be called with
763
- the return value of <a href="../Array.html#M000005">Array#take_snapshot</a>
767
+ href="../Array.html#M000011">Array#restore_snapshot</a> will be called with
768
+ the return value of <a href="../Array.html#M000010">Array#take_snapshot</a>
764
769
  as argument.
765
770
  </p>
766
771
  <dl>
@@ -769,10 +774,10 @@ as argument.
769
774
  </dd>
770
775
  </dl>
771
776
  <p><a class="source-toggle" href="#"
772
- onclick="toggleCode('M000222-source');return false;">[Source]</a></p>
773
- <div class="method-source-code" id="M000222-source">
777
+ onclick="toggleCode('M000263-source');return false;">[Source]</a></p>
778
+ <div class="method-source-code" id="M000263-source">
774
779
  <pre>
775
- <span class="ruby-comment cmt"># File lib/wee/core/component.rb, line 268</span>
780
+ <span class="ruby-comment cmt"># File lib/wee/core/component.rb, line 272</span>
776
781
  <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">backtrack_state</span>(<span class="ruby-identifier">snapshot</span>)
777
782
  <span class="ruby-identifier">snapshot</span>.<span class="ruby-identifier">add</span>(<span class="ruby-ivar">@decoration</span>)
778
783
  <span class="ruby-identifier">children</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">child</span><span class="ruby-operator">|</span> <span class="ruby-identifier">child</span>.<span class="ruby-identifier">backtrack_state_chain</span>(<span class="ruby-identifier">snapshot</span>) <span class="ruby-keyword kw">end</span>
@@ -782,11 +787,11 @@ as argument.
782
787
  </div>
783
788
  </div>
784
789
 
785
- <div id="method-M000221" class="method-detail">
786
- <a name="M000221"></a>
790
+ <div id="method-M000262" class="method-detail">
791
+ <a name="M000262"></a>
787
792
 
788
793
  <div class="method-heading">
789
- <a href="#M000221" class="method-signature">
794
+ <a href="#M000262" class="method-signature">
790
795
  <span class="method-name">backtrack_state_chain</span><span class="method-args">(snapshot)</span>
791
796
  </a>
792
797
  </div>
@@ -794,11 +799,11 @@ as argument.
794
799
  <div class="method-description">
795
800
  <p>
796
801
  Starts the backtrack-state phase for the decoration chain, by invoking
797
- method <a href="Component.html#M000222">backtrack_state</a> of the first
802
+ method <a href="Component.html#M000263">backtrack_state</a> of the first
798
803
  decoration or the component itself if no decorations were specified.
799
804
  </p>
800
805
  <p>
801
- See <a href="Component.html#M000222">backtrack_state</a> for details.
806
+ See <a href="Component.html#M000263">backtrack_state</a> for details.
802
807
  </p>
803
808
  <dl>
804
809
  <dt><tt>snapshot</tt></dt><dd>An object of class <a href="Snapshot.html">Snapshot</a>
@@ -806,10 +811,10 @@ See <a href="Component.html#M000222">backtrack_state</a> for details.
806
811
  </dd>
807
812
  </dl>
808
813
  <p><a class="source-toggle" href="#"
809
- onclick="toggleCode('M000221-source');return false;">[Source]</a></p>
810
- <div class="method-source-code" id="M000221-source">
814
+ onclick="toggleCode('M000262-source');return false;">[Source]</a></p>
815
+ <div class="method-source-code" id="M000262-source">
811
816
  <pre>
812
- <span class="ruby-comment cmt"># File lib/wee/core/component.rb, line 232</span>
817
+ <span class="ruby-comment cmt"># File lib/wee/core/component.rb, line 236</span>
813
818
  <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">backtrack_state_chain</span>(<span class="ruby-identifier">snapshot</span>)
814
819
  <span class="ruby-identifier">decoration</span>.<span class="ruby-identifier">backtrack_state</span>(<span class="ruby-identifier">snapshot</span>)
815
820
  <span class="ruby-keyword kw">end</span>
@@ -821,7 +826,7 @@ See <a href="Component.html#M000222">backtrack_state</a> for details.
821
826
 
822
827
  </div>
823
828
  <div id="section">
824
- <h2 class="section-title"><a name="SEC00080">Call/Answer</a></h2>
829
+ <h2 class="section-title"><a name="SEC00078">Call/Answer</a></h2>
825
830
  <div class="section-comment">
826
831
 
827
832
  </div>
@@ -843,11 +848,11 @@ See <a href="Component.html#M000222">backtrack_state</a> for details.
843
848
  <div id="methods">
844
849
  <h3 class="section-bar">Protected Instance methods</h3>
845
850
 
846
- <div id="method-M000224" class="method-detail">
847
- <a name="M000224"></a>
851
+ <div id="method-M000265" class="method-detail">
852
+ <a name="M000265"></a>
848
853
 
849
854
  <div class="method-heading">
850
- <a href="#M000224" class="method-signature">
855
+ <a href="#M000265" class="method-signature">
851
856
  <span class="method-name">answer</span><span class="method-args">(*args)</span>
852
857
  </a>
853
858
  </div>
@@ -857,17 +862,17 @@ See <a href="Component.html#M000222">backtrack_state</a> for details.
857
862
  Return from a called component.
858
863
  </p>
859
864
  <p>
860
- NOTE that <a href="Component.html#M000224">answer</a> never returns.
865
+ NOTE that <a href="Component.html#M000265">answer</a> never returns.
861
866
  </p>
862
867
  <p>
863
- See <a href="Component.html#M000223">call</a> for a detailed description of
868
+ See <a href="Component.html#M000264">call</a> for a detailed description of
864
869
  the call/answer mechanism.
865
870
  </p>
866
871
  <p><a class="source-toggle" href="#"
867
- onclick="toggleCode('M000224-source');return false;">[Source]</a></p>
868
- <div class="method-source-code" id="M000224-source">
872
+ onclick="toggleCode('M000265-source');return false;">[Source]</a></p>
873
+ <div class="method-source-code" id="M000265-source">
869
874
  <pre>
870
- <span class="ruby-comment cmt"># File lib/wee/core/component.rb, line 346</span>
875
+ <span class="ruby-comment cmt"># File lib/wee/core/component.rb, line 350</span>
871
876
  <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">answer</span>(<span class="ruby-operator">*</span><span class="ruby-identifier">args</span>)
872
877
  <span class="ruby-identifier">throw</span> <span class="ruby-identifier">:wee_answer</span>, <span class="ruby-identifier">args</span>
873
878
  <span class="ruby-keyword kw">end</span>
@@ -876,17 +881,40 @@ the call/answer mechanism.
876
881
  </div>
877
882
  </div>
878
883
 
879
- <div id="method-M000223" class="method-detail">
880
- <a name="M000223"></a>
884
+ <div id="method-M000264" class="method-detail">
885
+ <a name="M000264"></a>
881
886
 
882
887
  <div class="method-heading">
883
- <a href="#M000223" class="method-signature">
884
- <span class="method-name">call</span><span class="method-args">(component, return_callback=nil, *additional_args)</span>
888
+ <a href="#M000264" class="method-signature">
889
+ <span class="method-name">call</span><span class="method-args">(component, return_callback=nil, *args)</span>
885
890
  </a>
886
891
  </div>
887
892
 
888
893
  <div class="method-description">
889
894
  <p>
895
+ Call another component. The calling component is neither rendered nor are
896
+ it&#8217;s callbacks processed until the called component answers using
897
+ method <a href="Component.html#M000265">answer</a>.
898
+ </p>
899
+ <dl>
900
+ <dt><tt>component</tt></dt><dd>The component to be called.
901
+
902
+ </dd>
903
+ <dt><tt>return_callback</tt></dt><dd>Is invoked when the called component answers. Either a symbol or any object
904
+ that responds to <a href="Component.html#M000264">call</a>. If it&#8217;s a
905
+ symbol, then the corresponding method of the current component will be
906
+ called.
907
+
908
+ </dd>
909
+ <dt><tt>args</tt></dt><dd>Arguments that are passed to the <tt>return_callback</tt> before the
910
+ &#8216;onanswer&#8217; arguments.
911
+
912
+ </dd>
913
+ </dl>
914
+ <p>
915
+ <b>How it works</b>
916
+ </p>
917
+ <p>
890
918
  The component to be called is wrapped with an <a
891
919
  href="AnswerDecoration.html">AnswerDecoration</a> and the
892
920
  <tt>return_callback</tt> parameter is assigned to it&#8217;s
@@ -906,24 +934,24 @@ we&#8217;d break compatibility with the implementation using continuations.
906
934
  </p>
907
935
  <p>
908
936
  When at a later point in time the called component invokes <a
909
- href="Component.html#M000224">answer</a>, this will throw a
937
+ href="Component.html#M000265">answer</a>, this will throw a
910
938
  <em>:wee_answer</em> exception which is catched in the <a
911
939
  href="AnswerDecoration.html">AnswerDecoration</a>. The <a
912
940
  href="AnswerDecoration.html">AnswerDecoration</a> then invokes the
913
941
  <tt>on_answer</tt> callback which cleans up the decorations we added during
914
- <a href="Component.html#M000223">call</a>, and finally passes control to
942
+ <a href="Component.html#M000264">call</a>, and finally passes control to
915
943
  the <tt>return_callback</tt>.
916
944
  </p>
917
945
  <p><a class="source-toggle" href="#"
918
- onclick="toggleCode('M000223-source');return false;">[Source]</a></p>
919
- <div class="method-source-code" id="M000223-source">
946
+ onclick="toggleCode('M000264-source');return false;">[Source]</a></p>
947
+ <div class="method-source-code" id="M000264-source">
920
948
  <pre>
921
- <span class="ruby-comment cmt"># File lib/wee/core/component.rb, line 317</span>
922
- <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">call</span>(<span class="ruby-identifier">component</span>, <span class="ruby-identifier">return_callback</span>=<span class="ruby-keyword kw">nil</span>, <span class="ruby-operator">*</span><span class="ruby-identifier">additional_args</span>)
949
+ <span class="ruby-comment cmt"># File lib/wee/core/component.rb, line 321</span>
950
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">call</span>(<span class="ruby-identifier">component</span>, <span class="ruby-identifier">return_callback</span>=<span class="ruby-keyword kw">nil</span>, <span class="ruby-operator">*</span><span class="ruby-identifier">args</span>)
923
951
  <span class="ruby-identifier">add_decoration</span>(<span class="ruby-identifier">delegate</span> = <span class="ruby-constant">Wee</span><span class="ruby-operator">::</span><span class="ruby-constant">Delegate</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">component</span>))
924
952
  <span class="ruby-identifier">component</span>.<span class="ruby-identifier">add_decoration</span>(<span class="ruby-identifier">answer</span> = <span class="ruby-constant">Wee</span><span class="ruby-operator">::</span><span class="ruby-constant">AnswerDecoration</span>.<span class="ruby-identifier">new</span>)
925
953
  <span class="ruby-identifier">answer</span>.<span class="ruby-identifier">on_answer</span> = <span class="ruby-constant">OnAnswer</span>.<span class="ruby-identifier">new</span>(<span class="ruby-keyword kw">self</span>, <span class="ruby-identifier">component</span>, <span class="ruby-identifier">delegate</span>, <span class="ruby-identifier">answer</span>,
926
- <span class="ruby-identifier">return_callback</span>, <span class="ruby-identifier">additional_args</span>)
954
+ <span class="ruby-identifier">return_callback</span>, <span class="ruby-identifier">args</span>)
927
955
  <span class="ruby-identifier">throw</span> <span class="ruby-identifier">:wee_back_to_session</span>
928
956
  <span class="ruby-keyword kw">end</span>
929
957
  </pre>
@@ -934,7 +962,7 @@ the <tt>return_callback</tt>.
934
962
 
935
963
  </div>
936
964
  <div id="section">
937
- <h2 class="section-title"><a name="SEC00120">Call/Answer</a></h2>
965
+ <h2 class="section-title"><a name="SEC00121">Call/Answer</a></h2>
938
966
  <div class="section-comment">
939
967
 
940
968
  </div>
@@ -950,11 +978,11 @@ the <tt>return_callback</tt>.
950
978
  <div id="methods">
951
979
  <h3 class="section-bar">Protected Instance methods</h3>
952
980
 
953
- <div id="method-M000225" class="method-detail">
954
- <a name="M000225"></a>
981
+ <div id="method-M000266" class="method-detail">
982
+ <a name="M000266"></a>
955
983
 
956
984
  <div class="method-heading">
957
- <a href="#M000225" class="method-signature">
985
+ <a href="#M000266" class="method-signature">
958
986
  <span class="method-name">call</span><span class="method-args">(component, return_callback=:use_continuation, *additional_args)</span>
959
987
  </a>
960
988
  </div>
@@ -963,7 +991,7 @@ the <tt>return_callback</tt>.
963
991
  <p>
964
992
  Call another component. The calling component is neither rendered nor are
965
993
  it&#8217;s callbacks processed until the called component answers using
966
- method <a href="Component.html#M000224">answer</a>.
994
+ method <a href="Component.html#M000265">answer</a>.
967
995
  </p>
968
996
  <dl>
969
997
  <dt><tt>component</tt></dt><dd>The component to be called.
@@ -983,15 +1011,15 @@ calling component (self), which delegates to the component to be called
983
1011
  href="Session.html">Session</a> by throwing <em>:wee_back_to_session</em>.
984
1012
  This means, that there is only ever one action callback invoked per
985
1013
  request. When at a later point in time the called component invokes <a
986
- href="Component.html#M000224">answer</a>, this will throw a
1014
+ href="Component.html#M000265">answer</a>, this will throw a
987
1015
  <em>:wee_answer</em> exception which is catched in the <a
988
1016
  href="AnswerDecoration.html">AnswerDecoration</a>. The <a
989
1017
  href="AnswerDecoration.html">AnswerDecoration</a> then jumps back to the
990
1018
  continuation we created at the beginning, and finally method <a
991
- href="Component.html#M000223">call</a> returns.
1019
+ href="Component.html#M000264">call</a> returns.
992
1020
  </p>
993
1021
  <p>
994
- Note that <a href="Component.html#M000223">call</a> returns to an
1022
+ Note that <a href="Component.html#M000264">call</a> returns to an
995
1023
  &quot;old&quot; stack-frame from a previous request. That is why we throw
996
1024
  <em>:wee_back_to_session</em> after invoking an action callback, and
997
1025
  that&#8217;s why only ever one is invoked. We could remove this limitation
@@ -999,8 +1027,8 @@ without problems, but then there would be a difference between those action
999
1027
  callbacks that call other components and those that do not.
1000
1028
  </p>
1001
1029
  <p><a class="source-toggle" href="#"
1002
- onclick="toggleCode('M000225-source');return false;">[Source]</a></p>
1003
- <div class="method-source-code" id="M000225-source">
1030
+ onclick="toggleCode('M000266-source');return false;">[Source]</a></p>
1031
+ <div class="method-source-code" id="M000266-source">
1004
1032
  <pre>
1005
1033
  <span class="ruby-comment cmt"># File lib/wee/continuation/core/component.rb, line 36</span>
1006
1034
  <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">call</span>(<span class="ruby-identifier">component</span>, <span class="ruby-identifier">return_callback</span>=<span class="ruby-identifier">:use_continuation</span>, <span class="ruby-operator">*</span><span class="ruby-identifier">additional_args</span>)