wee 0.5.0 → 0.6.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (157) hide show
  1. data/ChangeLog +132 -0
  2. data/INSTALL +13 -3
  3. data/README +3 -3
  4. data/Rakefile +5 -1
  5. data/bin/wee +100 -0
  6. data/doc/rdoc/classes/Array.html +12 -12
  7. data/doc/rdoc/classes/Cache/StorageCache.html +38 -38
  8. data/doc/rdoc/classes/Cache/Strategy/CapacityBounded.html +30 -30
  9. data/doc/rdoc/classes/Cache/Strategy/LFU.html +24 -24
  10. data/doc/rdoc/classes/Cache/Strategy/LRU.html +24 -24
  11. data/doc/rdoc/classes/Cache/Strategy/Unbounded.html +24 -24
  12. data/doc/rdoc/classes/Enumerable.html +6 -6
  13. data/doc/rdoc/classes/Main.html +265 -0
  14. data/doc/rdoc/classes/Object.html +12 -12
  15. data/doc/rdoc/classes/OgApplication.html +2 -2
  16. data/doc/rdoc/classes/OgScaffolder.html +444 -64
  17. data/doc/rdoc/classes/OgScaffolder/Editor.html +490 -0
  18. data/doc/rdoc/classes/OgSession.html +4 -4
  19. data/doc/rdoc/classes/Recipe.html +113 -0
  20. data/doc/rdoc/classes/String.html +12 -12
  21. data/doc/rdoc/classes/Struct.html +12 -12
  22. data/doc/rdoc/classes/Wee.html +10 -1
  23. data/doc/rdoc/classes/Wee/AnswerDecoration.html +9 -9
  24. data/doc/rdoc/classes/Wee/Application.html +48 -47
  25. data/doc/rdoc/classes/Wee/Brush.html +19 -23
  26. data/doc/rdoc/classes/Wee/Brush/AnchorTag.html +17 -14
  27. data/doc/rdoc/classes/Wee/Brush/FileUploadTag.html +20 -14
  28. data/doc/rdoc/classes/Wee/Brush/FormTag.html +25 -21
  29. data/doc/rdoc/classes/Wee/Brush/GenericEncodedTextBrush.html +12 -12
  30. data/doc/rdoc/classes/Wee/Brush/GenericSingleTagBrush.html +7 -7
  31. data/doc/rdoc/classes/Wee/Brush/GenericTagBrush.html +234 -100
  32. data/doc/rdoc/classes/Wee/Brush/GenericTextBrush.html +12 -12
  33. data/doc/rdoc/classes/Wee/Brush/ImageButtonTag.html +28 -22
  34. data/doc/rdoc/classes/Wee/Brush/ImageTag.html +23 -24
  35. data/doc/rdoc/classes/Wee/Brush/InputTag.html +14 -14
  36. data/doc/rdoc/classes/Wee/Brush/JavascriptTag.html +7 -7
  37. data/doc/rdoc/classes/Wee/Brush/Page.html +14 -14
  38. data/doc/rdoc/classes/Wee/Brush/SelectListTag.html +33 -57
  39. data/doc/rdoc/classes/Wee/Brush/SelectListTag/SelectListCallback.html +154 -0
  40. data/doc/rdoc/classes/Wee/Brush/SelectOptionTag.html +7 -7
  41. data/doc/rdoc/classes/Wee/Brush/SubmitButtonTag.html +20 -14
  42. data/doc/rdoc/classes/Wee/Brush/TableDataTag.html +14 -14
  43. data/doc/rdoc/classes/Wee/Brush/TableHeaderTag.html +7 -7
  44. data/doc/rdoc/classes/Wee/Brush/TableRowTag.html +42 -42
  45. data/doc/rdoc/classes/Wee/Brush/TableTag.html +7 -7
  46. data/doc/rdoc/classes/Wee/Brush/TextAreaTag.html +27 -21
  47. data/doc/rdoc/classes/Wee/Brush/TextInputTag.html +20 -14
  48. data/doc/rdoc/classes/Wee/CallbackRegistry.html +64 -36
  49. data/doc/rdoc/classes/Wee/CallbackStream.html +21 -21
  50. data/doc/rdoc/classes/Wee/Canvas.html +24 -24
  51. data/doc/rdoc/classes/Wee/Component.html +179 -151
  52. data/doc/rdoc/classes/Wee/Component/OnAnswer.html +12 -12
  53. data/doc/rdoc/classes/Wee/Decoration.html +42 -42
  54. data/doc/rdoc/classes/Wee/Delegate.html +27 -27
  55. data/doc/rdoc/classes/Wee/ErrorResponse.html +14 -14
  56. data/doc/rdoc/classes/Wee/FormDecoration.html +6 -6
  57. data/doc/rdoc/classes/Wee/GenericResponse.html +7 -7
  58. data/doc/rdoc/classes/Wee/HtmlCanvas.html +326 -219
  59. data/doc/rdoc/classes/Wee/HtmlWriter.html +40 -40
  60. data/doc/rdoc/classes/Wee/LiteralMethodCallback.html +19 -19
  61. data/doc/rdoc/classes/Wee/Md5IdGenerator.html +181 -0
  62. data/doc/rdoc/classes/Wee/MessageBox.html +12 -12
  63. data/doc/rdoc/classes/Wee/PageDecoration.html +18 -18
  64. data/doc/rdoc/classes/Wee/PagelessApplication.html +152 -0
  65. data/doc/rdoc/classes/Wee/PagelessRequest.html +177 -0
  66. data/doc/rdoc/classes/Wee/PagelessSession.html +320 -0
  67. data/doc/rdoc/classes/Wee/Presenter.html +145 -89
  68. data/doc/rdoc/classes/Wee/RedirectResponse.html +7 -7
  69. data/doc/rdoc/classes/Wee/RefreshResponse.html +7 -7
  70. data/doc/rdoc/classes/Wee/Request.html +116 -50
  71. data/doc/rdoc/classes/Wee/RequestHandler.html +31 -31
  72. data/doc/rdoc/classes/Wee/Response.html +76 -28
  73. data/doc/rdoc/classes/Wee/Session.html +129 -506
  74. data/doc/rdoc/classes/Wee/SimpleIdGenerator.html +22 -40
  75. data/doc/rdoc/classes/Wee/Snapshot.html +19 -19
  76. data/doc/rdoc/classes/Wee/Utils.html +70 -17
  77. data/doc/rdoc/classes/Wee/Utils/LRUCache.html +6 -6
  78. data/doc/rdoc/classes/Wee/ValueHolder.html +18 -18
  79. data/doc/rdoc/classes/Wee/WEBrickAdaptor.html +82 -49
  80. data/doc/rdoc/classes/Wee/WrapperDecoration.html +6 -6
  81. data/doc/rdoc/created.rid +1 -1
  82. data/doc/rdoc/files/INSTALL.html +17 -5
  83. data/doc/rdoc/files/README.html +9 -11
  84. data/doc/rdoc/files/lib/wee/adaptors/webrick_rb.html +1 -1
  85. data/doc/rdoc/files/lib/wee/application_rb.html +1 -1
  86. data/doc/rdoc/files/lib/wee/components/page_decoration_rb.html +1 -1
  87. data/doc/rdoc/files/lib/wee/continuation/session_rb.html +1 -3
  88. data/doc/rdoc/files/lib/wee/core/callback_rb.html +1 -1
  89. data/doc/rdoc/files/lib/wee/core/component_rb.html +1 -1
  90. data/doc/rdoc/files/lib/wee/core_rb.html +3 -3
  91. data/doc/rdoc/files/lib/wee/databases/og/application_rb.html +101 -0
  92. data/doc/rdoc/files/lib/wee/databases/og/old_scaffolder_rb.html +101 -0
  93. data/doc/rdoc/files/lib/wee/databases/og/scaffolder_rb.html +108 -0
  94. data/doc/rdoc/files/lib/wee/databases/og/session_rb.html +101 -0
  95. data/doc/rdoc/files/lib/wee/databases/og_rb.html +4 -1
  96. data/doc/rdoc/files/lib/wee/idgen/md5_rb.html +115 -0
  97. data/doc/rdoc/files/lib/wee/idgen/simple_rb.html +107 -0
  98. data/doc/rdoc/files/lib/wee/pageless/application_rb.html +101 -0
  99. data/doc/rdoc/files/lib/wee/pageless/request_rb.html +101 -0
  100. data/doc/rdoc/files/lib/wee/pageless/session_rb.html +108 -0
  101. data/doc/rdoc/files/lib/wee/pageless_rb.html +110 -0
  102. data/doc/rdoc/files/lib/wee/renderer/html/brushes_rb.html +1 -1
  103. data/doc/rdoc/files/lib/wee/renderer/html/canvas_rb.html +8 -1
  104. data/doc/rdoc/files/lib/wee/request_rb.html +1 -1
  105. data/doc/rdoc/files/lib/wee/response_rb.html +1 -1
  106. data/doc/rdoc/files/lib/wee/session_rb.html +1 -1
  107. data/doc/rdoc/files/lib/wee/skeleton/og/components/main_rb.html +101 -0
  108. data/doc/rdoc/files/lib/wee/skeleton/og/conf/db_rb.html +114 -0
  109. data/doc/rdoc/files/lib/wee/skeleton/og/models/recipe_rb.html +101 -0
  110. data/doc/rdoc/files/lib/wee/skeleton/og/run_rb.html +115 -0
  111. data/doc/rdoc/files/lib/wee/skeleton/simple/components/main_rb.html +101 -0
  112. data/doc/rdoc/files/lib/wee/skeleton/simple/run_rb.html +111 -0
  113. data/doc/rdoc/files/lib/wee/template_rb.html +101 -0
  114. data/doc/rdoc/files/lib/wee/utils/autoreload_rb.html +1 -1
  115. data/doc/rdoc/files/lib/wee/utils/helper_rb.html +1 -1
  116. data/doc/rdoc/files/lib/wee_rb.html +4 -2
  117. data/doc/rdoc/fr_class_index.html +8 -4
  118. data/doc/rdoc/fr_file_index.html +17 -1
  119. data/doc/rdoc/fr_method_index.html +312 -267
  120. data/examples/live-update.rb +1 -1
  121. data/install.rb +14 -0
  122. data/lib/wee.rb +6 -2
  123. data/lib/wee/adaptors/webrick.rb +17 -5
  124. data/lib/wee/application.rb +2 -1
  125. data/lib/wee/continuation/session.rb +1 -146
  126. data/lib/wee/core/callback.rb +11 -5
  127. data/lib/wee/core/component.rb +14 -10
  128. data/lib/wee/databases/og.rb +3 -113
  129. data/lib/wee/databases/og/application.rb +3 -0
  130. data/lib/wee/databases/og/old_scaffolder.rb +98 -0
  131. data/lib/wee/databases/og/scaffolder.rb +174 -0
  132. data/lib/wee/databases/og/session.rb +9 -0
  133. data/lib/wee/idgen/md5.rb +21 -0
  134. data/lib/wee/{idgen.rb → idgen/simple.rb} +2 -4
  135. data/lib/wee/pageless.rb +3 -0
  136. data/lib/wee/pageless/application.rb +9 -0
  137. data/lib/wee/pageless/request.rb +15 -0
  138. data/lib/wee/pageless/session.rb +89 -0
  139. data/lib/wee/renderer/html/brushes.rb +100 -115
  140. data/lib/wee/renderer/html/canvas.rb +32 -2
  141. data/lib/wee/request.rb +36 -24
  142. data/lib/wee/response.rb +8 -1
  143. data/lib/wee/session.rb +13 -7
  144. data/lib/wee/skeleton/og/README +38 -0
  145. data/lib/wee/skeleton/og/components/main.rb +16 -0
  146. data/lib/wee/skeleton/og/conf/db.rb +8 -0
  147. data/lib/wee/skeleton/og/models/recipe.rb +5 -0
  148. data/lib/wee/skeleton/og/run.rb +23 -0
  149. data/lib/wee/skeleton/simple/README +32 -0
  150. data/lib/wee/skeleton/simple/components/main.rb +25 -0
  151. data/lib/wee/skeleton/simple/run.rb +12 -0
  152. data/lib/wee/template.rb +28 -0
  153. data/lib/wee/utils/autoreload.rb +29 -0
  154. data/lib/wee/utils/helper.rb +9 -5
  155. data/test/test_request.rb +4 -3
  156. data/wee.gemspec +3 -1
  157. metadata +91 -22
@@ -86,7 +86,7 @@
86
86
  <h3 class="section-bar">Methods</h3>
87
87
 
88
88
  <div class="name-list">
89
- <a href="#M000108">new</a>&nbsp;&nbsp;
89
+ <a href="#M000149">new</a>&nbsp;&nbsp;
90
90
  </div>
91
91
  </div>
92
92
 
@@ -108,21 +108,21 @@
108
108
  <div id="methods">
109
109
  <h3 class="section-bar">Public Class methods</h3>
110
110
 
111
- <div id="method-M000108" class="method-detail">
112
- <a name="M000108"></a>
111
+ <div id="method-M000149" class="method-detail">
112
+ <a name="M000149"></a>
113
113
 
114
114
  <div class="method-heading">
115
- <a href="#M000108" class="method-signature">
115
+ <a href="#M000149" class="method-signature">
116
116
  <span class="method-name">new</span><span class="method-args">()</span>
117
117
  </a>
118
118
  </div>
119
119
 
120
120
  <div class="method-description">
121
121
  <p><a class="source-toggle" href="#"
122
- onclick="toggleCode('M000108-source');return false;">[Source]</a></p>
123
- <div class="method-source-code" id="M000108-source">
122
+ onclick="toggleCode('M000149-source');return false;">[Source]</a></p>
123
+ <div class="method-source-code" id="M000149-source">
124
124
  <pre>
125
- <span class="ruby-comment cmt"># File lib/wee/renderer/html/brushes.rb, line 196</span>
125
+ <span class="ruby-comment cmt"># File lib/wee/renderer/html/brushes.rb, line 220</span>
126
126
  <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>
127
127
  <span class="ruby-keyword kw">super</span>(<span class="ruby-value str">'table'</span>)
128
128
  <span class="ruby-keyword kw">end</span>
@@ -86,8 +86,8 @@
86
86
  <h3 class="section-bar">Methods</h3>
87
87
 
88
88
  <div class="name-list">
89
- <a href="#M000104">new</a>&nbsp;&nbsp;
90
- <a href="#M000105">with</a>&nbsp;&nbsp;
89
+ <a href="#M000145">new</a>&nbsp;&nbsp;
90
+ <a href="#M000146">with</a>&nbsp;&nbsp;
91
91
  </div>
92
92
  </div>
93
93
 
@@ -95,18 +95,24 @@
95
95
 
96
96
 
97
97
  <!-- if includes -->
98
- <div id="includes">
99
- <h3 class="section-bar">Included Modules</h3>
100
-
101
- <div id="includes-list">
102
- <span class="include-name"><a href="InputCallbackMixin.html">Brush::InputCallbackMixin</a></span>
103
- </div>
104
- </div>
105
98
 
106
99
  <div id="section">
107
100
 
108
101
 
109
102
 
103
+ <div id="aliases-list">
104
+ <h3 class="section-bar">External Aliases</h3>
105
+
106
+ <div class="name-list">
107
+ <table summary="aliases">
108
+ <tr class="top-aligned-row context-row">
109
+ <td class="context-item-name">__input_callback</td>
110
+ <td>-></td>
111
+ <td class="context-item-value">callback</td>
112
+ </tr>
113
+ </table>
114
+ </div>
115
+ </div>
110
116
 
111
117
 
112
118
 
@@ -116,21 +122,21 @@
116
122
  <div id="methods">
117
123
  <h3 class="section-bar">Public Class methods</h3>
118
124
 
119
- <div id="method-M000104" class="method-detail">
120
- <a name="M000104"></a>
125
+ <div id="method-M000145" class="method-detail">
126
+ <a name="M000145"></a>
121
127
 
122
128
  <div class="method-heading">
123
- <a href="#M000104" class="method-signature">
129
+ <a href="#M000145" class="method-signature">
124
130
  <span class="method-name">new</span><span class="method-args">()</span>
125
131
  </a>
126
132
  </div>
127
133
 
128
134
  <div class="method-description">
129
135
  <p><a class="source-toggle" href="#"
130
- onclick="toggleCode('M000104-source');return false;">[Source]</a></p>
131
- <div class="method-source-code" id="M000104-source">
136
+ onclick="toggleCode('M000145-source');return false;">[Source]</a></p>
137
+ <div class="method-source-code" id="M000145-source">
132
138
  <pre>
133
- <span class="ruby-comment cmt"># File lib/wee/renderer/html/brushes.rb, line 303</span>
139
+ <span class="ruby-comment cmt"># File lib/wee/renderer/html/brushes.rb, line 289</span>
134
140
  <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>
135
141
  <span class="ruby-keyword kw">super</span>(<span class="ruby-value str">'textarea'</span>)
136
142
  <span class="ruby-keyword kw">end</span>
@@ -141,21 +147,21 @@
141
147
 
142
148
  <h3 class="section-bar">Public Instance methods</h3>
143
149
 
144
- <div id="method-M000105" class="method-detail">
145
- <a name="M000105"></a>
150
+ <div id="method-M000146" class="method-detail">
151
+ <a name="M000146"></a>
146
152
 
147
153
  <div class="method-heading">
148
- <a href="#M000105" class="method-signature">
154
+ <a href="#M000146" class="method-signature">
149
155
  <span class="method-name">with</span><span class="method-args">(*args, &amp;block)</span>
150
156
  </a>
151
157
  </div>
152
158
 
153
159
  <div class="method-description">
154
160
  <p><a class="source-toggle" href="#"
155
- onclick="toggleCode('M000105-source');return false;">[Source]</a></p>
156
- <div class="method-source-code" id="M000105-source">
161
+ onclick="toggleCode('M000146-source');return false;">[Source]</a></p>
162
+ <div class="method-source-code" id="M000146-source">
157
163
  <pre>
158
- <span class="ruby-comment cmt"># File lib/wee/renderer/html/brushes.rb, line 310</span>
164
+ <span class="ruby-comment cmt"># File lib/wee/renderer/html/brushes.rb, line 298</span>
159
165
  <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">with</span>(<span class="ruby-operator">*</span><span class="ruby-identifier">args</span>, <span class="ruby-operator">&amp;</span><span class="ruby-identifier">block</span>)
160
166
  <span class="ruby-keyword kw">super</span>
161
167
  <span class="ruby-keyword kw">end</span>
@@ -86,7 +86,7 @@
86
86
  <h3 class="section-bar">Methods</h3>
87
87
 
88
88
  <div class="name-list">
89
- <a href="#M000140">new</a>&nbsp;&nbsp;
89
+ <a href="#M000187">new</a>&nbsp;&nbsp;
90
90
  </div>
91
91
  </div>
92
92
 
@@ -94,18 +94,24 @@
94
94
 
95
95
 
96
96
  <!-- if includes -->
97
- <div id="includes">
98
- <h3 class="section-bar">Included Modules</h3>
99
-
100
- <div id="includes-list">
101
- <span class="include-name"><a href="InputCallbackMixin.html">Brush::InputCallbackMixin</a></span>
102
- </div>
103
- </div>
104
97
 
105
98
  <div id="section">
106
99
 
107
100
 
108
101
 
102
+ <div id="aliases-list">
103
+ <h3 class="section-bar">External Aliases</h3>
104
+
105
+ <div class="name-list">
106
+ <table summary="aliases">
107
+ <tr class="top-aligned-row context-row">
108
+ <td class="context-item-name">__input_callback</td>
109
+ <td>-></td>
110
+ <td class="context-item-value">callback</td>
111
+ </tr>
112
+ </table>
113
+ </div>
114
+ </div>
109
115
 
110
116
 
111
117
 
@@ -115,21 +121,21 @@
115
121
  <div id="methods">
116
122
  <h3 class="section-bar">Public Class methods</h3>
117
123
 
118
- <div id="method-M000140" class="method-detail">
119
- <a name="M000140"></a>
124
+ <div id="method-M000187" class="method-detail">
125
+ <a name="M000187"></a>
120
126
 
121
127
  <div class="method-heading">
122
- <a href="#M000140" class="method-signature">
128
+ <a href="#M000187" class="method-signature">
123
129
  <span class="method-name">new</span><span class="method-args">()</span>
124
130
  </a>
125
131
  </div>
126
132
 
127
133
  <div class="method-description">
128
134
  <p><a class="source-toggle" href="#"
129
- onclick="toggleCode('M000140-source');return false;">[Source]</a></p>
130
- <div class="method-source-code" id="M000140-source">
135
+ onclick="toggleCode('M000187-source');return false;">[Source]</a></p>
136
+ <div class="method-source-code" id="M000187-source">
131
137
  <pre>
132
- <span class="ruby-comment cmt"># File lib/wee/renderer/html/brushes.rb, line 381</span>
138
+ <span class="ruby-comment cmt"># File lib/wee/renderer/html/brushes.rb, line 367</span>
133
139
  <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>
134
140
  <span class="ruby-keyword kw">super</span>
135
141
  <span class="ruby-identifier">type</span>(<span class="ruby-value str">'text'</span>)
@@ -99,7 +99,7 @@ The format of the internal datastructure is:
99
99
  <div id="contents-list">
100
100
  <h3 class="section-bar">Contents</h3>
101
101
  <ul>
102
- <li><a href="#SEC00100">Friend methods for Wee::CallbackStream</a></li>
102
+ <li><a href="#SEC00097">Friend methods for Wee::CallbackStream</a></li>
103
103
  </ul>
104
104
  </div>
105
105
 
@@ -107,11 +107,12 @@ The format of the internal datastructure is:
107
107
  <h3 class="section-bar">Methods</h3>
108
108
 
109
109
  <div class="name-list">
110
- <a href="#M000196">all_of_type</a>&nbsp;&nbsp;
111
- <a href="#M000195">get_callback_for</a>&nbsp;&nbsp;
112
- <a href="#M000194">get_ids_for</a>&nbsp;&nbsp;
113
- <a href="#M000192">new</a>&nbsp;&nbsp;
114
- <a href="#M000193">register_for</a>&nbsp;&nbsp;
110
+ <a href="#M000238">all_of_type</a>&nbsp;&nbsp;
111
+ <a href="#M000237">get_callback_for</a>&nbsp;&nbsp;
112
+ <a href="#M000236">get_ids_for</a>&nbsp;&nbsp;
113
+ <a href="#M000233">new</a>&nbsp;&nbsp;
114
+ <a href="#M000234">register_for</a>&nbsp;&nbsp;
115
+ <a href="#M000235">register_named_for</a>&nbsp;&nbsp;
115
116
  </div>
116
117
  </div>
117
118
 
@@ -133,19 +134,19 @@ The format of the internal datastructure is:
133
134
  <div id="methods">
134
135
  <h3 class="section-bar">Public Class methods</h3>
135
136
 
136
- <div id="method-M000192" class="method-detail">
137
- <a name="M000192"></a>
137
+ <div id="method-M000233" class="method-detail">
138
+ <a name="M000233"></a>
138
139
 
139
140
  <div class="method-heading">
140
- <a href="#M000192" class="method-signature">
141
+ <a href="#M000233" class="method-signature">
141
142
  <span class="method-name">new</span><span class="method-args">(id_generator)</span>
142
143
  </a>
143
144
  </div>
144
145
 
145
146
  <div class="method-description">
146
147
  <p><a class="source-toggle" href="#"
147
- onclick="toggleCode('M000192-source');return false;">[Source]</a></p>
148
- <div class="method-source-code" id="M000192-source">
148
+ onclick="toggleCode('M000233-source');return false;">[Source]</a></p>
149
+ <div class="method-source-code" id="M000233-source">
149
150
  <pre>
150
151
  <span class="ruby-comment cmt"># File lib/wee/core/callback.rb, line 11</span>
151
152
  <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">id_generator</span>)
@@ -160,11 +161,11 @@ The format of the internal datastructure is:
160
161
 
161
162
  <h3 class="section-bar">Public Instance methods</h3>
162
163
 
163
- <div id="method-M000193" class="method-detail">
164
- <a name="M000193"></a>
164
+ <div id="method-M000234" class="method-detail">
165
+ <a name="M000234"></a>
165
166
 
166
167
  <div class="method-heading">
167
- <a href="#M000193" class="method-signature">
168
+ <a href="#M000234" class="method-signature">
168
169
  <span class="method-name">register_for</span><span class="method-args">(object, type, callback)</span>
169
170
  </a>
170
171
  </div>
@@ -175,14 +176,41 @@ Register <tt>callback</tt> for <tt>object</tt> under <tt>type</tt> and
175
176
  return a unique callback id.
176
177
  </p>
177
178
  <p><a class="source-toggle" href="#"
178
- onclick="toggleCode('M000193-source');return false;">[Source]</a></p>
179
- <div class="method-source-code" id="M000193-source">
179
+ onclick="toggleCode('M000234-source');return false;">[Source]</a></p>
180
+ <div class="method-source-code" id="M000234-source">
180
181
  <pre>
181
182
  <span class="ruby-comment cmt"># File lib/wee/core/callback.rb, line 19</span>
182
183
  <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">register_for</span>(<span class="ruby-identifier">object</span>, <span class="ruby-identifier">type</span>, <span class="ruby-identifier">callback</span>)
184
+ <span class="ruby-identifier">register_named_for</span>(<span class="ruby-identifier">object</span>, <span class="ruby-identifier">type</span>, <span class="ruby-identifier">callback</span>, <span class="ruby-ivar">@idgen</span>.<span class="ruby-identifier">next</span>)
185
+ <span class="ruby-keyword kw">end</span>
186
+ </pre>
187
+ </div>
188
+ </div>
189
+ </div>
190
+
191
+ <div id="method-M000235" class="method-detail">
192
+ <a name="M000235"></a>
193
+
194
+ <div class="method-heading">
195
+ <a href="#M000235" class="method-signature">
196
+ <span class="method-name">register_named_for</span><span class="method-args">(object, type, callback, named_id)</span>
197
+ </a>
198
+ </div>
199
+
200
+ <div class="method-description">
201
+ <p>
202
+ Register <tt>callback</tt> for <tt>object</tt> under <tt>type</tt> with the
203
+ id <tt>named_id</tt>.
204
+ </p>
205
+ <p><a class="source-toggle" href="#"
206
+ onclick="toggleCode('M000235-source');return false;">[Source]</a></p>
207
+ <div class="method-source-code" id="M000235-source">
208
+ <pre>
209
+ <span class="ruby-comment cmt"># File lib/wee/core/callback.rb, line 25</span>
210
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">register_named_for</span>(<span class="ruby-identifier">object</span>, <span class="ruby-identifier">type</span>, <span class="ruby-identifier">callback</span>, <span class="ruby-identifier">named_id</span>)
211
+ <span class="ruby-identifier">cid</span> = <span class="ruby-identifier">named_id</span>.<span class="ruby-identifier">to_s</span>
183
212
  <span class="ruby-identifier">c</span> = (<span class="ruby-ivar">@callbacks</span>[<span class="ruby-identifier">type</span>] <span class="ruby-operator">||=</span> <span class="ruby-constant">Hash</span>.<span class="ruby-identifier">new</span>)
184
213
  <span class="ruby-identifier">o</span> = (<span class="ruby-ivar">@obj_to_id_map</span>[<span class="ruby-identifier">type</span>] <span class="ruby-operator">||=</span> <span class="ruby-constant">Hash</span>.<span class="ruby-identifier">new</span>)
185
- <span class="ruby-identifier">cid</span> = <span class="ruby-ivar">@idgen</span>.<span class="ruby-identifier">next</span>.<span class="ruby-identifier">to_s</span>
186
214
  <span class="ruby-identifier">raise</span> <span class="ruby-value str">&quot;duplicate callback id&quot;</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">c</span>.<span class="ruby-identifier">has_key?</span>(<span class="ruby-identifier">cid</span>)
187
215
  <span class="ruby-identifier">c</span>[<span class="ruby-identifier">cid</span>] = <span class="ruby-identifier">callback</span>
188
216
  (<span class="ruby-identifier">o</span>[<span class="ruby-identifier">object</span>] <span class="ruby-operator">||=</span> []) <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-identifier">cid</span>
@@ -196,7 +224,7 @@ return a unique callback id.
196
224
 
197
225
  </div>
198
226
  <div id="section">
199
- <h2 class="section-title"><a name="SEC00100">Friend methods for Wee::CallbackStream</a></h2>
227
+ <h2 class="section-title"><a name="SEC00097">Friend methods for Wee::CallbackStream</a></h2>
200
228
  <div class="section-comment">
201
229
 
202
230
  </div>
@@ -212,21 +240,21 @@ return a unique callback id.
212
240
  <div id="methods">
213
241
  <h3 class="section-bar">Public Instance methods</h3>
214
242
 
215
- <div id="method-M000196" class="method-detail">
216
- <a name="M000196"></a>
243
+ <div id="method-M000238" class="method-detail">
244
+ <a name="M000238"></a>
217
245
 
218
246
  <div class="method-heading">
219
- <a href="#M000196" class="method-signature">
247
+ <a href="#M000238" class="method-signature">
220
248
  <span class="method-name">all_of_type</span><span class="method-args">(type)</span>
221
249
  </a>
222
250
  </div>
223
251
 
224
252
  <div class="method-description">
225
253
  <p><a class="source-toggle" href="#"
226
- onclick="toggleCode('M000196-source');return false;">[Source]</a></p>
227
- <div class="method-source-code" id="M000196-source">
254
+ onclick="toggleCode('M000238-source');return false;">[Source]</a></p>
255
+ <div class="method-source-code" id="M000238-source">
228
256
  <pre>
229
- <span class="ruby-comment cmt"># File lib/wee/core/callback.rb, line 49</span>
257
+ <span class="ruby-comment cmt"># File lib/wee/core/callback.rb, line 55</span>
230
258
  <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">all_of_type</span>(<span class="ruby-identifier">type</span>)
231
259
  <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">c</span> = <span class="ruby-ivar">@callbacks</span>[<span class="ruby-identifier">type</span>]
232
260
  <span class="ruby-identifier">c</span>
@@ -239,21 +267,21 @@ return a unique callback id.
239
267
  </div>
240
268
  </div>
241
269
 
242
- <div id="method-M000195" class="method-detail">
243
- <a name="M000195"></a>
270
+ <div id="method-M000237" class="method-detail">
271
+ <a name="M000237"></a>
244
272
 
245
273
  <div class="method-heading">
246
- <a href="#M000195" class="method-signature">
274
+ <a href="#M000237" class="method-signature">
247
275
  <span class="method-name">get_callback_for</span><span class="method-args">(id, type)</span>
248
276
  </a>
249
277
  </div>
250
278
 
251
279
  <div class="method-description">
252
280
  <p><a class="source-toggle" href="#"
253
- onclick="toggleCode('M000195-source');return false;">[Source]</a></p>
254
- <div class="method-source-code" id="M000195-source">
281
+ onclick="toggleCode('M000237-source');return false;">[Source]</a></p>
282
+ <div class="method-source-code" id="M000237-source">
255
283
  <pre>
256
- <span class="ruby-comment cmt"># File lib/wee/core/callback.rb, line 41</span>
284
+ <span class="ruby-comment cmt"># File lib/wee/core/callback.rb, line 47</span>
257
285
  <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">get_callback_for</span>(<span class="ruby-identifier">id</span>, <span class="ruby-identifier">type</span>)
258
286
  <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">c</span> = <span class="ruby-ivar">@callbacks</span>[<span class="ruby-identifier">type</span>]
259
287
  <span class="ruby-identifier">c</span>[<span class="ruby-identifier">id</span>]
@@ -266,21 +294,21 @@ return a unique callback id.
266
294
  </div>
267
295
  </div>
268
296
 
269
- <div id="method-M000194" class="method-detail">
270
- <a name="M000194"></a>
297
+ <div id="method-M000236" class="method-detail">
298
+ <a name="M000236"></a>
271
299
 
272
300
  <div class="method-heading">
273
- <a href="#M000194" class="method-signature">
301
+ <a href="#M000236" class="method-signature">
274
302
  <span class="method-name">get_ids_for</span><span class="method-args">(object, type)</span>
275
303
  </a>
276
304
  </div>
277
305
 
278
306
  <div class="method-description">
279
307
  <p><a class="source-toggle" href="#"
280
- onclick="toggleCode('M000194-source');return false;">[Source]</a></p>
281
- <div class="method-source-code" id="M000194-source">
308
+ onclick="toggleCode('M000236-source');return false;">[Source]</a></p>
309
+ <div class="method-source-code" id="M000236-source">
282
310
  <pre>
283
- <span class="ruby-comment cmt"># File lib/wee/core/callback.rb, line 33</span>
311
+ <span class="ruby-comment cmt"># File lib/wee/core/callback.rb, line 39</span>
284
312
  <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">get_ids_for</span>(<span class="ruby-identifier">object</span>, <span class="ruby-identifier">type</span>)
285
313
  <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">o</span> = <span class="ruby-ivar">@obj_to_id_map</span>[<span class="ruby-identifier">type</span>]
286
314
  <span class="ruby-identifier">o</span>[<span class="ruby-identifier">object</span>] <span class="ruby-operator">||</span> []
@@ -94,9 +94,9 @@ The intersection of registered callbacks and those that occured.
94
94
  <h3 class="section-bar">Methods</h3>
95
95
 
96
96
  <div class="name-list">
97
- <a href="#M000255">all_of_type</a>&nbsp;&nbsp;
98
- <a href="#M000253">new</a>&nbsp;&nbsp;
99
- <a href="#M000254">with_callbacks_for</a>&nbsp;&nbsp;
97
+ <a href="#M000300">all_of_type</a>&nbsp;&nbsp;
98
+ <a href="#M000298">new</a>&nbsp;&nbsp;
99
+ <a href="#M000299">with_callbacks_for</a>&nbsp;&nbsp;
100
100
  </div>
101
101
  </div>
102
102
 
@@ -118,11 +118,11 @@ The intersection of registered callbacks and those that occured.
118
118
  <div id="methods">
119
119
  <h3 class="section-bar">Public Class methods</h3>
120
120
 
121
- <div id="method-M000253" class="method-detail">
122
- <a name="M000253"></a>
121
+ <div id="method-M000298" class="method-detail">
122
+ <a name="M000298"></a>
123
123
 
124
124
  <div class="method-heading">
125
- <a href="#M000253" class="method-signature">
125
+ <a href="#M000298" class="method-signature">
126
126
  <span class="method-name">new</span><span class="method-args">(callbacks, ids_and_values)</span>
127
127
  </a>
128
128
  </div>
@@ -138,10 +138,10 @@ occurend in a request, e.g. { id =&gt; value }.
138
138
  </dd>
139
139
  </dl>
140
140
  <p><a class="source-toggle" href="#"
141
- onclick="toggleCode('M000253-source');return false;">[Source]</a></p>
142
- <div class="method-source-code" id="M000253-source">
141
+ onclick="toggleCode('M000298-source');return false;">[Source]</a></p>
142
+ <div class="method-source-code" id="M000298-source">
143
143
  <pre>
144
- <span class="ruby-comment cmt"># File lib/wee/core/callback.rb, line 72</span>
144
+ <span class="ruby-comment cmt"># File lib/wee/core/callback.rb, line 78</span>
145
145
  <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">callbacks</span>, <span class="ruby-identifier">ids_and_values</span>)
146
146
  <span class="ruby-ivar">@callbacks</span> = <span class="ruby-identifier">callbacks</span>
147
147
  <span class="ruby-ivar">@ids_and_values</span> = <span class="ruby-identifier">ids_and_values</span>
@@ -154,11 +154,11 @@ occurend in a request, e.g. { id =&gt; value }.
154
154
 
155
155
  <h3 class="section-bar">Public Instance methods</h3>
156
156
 
157
- <div id="method-M000255" class="method-detail">
158
- <a name="M000255"></a>
157
+ <div id="method-M000300" class="method-detail">
158
+ <a name="M000300"></a>
159
159
 
160
160
  <div class="method-heading">
161
- <a href="#M000255" class="method-signature">
161
+ <a href="#M000300" class="method-signature">
162
162
  <span class="method-name">all_of_type</span><span class="method-args">(type)</span>
163
163
  </a>
164
164
  </div>
@@ -169,10 +169,10 @@ Returns a [callback, value] array of all callbacks of <tt>type</tt> for
169
169
  which an id was given.
170
170
  </p>
171
171
  <p><a class="source-toggle" href="#"
172
- onclick="toggleCode('M000255-source');return false;">[Source]</a></p>
173
- <div class="method-source-code" id="M000255-source">
172
+ onclick="toggleCode('M000300-source');return false;">[Source]</a></p>
173
+ <div class="method-source-code" id="M000300-source">
174
174
  <pre>
175
- <span class="ruby-comment cmt"># File lib/wee/core/callback.rb, line 89</span>
175
+ <span class="ruby-comment cmt"># File lib/wee/core/callback.rb, line 95</span>
176
176
  <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">all_of_type</span>(<span class="ruby-identifier">type</span>)
177
177
  <span class="ruby-identifier">a</span> = []
178
178
  <span class="ruby-ivar">@callbacks</span>.<span class="ruby-identifier">all_of_type</span>(<span class="ruby-identifier">type</span>).<span class="ruby-identifier">each</span> {<span class="ruby-operator">|</span><span class="ruby-identifier">id</span>, <span class="ruby-identifier">callback</span><span class="ruby-operator">|</span>
@@ -185,21 +185,21 @@ which an id was given.
185
185
  </div>
186
186
  </div>
187
187
 
188
- <div id="method-M000254" class="method-detail">
189
- <a name="M000254"></a>
188
+ <div id="method-M000299" class="method-detail">
189
+ <a name="M000299"></a>
190
190
 
191
191
  <div class="method-heading">
192
- <a href="#M000254" class="method-signature">
192
+ <a href="#M000299" class="method-signature">
193
193
  <span class="method-name">with_callbacks_for</span><span class="method-args">(object, type) {|@callbacks.get_callback_for(id, type), @ids_and_values[id]| ...}</span>
194
194
  </a>
195
195
  </div>
196
196
 
197
197
  <div class="method-description">
198
198
  <p><a class="source-toggle" href="#"
199
- onclick="toggleCode('M000254-source');return false;">[Source]</a></p>
200
- <div class="method-source-code" id="M000254-source">
199
+ onclick="toggleCode('M000299-source');return false;">[Source]</a></p>
200
+ <div class="method-source-code" id="M000299-source">
201
201
  <pre>
202
- <span class="ruby-comment cmt"># File lib/wee/core/callback.rb, line 78</span>
202
+ <span class="ruby-comment cmt"># File lib/wee/core/callback.rb, line 84</span>
203
203
  <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">with_callbacks_for</span>(<span class="ruby-identifier">object</span>, <span class="ruby-identifier">type</span>)
204
204
  <span class="ruby-identifier">matching_ids</span> = <span class="ruby-ivar">@callbacks</span>.<span class="ruby-identifier">get_ids_for</span>(<span class="ruby-identifier">object</span>, <span class="ruby-identifier">type</span>) <span class="ruby-operator">&amp;</span> <span class="ruby-ivar">@ids</span>
205
205
  <span class="ruby-identifier">matching_ids</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">id</span><span class="ruby-operator">|</span>