wee 0.10.0 → 2.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (369) hide show
  1. data/README.rdoc +127 -0
  2. data/Rakefile +11 -32
  3. data/doc/rdoc/classes/Array.html +28 -24
  4. data/doc/rdoc/classes/Hash.html +28 -24
  5. data/doc/rdoc/classes/Object.html +37 -84
  6. data/doc/rdoc/classes/String.html +89 -21
  7. data/doc/rdoc/classes/Struct.html +32 -82
  8. data/doc/rdoc/classes/Wee.html +285 -86
  9. data/doc/rdoc/classes/Wee/AnswerDecoration.html +111 -48
  10. data/doc/rdoc/classes/Wee/{Context.html → AnswerDecoration/Answer.html} +61 -51
  11. data/doc/rdoc/classes/Wee/Application.html +161 -322
  12. data/doc/rdoc/classes/Wee/Application/SessionCache.html +162 -0
  13. data/doc/rdoc/classes/Wee/Brush.html +147 -62
  14. data/doc/rdoc/classes/{Enumerable.html → Wee/Brush/ActionInputTag.html} +68 -41
  15. data/doc/rdoc/classes/Wee/Brush/AnchorTag.html +150 -100
  16. data/doc/rdoc/classes/Wee/Brush/CheckboxTag.html +132 -46
  17. data/doc/rdoc/classes/Wee/Brush/FileUploadTag.html +63 -41
  18. data/doc/rdoc/classes/Wee/Brush/FormTag.html +184 -78
  19. data/doc/rdoc/classes/Wee/Brush/GenericEncodedTextBrush.html +48 -65
  20. data/doc/rdoc/classes/Wee/Brush/GenericSingleTagBrush.html +83 -37
  21. data/doc/rdoc/classes/Wee/Brush/GenericTagBrush.html +334 -310
  22. data/doc/rdoc/classes/Wee/Brush/GenericTextBrush.html +74 -54
  23. data/doc/rdoc/classes/Wee/Brush/HiddenInputTag.html +58 -43
  24. data/doc/rdoc/classes/Wee/Brush/ImageButtonTag.html +64 -74
  25. data/doc/rdoc/classes/Wee/Brush/ImageTag.html +109 -86
  26. data/doc/rdoc/classes/Wee/Brush/InputTag.html +205 -45
  27. data/doc/rdoc/classes/Wee/Brush/JavascriptTag.html +96 -34
  28. data/doc/rdoc/classes/Wee/Brush/Page.html +129 -67
  29. data/doc/rdoc/classes/Wee/{Utils/LRUCache.html → Brush/PasswordInputTag.html} +65 -38
  30. data/doc/rdoc/classes/Wee/Brush/RadioButtonTag.html +132 -78
  31. data/doc/rdoc/classes/Wee/Brush/{RadioButtonTag/RadioGroup.html → RadioGroup.html} +91 -53
  32. data/doc/rdoc/classes/Wee/Brush/SelectListTag.html +301 -127
  33. data/doc/rdoc/classes/Wee/Brush/SelectOptionTag.html +96 -33
  34. data/doc/rdoc/classes/Wee/Brush/SubmitButtonTag.html +59 -44
  35. data/doc/rdoc/classes/Wee/Brush/TableDataTag.html +94 -57
  36. data/doc/rdoc/classes/Wee/Brush/TableHeaderTag.html +96 -33
  37. data/doc/rdoc/classes/Wee/Brush/TableRowTag.html +181 -121
  38. data/doc/rdoc/classes/Wee/Brush/TableTag.html +94 -32
  39. data/doc/rdoc/classes/Wee/Brush/TextAreaTag.html +257 -71
  40. data/doc/rdoc/classes/Wee/Brush/TextInputTag.html +58 -43
  41. data/doc/rdoc/classes/Wee/CallAnswerMixin.html +289 -0
  42. data/doc/rdoc/classes/Wee/CallbackMixin.html +233 -0
  43. data/doc/rdoc/classes/Wee/CallbackRegistry.html +179 -155
  44. data/doc/rdoc/classes/Wee/Callbacks.html +262 -0
  45. data/doc/rdoc/classes/Wee/Component.html +228 -779
  46. data/doc/rdoc/classes/Wee/Decoration.html +144 -159
  47. data/doc/rdoc/classes/Wee/DecorationMixin.html +340 -0
  48. data/doc/rdoc/classes/Wee/Delegate.html +119 -76
  49. data/doc/rdoc/classes/Wee/DupReplaceSnapshotMixin.html +64 -47
  50. data/doc/rdoc/classes/Wee/ErrorResponse.html +59 -62
  51. data/doc/rdoc/classes/Wee/FormDecoration.html +51 -37
  52. data/doc/rdoc/classes/Wee/GenericResponse.html +60 -35
  53. data/doc/rdoc/classes/Wee/HtmlCanvas.html +1000 -602
  54. data/doc/rdoc/classes/Wee/HtmlDocument.html +288 -0
  55. data/doc/rdoc/classes/Wee/HtmlWriter.html +227 -126
  56. data/doc/rdoc/classes/Wee/IdGenerator.html +60 -31
  57. data/doc/rdoc/classes/Wee/IdGenerator/Secure.html +282 -0
  58. data/doc/rdoc/classes/Wee/{SimpleIdGenerator.html → IdGenerator/Sequential.html} +76 -49
  59. data/doc/rdoc/classes/Wee/JQuery.html +221 -0
  60. data/doc/rdoc/classes/Wee/LRUCache.html +514 -0
  61. data/doc/rdoc/classes/Wee/LRUCache/Item.html +158 -0
  62. data/doc/rdoc/classes/Wee/ObjectSnapshotMixin.html +187 -0
  63. data/doc/rdoc/classes/Wee/PageDecoration.html +88 -59
  64. data/doc/rdoc/classes/Wee/Presenter.html +124 -704
  65. data/doc/rdoc/classes/Wee/RedirectResponse.html +64 -33
  66. data/doc/rdoc/classes/Wee/RefreshResponse.html +59 -44
  67. data/doc/rdoc/classes/Wee/Renderer.html +234 -54
  68. data/doc/rdoc/classes/Wee/Request.html +151 -286
  69. data/doc/rdoc/classes/Wee/Response.html +29 -212
  70. data/doc/rdoc/classes/Wee/Session.html +585 -360
  71. data/doc/rdoc/classes/Wee/{StateHolder.html → Session/AbortCallbackProcessing.html} +67 -40
  72. data/doc/rdoc/classes/Wee/Session/MutexSerializer.html +166 -0
  73. data/doc/rdoc/classes/{Cache/Strategy/LFU/Item.html → Wee/Session/Page.html} +26 -27
  74. data/doc/rdoc/classes/Wee/Session/ThreadSerializer.html +219 -0
  75. data/doc/rdoc/classes/Wee/State.html +307 -0
  76. data/doc/rdoc/classes/{Cache/Strategy/LRU/Item.html → Wee/State/Snapshot.html} +26 -27
  77. data/doc/rdoc/classes/{Cache/Strategy/Unbounded/Item.html → Wee/State/SnapshotIVars.html} +26 -27
  78. data/doc/rdoc/classes/Wee/StructSnapshotMixin.html +183 -0
  79. data/doc/rdoc/classes/Wee/WrapperDecoration.html +101 -35
  80. data/doc/rdoc/created.rid +1 -1
  81. data/doc/rdoc/files/README_rdoc.html +243 -0
  82. data/doc/rdoc/files/lib/wee/application_rb.html +22 -30
  83. data/doc/rdoc/files/lib/wee/{page_rb.html → call_answer_rb.html} +14 -25
  84. data/doc/rdoc/files/lib/wee/callback_rb.html +12 -29
  85. data/doc/rdoc/files/lib/wee/component_rb.html +22 -27
  86. data/doc/rdoc/files/lib/wee/decoration_rb.html +19 -20
  87. data/doc/rdoc/files/lib/wee/{idgen_rb.html → html_brushes_rb.html} +14 -25
  88. data/doc/rdoc/files/lib/wee/html_canvas_rb.html +15 -23
  89. data/doc/rdoc/files/lib/wee/{abstractsession_rb.html → html_document_rb.html} +17 -25
  90. data/doc/rdoc/files/lib/wee/html_writer_rb.html +15 -23
  91. data/doc/rdoc/files/lib/wee/{webrick_rb.html → id_generator_rb.html} +19 -25
  92. data/doc/rdoc/files/lib/wee/{core/page_rb.html → jquery/jquery_rb.html} +14 -25
  93. data/doc/rdoc/files/lib/wee/{state_registry_rb.html → jquery_rb.html} +17 -27
  94. data/doc/rdoc/files/lib/{cache/cache_rb.html → wee/lru_cache_rb.html} +14 -25
  95. data/doc/rdoc/files/lib/wee/presenter_rb.html +12 -34
  96. data/doc/rdoc/files/lib/wee/{holder_rb.html → renderer_rb.html} +14 -25
  97. data/doc/rdoc/files/lib/wee/request_rb.html +18 -32
  98. data/doc/rdoc/files/lib/wee/response_rb.html +17 -24
  99. data/doc/rdoc/files/lib/wee/session_rb.html +21 -23
  100. data/doc/rdoc/files/lib/wee/state_rb.html +90 -0
  101. data/doc/rdoc/files/lib/wee_rb.html +48 -40
  102. data/doc/rdoc/fr_class_index.html +111 -75
  103. data/doc/rdoc/fr_file_index.html +46 -76
  104. data/doc/rdoc/fr_method_index.html +473 -480
  105. data/doc/rdoc/index.html +6 -9
  106. data/doc/rdoc/rdoc-style.css +210 -119
  107. data/examples/ObjectSpaceBrowser.rb +33 -23
  108. data/examples/ajax.rb +71 -0
  109. data/examples/continuations.rb +28 -0
  110. data/examples/demo.rb +92 -36
  111. data/examples/demo/calculator.rb +63 -0
  112. data/examples/demo/calendar.rb +42 -55
  113. data/examples/demo/counter.rb +38 -0
  114. data/{lib/wee/examples → examples/demo}/editable_counter.rb +11 -6
  115. data/examples/demo/example.rb +28 -24
  116. data/examples/demo/file_upload.rb +19 -0
  117. data/{lib/wee/components → examples/demo}/messagebox.rb +3 -3
  118. data/examples/demo/radio.rb +33 -0
  119. data/{lib/wee/examples → examples/demo}/window.rb +15 -10
  120. data/examples/hw.rb +3 -4
  121. data/{lib/wee/components → examples}/pager.rb +14 -14
  122. data/lib/wee.rb +48 -25
  123. data/lib/wee/application.rb +69 -131
  124. data/lib/wee/call_answer.rb +118 -0
  125. data/lib/wee/callback.rb +88 -0
  126. data/lib/wee/component.rb +141 -0
  127. data/lib/wee/decoration.rb +242 -0
  128. data/lib/wee/html_brushes.rb +725 -0
  129. data/lib/wee/html_canvas.rb +241 -0
  130. data/lib/wee/html_document.rb +45 -0
  131. data/lib/wee/html_writer.rb +71 -0
  132. data/lib/wee/id_generator.rb +70 -0
  133. data/lib/wee/jquery.rb +1 -0
  134. data/lib/wee/jquery/jquery.rb +17 -0
  135. data/lib/wee/jquery/public/jquery-1.3.2.min.js +19 -0
  136. data/lib/wee/jquery/public/wee-jquery.js +19 -0
  137. data/lib/wee/lru_cache.rb +89 -0
  138. data/lib/wee/presenter.rb +43 -0
  139. data/lib/wee/renderer.rb +65 -0
  140. data/lib/wee/request.rb +37 -113
  141. data/lib/wee/response.rb +43 -70
  142. data/lib/wee/session.rb +304 -113
  143. data/lib/wee/state.rb +85 -0
  144. data/test/component_spec.rb +17 -0
  145. data/wee.gemspec +4 -3
  146. metadata +249 -452
  147. data/ChangeLog +0 -657
  148. data/INSTALL +0 -17
  149. data/README +0 -272
  150. data/TODO +0 -142
  151. data/benchmark/Centrino1300/result.2000.counter.action +0 -45
  152. data/benchmark/Centrino1300/result.2000.counter.render +0 -43
  153. data/benchmark/Centrino1300/result.2000.filehandler +0 -43
  154. data/benchmark/Centrino600/result.2000.counter.action +0 -47
  155. data/benchmark/Centrino600/result.2000.counter.render +0 -45
  156. data/benchmark/Centrino600/result.2000.filehandler +0 -43
  157. data/benchmark/Makefile +0 -53
  158. data/benchmark/counter.rb +0 -77
  159. data/benchmark/filehandler.rb +0 -6
  160. data/benchmark/report_req.rb +0 -12
  161. data/bin/wee +0 -100
  162. data/doc/rdoc/classes/ActionView.html +0 -107
  163. data/doc/rdoc/classes/ActionView/Base.html +0 -133
  164. data/doc/rdoc/classes/Cache.html +0 -126
  165. data/doc/rdoc/classes/Cache/StorageCache.html +0 -320
  166. data/doc/rdoc/classes/Cache/Strategy.html +0 -128
  167. data/doc/rdoc/classes/Cache/Strategy/CapacityBounded.html +0 -269
  168. data/doc/rdoc/classes/Cache/Strategy/LFU.html +0 -238
  169. data/doc/rdoc/classes/Cache/Strategy/LRU.html +0 -238
  170. data/doc/rdoc/classes/Cache/Strategy/Unbounded.html +0 -225
  171. data/doc/rdoc/classes/LiteralMethod.html +0 -196
  172. data/doc/rdoc/classes/Main.html +0 -289
  173. data/doc/rdoc/classes/OgApplication.html +0 -126
  174. data/doc/rdoc/classes/OgScaffolder.html +0 -827
  175. data/doc/rdoc/classes/OgScaffolder/Editor.html +0 -565
  176. data/doc/rdoc/classes/OgSession.html +0 -172
  177. data/doc/rdoc/classes/Recipe.html +0 -113
  178. data/doc/rdoc/classes/Wee/AbstractSession.html +0 -502
  179. data/doc/rdoc/classes/Wee/Brush/ActionCallbackMixin.html +0 -148
  180. data/doc/rdoc/classes/Wee/Brush/ActionMixin.html +0 -146
  181. data/doc/rdoc/classes/Wee/Brush/ActionURLCallbackMixin.html +0 -154
  182. data/doc/rdoc/classes/Wee/Brush/AssignMixin.html +0 -141
  183. data/doc/rdoc/classes/Wee/Brush/CallbackMixin.html +0 -141
  184. data/doc/rdoc/classes/Wee/Brush/InputCallbackMixin.html +0 -148
  185. data/doc/rdoc/classes/Wee/Brush/SelectListTag/SelectListCallback.html +0 -158
  186. data/doc/rdoc/classes/Wee/Brush/ToCallback.html +0 -146
  187. data/doc/rdoc/classes/Wee/Callback.html +0 -231
  188. data/doc/rdoc/classes/Wee/CallbackStream.html +0 -227
  189. data/doc/rdoc/classes/Wee/Canvas.html +0 -235
  190. data/doc/rdoc/classes/Wee/CanvasMixin.html +0 -225
  191. data/doc/rdoc/classes/Wee/Component/OnAnswer.html +0 -153
  192. data/doc/rdoc/classes/Wee/ComponentDispatcher.html +0 -289
  193. data/doc/rdoc/classes/Wee/ComponentRunner.html +0 -321
  194. data/doc/rdoc/classes/Wee/ErrorPage.html +0 -175
  195. data/doc/rdoc/classes/Wee/Examples.html +0 -114
  196. data/doc/rdoc/classes/Wee/Examples/Calculator.html +0 -319
  197. data/doc/rdoc/classes/Wee/Examples/Counter.html +0 -289
  198. data/doc/rdoc/classes/Wee/Examples/EditableCounter.html +0 -210
  199. data/doc/rdoc/classes/Wee/Examples/Window.html +0 -346
  200. data/doc/rdoc/classes/Wee/FastCGIAdaptor.html +0 -227
  201. data/doc/rdoc/classes/Wee/Helper.html +0 -148
  202. data/doc/rdoc/classes/Wee/HtmlCanvasRenderer.html +0 -1230
  203. data/doc/rdoc/classes/Wee/LiteralMethodCallback.html +0 -198
  204. data/doc/rdoc/classes/Wee/LoginDecoration.html +0 -261
  205. data/doc/rdoc/classes/Wee/Md5IdGenerator.html +0 -181
  206. data/doc/rdoc/classes/Wee/MessageBox.html +0 -180
  207. data/doc/rdoc/classes/Wee/MethodCallback.html +0 -193
  208. data/doc/rdoc/classes/Wee/Nitro.html +0 -114
  209. data/doc/rdoc/classes/Wee/Nitro/ControllerClassMixin.html +0 -192
  210. data/doc/rdoc/classes/Wee/Nitro/ControllerMixin.html +0 -345
  211. data/doc/rdoc/classes/Wee/Nitro/FormTag.html +0 -155
  212. data/doc/rdoc/classes/Wee/Nitro/HtmlCanvasRenderer.html +0 -178
  213. data/doc/rdoc/classes/Wee/Page.html +0 -115
  214. data/doc/rdoc/classes/Wee/PagelessApplication.html +0 -154
  215. data/doc/rdoc/classes/Wee/PagelessComponentDriver.html +0 -296
  216. data/doc/rdoc/classes/Wee/PagelessRequest.html +0 -208
  217. data/doc/rdoc/classes/Wee/PagelessSession.html +0 -359
  218. data/doc/rdoc/classes/Wee/Pager.html +0 -534
  219. data/doc/rdoc/classes/Wee/Rails.html +0 -114
  220. data/doc/rdoc/classes/Wee/Rails/ControllerClassMixin.html +0 -192
  221. data/doc/rdoc/classes/Wee/Rails/ControllerMixin.html +0 -342
  222. data/doc/rdoc/classes/Wee/Rails/FormTag.html +0 -155
  223. data/doc/rdoc/classes/Wee/Rails/HtmlCanvasRenderer.html +0 -177
  224. data/doc/rdoc/classes/Wee/RenderingContext.html +0 -283
  225. data/doc/rdoc/classes/Wee/RequestHandler.html +0 -341
  226. data/doc/rdoc/classes/Wee/Snapshot.html +0 -211
  227. data/doc/rdoc/classes/Wee/StateRegistry.html +0 -434
  228. data/doc/rdoc/classes/Wee/StateRegistry/Snapshot.html +0 -320
  229. data/doc/rdoc/classes/Wee/StateRegistry/WithObject.html +0 -153
  230. data/doc/rdoc/classes/Wee/Utils.html +0 -300
  231. data/doc/rdoc/classes/Wee/ValueHolder.html +0 -220
  232. data/doc/rdoc/classes/Wee/WEBrickAdaptor.html +0 -368
  233. data/doc/rdoc/files/INSTALL.html +0 -130
  234. data/doc/rdoc/files/README.html +0 -471
  235. data/doc/rdoc/files/lib/wee/adaptors/fastcgi_rb.html +0 -108
  236. data/doc/rdoc/files/lib/wee/adaptors/nitro_rb.html +0 -101
  237. data/doc/rdoc/files/lib/wee/adaptors/rails_rb.html +0 -101
  238. data/doc/rdoc/files/lib/wee/adaptors/webrick_rb.html +0 -108
  239. data/doc/rdoc/files/lib/wee/component_ext_rb.html +0 -101
  240. data/doc/rdoc/files/lib/wee/components/component_dispatcher_rb.html +0 -108
  241. data/doc/rdoc/files/lib/wee/components/form_decoration_rb.html +0 -101
  242. data/doc/rdoc/files/lib/wee/components/login_decoration_rb.html +0 -101
  243. data/doc/rdoc/files/lib/wee/components/messagebox_rb.html +0 -101
  244. data/doc/rdoc/files/lib/wee/components/page_decoration_rb.html +0 -101
  245. data/doc/rdoc/files/lib/wee/components/pager_rb.html +0 -101
  246. data/doc/rdoc/files/lib/wee/components/wrapper_decoration_rb.html +0 -101
  247. data/doc/rdoc/files/lib/wee/components_rb.html +0 -114
  248. data/doc/rdoc/files/lib/wee/context_rb.html +0 -101
  249. data/doc/rdoc/files/lib/wee/continuation/core/component_rb.html +0 -101
  250. data/doc/rdoc/files/lib/wee/continuation/session_rb.html +0 -108
  251. data/doc/rdoc/files/lib/wee/continuation_rb.html +0 -116
  252. data/doc/rdoc/files/lib/wee/core/callback_rb.html +0 -115
  253. data/doc/rdoc/files/lib/wee/core/component_rb.html +0 -108
  254. data/doc/rdoc/files/lib/wee/core/componentrunner_rb.html +0 -110
  255. data/doc/rdoc/files/lib/wee/core/context_rb.html +0 -101
  256. data/doc/rdoc/files/lib/wee/core/decoration_rb.html +0 -133
  257. data/doc/rdoc/files/lib/wee/core/idgen_rb.html +0 -101
  258. data/doc/rdoc/files/lib/wee/core/presenter_rb.html +0 -112
  259. data/doc/rdoc/files/lib/wee/core/renderer_rb.html +0 -107
  260. data/doc/rdoc/files/lib/wee/core/snapshot_rb.html +0 -113
  261. data/doc/rdoc/files/lib/wee/core/valueholder_rb.html +0 -110
  262. data/doc/rdoc/files/lib/wee/core_ext_rb.html +0 -101
  263. data/doc/rdoc/files/lib/wee/core_rb.html +0 -124
  264. data/doc/rdoc/files/lib/wee/databases/og/application_rb.html +0 -101
  265. data/doc/rdoc/files/lib/wee/databases/og/old_scaffolder_rb.html +0 -101
  266. data/doc/rdoc/files/lib/wee/databases/og/scaffolder_rb.html +0 -115
  267. data/doc/rdoc/files/lib/wee/databases/og/session_rb.html +0 -101
  268. data/doc/rdoc/files/lib/wee/databases/og_rb.html +0 -111
  269. data/doc/rdoc/files/lib/wee/examples/calculator_rb.html +0 -107
  270. data/doc/rdoc/files/lib/wee/examples/counter_rb.html +0 -101
  271. data/doc/rdoc/files/lib/wee/examples/editable_counter_rb.html +0 -114
  272. data/doc/rdoc/files/lib/wee/examples/window_rb.html +0 -101
  273. data/doc/rdoc/files/lib/wee/idgen/md5_rb.html +0 -115
  274. data/doc/rdoc/files/lib/wee/idgen/simple_rb.html +0 -107
  275. data/doc/rdoc/files/lib/wee/pageless/application_rb.html +0 -108
  276. data/doc/rdoc/files/lib/wee/pageless/request_rb.html +0 -101
  277. data/doc/rdoc/files/lib/wee/pageless/session_rb.html +0 -109
  278. data/doc/rdoc/files/lib/wee/pageless_rb.html +0 -110
  279. data/doc/rdoc/files/lib/wee/renderer/html/brushes_rb.html +0 -101
  280. data/doc/rdoc/files/lib/wee/renderer/html/canvas_rb.html +0 -108
  281. data/doc/rdoc/files/lib/wee/renderer/html/writer_rb.html +0 -108
  282. data/doc/rdoc/files/lib/wee/rendering/html/brushes_rb.html +0 -101
  283. data/doc/rdoc/files/lib/wee/rendering/html/canvas_rb.html +0 -101
  284. data/doc/rdoc/files/lib/wee/rendering/html/writer_rb.html +0 -108
  285. data/doc/rdoc/files/lib/wee/requesthandler_rb.html +0 -101
  286. data/doc/rdoc/files/lib/wee/skeleton/og/components/main_rb.html +0 -101
  287. data/doc/rdoc/files/lib/wee/skeleton/og/conf/db_rb.html +0 -114
  288. data/doc/rdoc/files/lib/wee/skeleton/og/models/recipe_rb.html +0 -101
  289. data/doc/rdoc/files/lib/wee/skeleton/og/run_rb.html +0 -115
  290. data/doc/rdoc/files/lib/wee/skeleton/simple/components/main_rb.html +0 -101
  291. data/doc/rdoc/files/lib/wee/skeleton/simple/run_rb.html +0 -111
  292. data/doc/rdoc/files/lib/wee/snapshot_ext_rb.html +0 -101
  293. data/doc/rdoc/files/lib/wee/snapshot_rb.html +0 -107
  294. data/doc/rdoc/files/lib/wee/stuff_rb.html +0 -144
  295. data/doc/rdoc/files/lib/wee/template_rb.html +0 -101
  296. data/doc/rdoc/files/lib/wee/utils/autoreload_rb.html +0 -101
  297. data/doc/rdoc/files/lib/wee/utils/cache_rb.html +0 -108
  298. data/doc/rdoc/files/lib/wee/utils/helper_rb.html +0 -101
  299. data/doc/rdoc/files/lib/wee/utils_rb.html +0 -110
  300. data/examples/ajax/ajax.js +0 -444
  301. data/examples/ajax/ajax.rb +0 -31
  302. data/examples/cc.rb +0 -74
  303. data/examples/dispatcher.rb +0 -37
  304. data/examples/draw.rb +0 -94
  305. data/examples/live-update.rb +0 -45
  306. data/examples/nitro/run.rb +0 -42
  307. data/examples/og-test.rb +0 -60
  308. data/examples/radio.rb +0 -44
  309. data/examples/test.rb +0 -39
  310. data/install.rb +0 -14
  311. data/lib/cache/cache.rb +0 -167
  312. data/lib/wee/abstractsession.rb +0 -96
  313. data/lib/wee/adaptors/fastcgi.rb +0 -76
  314. data/lib/wee/adaptors/nitro.rb +0 -155
  315. data/lib/wee/adaptors/rails.rb +0 -154
  316. data/lib/wee/adaptors/webrick.rb +0 -89
  317. data/lib/wee/components.rb +0 -7
  318. data/lib/wee/components/component_dispatcher.rb +0 -46
  319. data/lib/wee/components/form_decoration.rb +0 -7
  320. data/lib/wee/components/login_decoration.rb +0 -35
  321. data/lib/wee/components/page_decoration.rb +0 -14
  322. data/lib/wee/components/wrapper_decoration.rb +0 -7
  323. data/lib/wee/continuation.rb +0 -5
  324. data/lib/wee/continuation/core/component.rb +0 -56
  325. data/lib/wee/continuation/session.rb +0 -64
  326. data/lib/wee/core.rb +0 -16
  327. data/lib/wee/core/callback.rb +0 -121
  328. data/lib/wee/core/component.rb +0 -356
  329. data/lib/wee/core/componentrunner.rb +0 -73
  330. data/lib/wee/core/context.rb +0 -27
  331. data/lib/wee/core/decoration.rb +0 -138
  332. data/lib/wee/core/idgen.rb +0 -5
  333. data/lib/wee/core/page.rb +0 -1
  334. data/lib/wee/core/presenter.rb +0 -100
  335. data/lib/wee/core/renderer.rb +0 -23
  336. data/lib/wee/core/snapshot.rb +0 -21
  337. data/lib/wee/core/valueholder.rb +0 -19
  338. data/lib/wee/core_ext.rb +0 -122
  339. data/lib/wee/databases/og.rb +0 -4
  340. data/lib/wee/databases/og/application.rb +0 -3
  341. data/lib/wee/databases/og/old_scaffolder.rb +0 -98
  342. data/lib/wee/databases/og/scaffolder.rb +0 -255
  343. data/lib/wee/databases/og/session.rb +0 -9
  344. data/lib/wee/examples/calculator.rb +0 -70
  345. data/lib/wee/examples/counter.rb +0 -33
  346. data/lib/wee/idgen/md5.rb +0 -21
  347. data/lib/wee/idgen/sequential.rb +0 -11
  348. data/lib/wee/pageless.rb +0 -3
  349. data/lib/wee/pageless/application.rb +0 -13
  350. data/lib/wee/pageless/request.rb +0 -27
  351. data/lib/wee/pageless/session.rb +0 -74
  352. data/lib/wee/renderer/html/brushes.rb +0 -667
  353. data/lib/wee/renderer/html/canvas.rb +0 -265
  354. data/lib/wee/renderer/html/writer.rb +0 -80
  355. data/lib/wee/requesthandler.rb +0 -81
  356. data/lib/wee/skeleton/og/README +0 -38
  357. data/lib/wee/skeleton/og/components/main.rb +0 -20
  358. data/lib/wee/skeleton/og/conf/db.rb +0 -8
  359. data/lib/wee/skeleton/og/models/recipe.rb +0 -5
  360. data/lib/wee/skeleton/og/run.rb +0 -23
  361. data/lib/wee/skeleton/simple/README +0 -32
  362. data/lib/wee/skeleton/simple/components/main.rb +0 -25
  363. data/lib/wee/skeleton/simple/run.rb +0 -12
  364. data/lib/wee/snapshot_ext.rb +0 -41
  365. data/lib/wee/template.rb +0 -42
  366. data/lib/wee/utils.rb +0 -5
  367. data/lib/wee/utils/autoreload.rb +0 -56
  368. data/lib/wee/utils/cache.rb +0 -7
  369. data/lib/wee/utils/helper.rb +0 -51
@@ -0,0 +1,233 @@
1
+ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
2
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
3
+ <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
4
+ <head>
5
+ <title>Module: Wee::CallbackMixin [RDoc Documentation]</title>
6
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
7
+ <meta http-equiv="Content-Script-Type" content="text/javascript" />
8
+ <link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
9
+ <script type="text/javascript">
10
+ // <![CDATA[
11
+
12
+ function popupCode( url ) {
13
+ window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
14
+ }
15
+
16
+ function toggleCode( id ) {
17
+ if ( document.getElementById )
18
+ elem = document.getElementById( id );
19
+ else if ( document.all )
20
+ elem = eval( "document.all." + id );
21
+ else
22
+ return false;
23
+
24
+ elemStyle = elem.style;
25
+
26
+ if ( elemStyle.display != "block" ) {
27
+ elemStyle.display = "block"
28
+ } else {
29
+ elemStyle.display = "none"
30
+ }
31
+
32
+ return true;
33
+ }
34
+
35
+ // Make codeblocks hidden by default
36
+ document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }<\/style>" )
37
+
38
+ // ]]>
39
+ </script>
40
+
41
+ </head>
42
+ <body>
43
+
44
+
45
+ <div id="classHeader">
46
+ <table class="header-table">
47
+ <tr class="top-aligned-row">
48
+ <td><strong>Module</strong></td>
49
+ <td class="class-name-in-header">Wee::CallbackMixin</td>
50
+ </tr>
51
+ <tr class="top-aligned-row">
52
+ <td><strong>In:</strong></td>
53
+ <td>
54
+
55
+
56
+ <a href="../../files/lib/wee/html_brushes_rb.html">
57
+
58
+ lib/wee/html_brushes.rb
59
+
60
+ </a>
61
+
62
+
63
+ <br />
64
+
65
+ </td>
66
+ </tr>
67
+
68
+
69
+ </table>
70
+ </div>
71
+ <!-- banner header -->
72
+
73
+ <div id="bodyContent">
74
+
75
+ <div id="contextContent">
76
+
77
+ <div id="description">
78
+ <hr size="10"></hr><pre>
79
+ Callback Mixin
80
+ </pre>
81
+ <hr size="10"></hr>
82
+ </div>
83
+
84
+ </div>
85
+
86
+
87
+ <div id="method-list">
88
+ <h3 class="section-bar">Methods</h3>
89
+
90
+ <div class="name-list">
91
+
92
+ <a href="#M000009">call</a>&nbsp;&nbsp;
93
+
94
+ <a href="#M000008">callback</a>&nbsp;&nbsp;
95
+
96
+ <a href="#M000007">callback_method</a>&nbsp;&nbsp;
97
+
98
+ </div>
99
+ </div>
100
+
101
+ </div>
102
+
103
+ <!-- if includes -->
104
+
105
+ <div id="section">
106
+
107
+
108
+
109
+
110
+ <!-- if method_list -->
111
+
112
+ <div id="methods">
113
+
114
+ <h3 class="section-bar">Public Instance methods</h3>
115
+
116
+
117
+ <div id="method-M000009" class="method-detail">
118
+ <a name="M000009"></a>
119
+
120
+ <div class="method-heading">
121
+
122
+ <a href="#M000009" class="method-signature">
123
+
124
+ <span class="method-name">call</span><span class="method-args">(*args)</span>
125
+
126
+ </a>
127
+
128
+ </div>
129
+
130
+ <div class="method-description">
131
+
132
+ <p>
133
+ Is called when <a href="CallbackMixin.html#M000007">callback_method</a> was
134
+ used.
135
+ </p>
136
+
137
+ <p><a class="source-toggle" href="#"
138
+ onclick="toggleCode('M000009-source');return false;">[Source]</a></p>
139
+ <div class="method-source-code" id="M000009-source">
140
+ <pre>
141
+ <span class="ruby-comment cmt"># File lib/wee/html_brushes.rb, line 303</span>
142
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">call</span>(<span class="ruby-operator">*</span><span class="ruby-identifier">args</span>)
143
+ <span class="ruby-identifier">args</span>.<span class="ruby-identifier">push</span>(<span class="ruby-operator">*</span><span class="ruby-ivar">@callback_args</span>)
144
+ <span class="ruby-ivar">@callback_object</span>.<span class="ruby-identifier">send</span>(<span class="ruby-ivar">@callback_id</span>, <span class="ruby-operator">*</span><span class="ruby-identifier">args</span>)
145
+ <span class="ruby-keyword kw">end</span>
146
+ </pre>
147
+ </div>
148
+
149
+ </div>
150
+ </div>
151
+
152
+
153
+ <div id="method-M000008" class="method-detail">
154
+ <a name="M000008"></a>
155
+
156
+ <div class="method-heading">
157
+
158
+ <a href="#M000008" class="method-signature">
159
+
160
+ <span class="method-name">callback</span><span class="method-args">(&amp;block)</span>
161
+
162
+ </a>
163
+
164
+ </div>
165
+
166
+ <div class="method-description">
167
+
168
+ <p><a class="source-toggle" href="#"
169
+ onclick="toggleCode('M000008-source');return false;">[Source]</a></p>
170
+ <div class="method-source-code" id="M000008-source">
171
+ <pre>
172
+ <span class="ruby-comment cmt"># File lib/wee/html_brushes.rb, line 294</span>
173
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">callback</span>(<span class="ruby-operator">&amp;</span><span class="ruby-identifier">block</span>)
174
+ <span class="ruby-ivar">@callback</span> = <span class="ruby-identifier">block</span>
175
+ <span class="ruby-identifier">__callback</span>()
176
+ <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">self</span>
177
+ <span class="ruby-keyword kw">end</span>
178
+ </pre>
179
+ </div>
180
+
181
+ </div>
182
+ </div>
183
+
184
+
185
+ <div id="method-M000007" class="method-detail">
186
+ <a name="M000007"></a>
187
+
188
+ <div class="method-heading">
189
+
190
+ <a href="#M000007" class="method-signature">
191
+
192
+ <span class="method-name">callback_method</span><span class="method-args">(id, *args)</span>
193
+
194
+ </a>
195
+
196
+ </div>
197
+
198
+ <div class="method-description">
199
+
200
+ <p><a class="source-toggle" href="#"
201
+ onclick="toggleCode('M000007-source');return false;">[Source]</a></p>
202
+ <div class="method-source-code" id="M000007-source">
203
+ <pre>
204
+ <span class="ruby-comment cmt"># File lib/wee/html_brushes.rb, line 285</span>
205
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">callback_method</span>(<span class="ruby-identifier">id</span>, <span class="ruby-operator">*</span><span class="ruby-identifier">args</span>)
206
+ <span class="ruby-ivar">@callback</span> = <span class="ruby-keyword kw">self</span>
207
+ <span class="ruby-ivar">@callback_object</span> = <span class="ruby-ivar">@canvas</span>.<span class="ruby-identifier">current_component</span>
208
+ <span class="ruby-ivar">@callback_id</span> = <span class="ruby-identifier">id</span>
209
+ <span class="ruby-ivar">@callback_args</span> = <span class="ruby-identifier">args</span>
210
+ <span class="ruby-identifier">__callback</span>()
211
+ <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">self</span>
212
+ <span class="ruby-keyword kw">end</span>
213
+ </pre>
214
+ </div>
215
+
216
+ </div>
217
+ </div>
218
+
219
+
220
+
221
+ </div>
222
+
223
+
224
+
225
+
226
+ </div>
227
+
228
+ <div id="validator-badges">
229
+ <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
230
+ </div>
231
+
232
+ </body>
233
+ </html>
@@ -1,12 +1,9 @@
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
-
1
+ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
2
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
6
3
  <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
7
4
  <head>
8
- <title>Class: Wee::CallbackRegistry</title>
9
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
5
+ <title>Class: Wee::CallbackRegistry [RDoc Documentation]</title>
6
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
10
7
  <meta http-equiv="Content-Script-Type" content="text/javascript" />
11
8
  <link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
12
9
  <script type="text/javascript">
@@ -25,7 +22,7 @@
25
22
  return false;
26
23
 
27
24
  elemStyle = elem.style;
28
-
25
+
29
26
  if ( elemStyle.display != "block" ) {
30
27
  elemStyle.display = "block"
31
28
  } else {
@@ -34,10 +31,10 @@
34
31
 
35
32
  return true;
36
33
  }
37
-
34
+
38
35
  // Make codeblocks hidden by default
39
- document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
40
-
36
+ document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }<\/style>" )
37
+
41
38
  // ]]>
42
39
  </script>
43
40
 
@@ -45,7 +42,6 @@
45
42
  <body>
46
43
 
47
44
 
48
-
49
45
  <div id="classHeader">
50
46
  <table class="header-table">
51
47
  <tr class="top-aligned-row">
@@ -55,70 +51,67 @@
55
51
  <tr class="top-aligned-row">
56
52
  <td><strong>In:</strong></td>
57
53
  <td>
58
- <a href="../../files/lib/wee/core/callback_rb.html">
59
- lib/wee/core/callback.rb
54
+
55
+
56
+ <a href="../../files/lib/wee/callback_rb.html">
57
+
58
+ lib/wee/callback.rb
59
+
60
60
  </a>
61
+
62
+
61
63
  <br />
64
+
62
65
  </td>
63
66
  </tr>
64
67
 
68
+
65
69
  <tr class="top-aligned-row">
66
70
  <td><strong>Parent:</strong></td>
67
71
  <td>
72
+
68
73
  <a href="../Object.html">
74
+
69
75
  Object
76
+
70
77
  </a>
78
+
71
79
  </td>
72
80
  </tr>
81
+
73
82
  </table>
74
83
  </div>
75
84
  <!-- banner header -->
76
85
 
77
86
  <div id="bodyContent">
78
87
 
79
-
80
-
81
88
  <div id="contextContent">
82
89
 
83
- <div id="description">
84
- <p>
85
- The callback registry is the central datastructure where all components of
86
- a session register their callbacks.
87
- </p>
88
- <p>
89
- The format of the internal datastructure is:
90
- </p>
91
- <pre>
92
- @callbacks[type][callback_id] =&gt; callback
93
- @obj_to_id_map[type][object] =&gt; [id*]
94
- </pre>
95
-
96
- </div>
97
-
98
-
99
- <div id="contents-list">
100
- <h3 class="section-bar">Contents</h3>
101
- <ul>
102
- <li><a href="#SEC00112">Friend methods for Wee::CallbackStream</a></li>
103
- </ul>
104
90
  </div>
105
91
 
92
+
106
93
  <div id="method-list">
107
94
  <h3 class="section-bar">Methods</h3>
108
95
 
109
96
  <div class="name-list">
110
- <a href="#M000309">all_of_type</a>&nbsp;&nbsp;
111
- <a href="#M000308">get_callback_for</a>&nbsp;&nbsp;
112
- <a href="#M000307">get_ids_for</a>&nbsp;&nbsp;
113
- <a href="#M000304">new</a>&nbsp;&nbsp;
114
- <a href="#M000305">register_for</a>&nbsp;&nbsp;
115
- <a href="#M000306">register_named_for</a>&nbsp;&nbsp;
97
+
98
+ <a href="#M000220">each_triggered</a>&nbsp;&nbsp;
99
+
100
+ <a href="#M000215">new</a>&nbsp;&nbsp;
101
+
102
+ <a href="#M000218">prepare_triggered</a>&nbsp;&nbsp;
103
+
104
+ <a href="#M000216">register</a>&nbsp;&nbsp;
105
+
106
+ <a href="#M000219">reset_triggered</a>&nbsp;&nbsp;
107
+
108
+ <a href="#M000217">unregister</a>&nbsp;&nbsp;
109
+
116
110
  </div>
117
111
  </div>
118
112
 
119
113
  </div>
120
114
 
121
-
122
115
  <!-- if includes -->
123
116
 
124
117
  <div id="section">
@@ -126,211 +119,242 @@ The format of the internal datastructure is:
126
119
 
127
120
 
128
121
 
129
-
130
-
131
-
132
-
133
122
  <!-- if method_list -->
123
+
134
124
  <div id="methods">
125
+
135
126
  <h3 class="section-bar">Public Class methods</h3>
136
127
 
137
- <div id="method-M000304" class="method-detail">
138
- <a name="M000304"></a>
128
+
129
+ <div id="method-M000215" class="method-detail">
130
+ <a name="M000215"></a>
139
131
 
140
132
  <div class="method-heading">
141
- <a href="#M000304" class="method-signature">
142
- <span class="method-name">new</span><span class="method-args">(id_generator)</span>
133
+
134
+ <a href="#M000215" class="method-signature">
135
+
136
+ <span class="method-name">new</span><span class="method-args">(prefix=&quot;&quot;)</span>
137
+
143
138
  </a>
139
+
144
140
  </div>
145
-
141
+
146
142
  <div class="method-description">
143
+
147
144
  <p><a class="source-toggle" href="#"
148
- onclick="toggleCode('M000304-source');return false;">[Source]</a></p>
149
- <div class="method-source-code" id="M000304-source">
145
+ onclick="toggleCode('M000215-source');return false;">[Source]</a></p>
146
+ <div class="method-source-code" id="M000215-source">
150
147
  <pre>
151
- <span class="ruby-comment cmt"># File lib/wee/core/callback.rb, line 11</span>
152
- <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">id_generator</span>)
153
- <span class="ruby-ivar">@idgen</span> = <span class="ruby-identifier">id_generator</span>
154
- <span class="ruby-ivar">@callbacks</span> = <span class="ruby-constant">Hash</span>.<span class="ruby-identifier">new</span>
155
- <span class="ruby-ivar">@obj_to_id_map</span> = <span class="ruby-constant">Hash</span>.<span class="ruby-identifier">new</span>
156
- <span class="ruby-keyword kw">end</span>
148
+ <span class="ruby-comment cmt"># File lib/wee/callback.rb, line 4</span>
149
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">prefix</span>=<span class="ruby-value str">&quot;&quot;</span>)
150
+ <span class="ruby-ivar">@prefix</span> = <span class="ruby-identifier">prefix</span>
151
+ <span class="ruby-ivar">@next_id</span> = <span class="ruby-value">0</span>
152
+ <span class="ruby-ivar">@callbacks</span> = {} <span class="ruby-comment cmt"># {callback_id1 =&gt; callback1, callback_id2 =&gt; callback2}</span>
153
+ <span class="ruby-ivar">@triggered</span> = <span class="ruby-keyword kw">nil</span>
154
+ <span class="ruby-ivar">@obj_map</span> = {} <span class="ruby-comment cmt"># obj =&gt; [callback_id1, callback_id2, ...]</span>
155
+ <span class="ruby-keyword kw">end</span>
157
156
  </pre>
158
157
  </div>
158
+
159
159
  </div>
160
160
  </div>
161
161
 
162
+
162
163
  <h3 class="section-bar">Public Instance methods</h3>
163
164
 
164
- <div id="method-M000305" class="method-detail">
165
- <a name="M000305"></a>
165
+
166
+ <div id="method-M000220" class="method-detail">
167
+ <a name="M000220"></a>
166
168
 
167
169
  <div class="method-heading">
168
- <a href="#M000305" class="method-signature">
169
- <span class="method-name">register_for</span><span class="method-args">(object, type, callback)</span>
170
+
171
+ <a href="#M000220" class="method-signature">
172
+
173
+ <span class="method-name">each_triggered</span><span class="method-args">(object) {|@callbacks[id], @triggered[id] if @triggered.has_key?(id)| ...}</span>
174
+
170
175
  </a>
176
+
171
177
  </div>
172
-
178
+
173
179
  <div class="method-description">
174
- <p>
175
- Register <tt>callback</tt> for <tt>object</tt> under <tt>type</tt> and
176
- return a unique callback id.
177
- </p>
180
+
178
181
  <p><a class="source-toggle" href="#"
179
- onclick="toggleCode('M000305-source');return false;">[Source]</a></p>
180
- <div class="method-source-code" id="M000305-source">
182
+ onclick="toggleCode('M000220-source');return false;">[Source]</a></p>
183
+ <div class="method-source-code" id="M000220-source">
181
184
  <pre>
182
- <span class="ruby-comment cmt"># File lib/wee/core/callback.rb, line 19</span>
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>
185
+ <span class="ruby-comment cmt"># File lib/wee/callback.rb, line 53</span>
186
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">each_triggered</span>(<span class="ruby-identifier">object</span>)
187
+ <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">ary</span> = <span class="ruby-ivar">@obj_map</span>[<span class="ruby-identifier">object</span>]
188
+ <span class="ruby-identifier">ary</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>
189
+ <span class="ruby-keyword kw">yield</span> <span class="ruby-ivar">@callbacks</span>[<span class="ruby-identifier">id</span>], <span class="ruby-ivar">@triggered</span>[<span class="ruby-identifier">id</span>] <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@triggered</span>.<span class="ruby-identifier">has_key?</span>(<span class="ruby-identifier">id</span>)
190
+ <span class="ruby-keyword kw">end</span>
191
+ <span class="ruby-keyword kw">end</span>
192
+ <span class="ruby-keyword kw">end</span>
186
193
  </pre>
187
194
  </div>
195
+
188
196
  </div>
189
197
  </div>
190
198
 
191
- <div id="method-M000306" class="method-detail">
192
- <a name="M000306"></a>
199
+
200
+ <div id="method-M000218" class="method-detail">
201
+ <a name="M000218"></a>
193
202
 
194
203
  <div class="method-heading">
195
- <a href="#M000306" class="method-signature">
196
- <span class="method-name">register_named_for</span><span class="method-args">(object, type, callback, named_id)</span>
204
+
205
+ <a href="#M000218" class="method-signature">
206
+
207
+ <span class="method-name">prepare_triggered</span><span class="method-args">(ids_and_values)</span>
208
+
197
209
  </a>
210
+
198
211
  </div>
199
-
212
+
200
213
  <div class="method-description">
214
+
201
215
  <p>
202
- Register <tt>callback</tt> for <tt>object</tt> under <tt>type</tt> with the
203
- id <tt>named_id</tt>.
216
+ NOTE that if fields named &#8220;xxx&#8221; and &#8220;xxx.yyy&#8220;
217
+ occur, the value of @fields[&#8216;xxx&#8217;] is { nil => &#8230;,
218
+ &#8216;yyy&#8217; => &#8230; }. This is required to make image buttons work
219
+ correctly.
204
220
  </p>
221
+
205
222
  <p><a class="source-toggle" href="#"
206
- onclick="toggleCode('M000306-source');return false;">[Source]</a></p>
207
- <div class="method-source-code" id="M000306-source">
223
+ onclick="toggleCode('M000218-source');return false;">[Source]</a></p>
224
+ <div class="method-source-code" id="M000218-source">
208
225
  <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>
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>)
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>)
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>)
215
- <span class="ruby-identifier">c</span>[<span class="ruby-identifier">cid</span>] = <span class="ruby-identifier">callback</span>
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>
217
- <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">cid</span>
218
- <span class="ruby-keyword kw">end</span>
226
+ <span class="ruby-comment cmt"># File lib/wee/callback.rb, line 31</span>
227
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">prepare_triggered</span>(<span class="ruby-identifier">ids_and_values</span>)
228
+ <span class="ruby-ivar">@triggered</span> = {}
229
+ <span class="ruby-identifier">ids_and_values</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-identifier">value</span><span class="ruby-operator">|</span>
230
+ <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">id</span> <span class="ruby-operator">=~</span> <span class="ruby-node">/^#{@prefix}(\d+)([.](.*))?$/</span>
231
+ <span class="ruby-identifier">id</span>, <span class="ruby-identifier">suffix</span> = <span class="ruby-constant">Integer</span>(<span class="ruby-identifier">$1</span>), <span class="ruby-identifier">$3</span>
232
+ <span class="ruby-keyword kw">next</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-ivar">@callbacks</span>[<span class="ruby-identifier">id</span>]
233
+
234
+ <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@triggered</span>[<span class="ruby-identifier">id</span>].<span class="ruby-identifier">kind_of?</span>(<span class="ruby-constant">Hash</span>)
235
+ <span class="ruby-ivar">@triggered</span>[<span class="ruby-identifier">id</span>][<span class="ruby-identifier">suffix</span>] = <span class="ruby-identifier">value</span>
236
+ <span class="ruby-keyword kw">elsif</span> <span class="ruby-identifier">suffix</span>
237
+ <span class="ruby-ivar">@triggered</span>[<span class="ruby-identifier">id</span>] = {<span class="ruby-keyword kw">nil</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-ivar">@triggered</span>[<span class="ruby-identifier">id</span>], <span class="ruby-identifier">suffix</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">value</span>}
238
+ <span class="ruby-keyword kw">else</span>
239
+ <span class="ruby-ivar">@triggered</span>[<span class="ruby-identifier">id</span>] = <span class="ruby-identifier">value</span>
240
+ <span class="ruby-keyword kw">end</span>
241
+ <span class="ruby-keyword kw">end</span>
242
+ <span class="ruby-keyword kw">end</span>
243
+ <span class="ruby-keyword kw">end</span>
219
244
  </pre>
220
245
  </div>
246
+
221
247
  </div>
222
248
  </div>
223
249
 
224
250
 
225
- </div>
226
- <div id="section">
227
- <h2 class="section-title"><a name="SEC00112">Friend methods for Wee::CallbackStream</a></h2>
228
- <div class="section-comment">
229
-
230
- </div>
231
-
232
-
233
-
234
-
235
-
236
-
251
+ <div id="method-M000216" class="method-detail">
252
+ <a name="M000216"></a>
237
253
 
254
+ <div class="method-heading">
238
255
 
239
- <!-- if method_list -->
240
- <div id="methods">
241
- <h3 class="section-bar">Public Instance methods</h3>
256
+ <a href="#M000216" class="method-signature">
242
257
 
243
- <div id="method-M000309" class="method-detail">
244
- <a name="M000309"></a>
258
+ <span class="method-name">register</span><span class="method-args">(object, callback)</span>
245
259
 
246
- <div class="method-heading">
247
- <a href="#M000309" class="method-signature">
248
- <span class="method-name">all_of_type</span><span class="method-args">(type)</span>
249
260
  </a>
261
+
250
262
  </div>
251
-
263
+
252
264
  <div class="method-description">
265
+
253
266
  <p><a class="source-toggle" href="#"
254
- onclick="toggleCode('M000309-source');return false;">[Source]</a></p>
255
- <div class="method-source-code" id="M000309-source">
267
+ onclick="toggleCode('M000216-source');return false;">[Source]</a></p>
268
+ <div class="method-source-code" id="M000216-source">
256
269
  <pre>
257
- <span class="ruby-comment cmt"># File lib/wee/core/callback.rb, line 55</span>
258
- <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">all_of_type</span>(<span class="ruby-identifier">type</span>)
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>]
260
- <span class="ruby-identifier">c</span>
261
- <span class="ruby-keyword kw">else</span>
262
- []
270
+ <span class="ruby-comment cmt"># File lib/wee/callback.rb, line 12</span>
271
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">register</span>(<span class="ruby-identifier">object</span>, <span class="ruby-identifier">callback</span>)
272
+ <span class="ruby-identifier">id</span> = <span class="ruby-ivar">@next_id</span>
273
+ <span class="ruby-ivar">@next_id</span> <span class="ruby-operator">+=</span> <span class="ruby-value">1</span>
274
+ <span class="ruby-ivar">@callbacks</span>[<span class="ruby-identifier">id</span>] = <span class="ruby-identifier">callback</span>
275
+ (<span class="ruby-ivar">@obj_map</span>[<span class="ruby-identifier">object</span>] <span class="ruby-operator">||=</span> []) <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-identifier">id</span>
276
+ <span class="ruby-keyword kw">return</span> <span class="ruby-node">&quot;#{@prefix}#{id}&quot;</span>
263
277
  <span class="ruby-keyword kw">end</span>
264
- <span class="ruby-keyword kw">end</span>
265
278
  </pre>
266
279
  </div>
280
+
267
281
  </div>
268
282
  </div>
269
283
 
270
- <div id="method-M000308" class="method-detail">
271
- <a name="M000308"></a>
284
+
285
+ <div id="method-M000219" class="method-detail">
286
+ <a name="M000219"></a>
272
287
 
273
288
  <div class="method-heading">
274
- <a href="#M000308" class="method-signature">
275
- <span class="method-name">get_callback_for</span><span class="method-args">(id, type)</span>
289
+
290
+ <a href="#M000219" class="method-signature">
291
+
292
+ <span class="method-name">reset_triggered</span><span class="method-args">()</span>
293
+
276
294
  </a>
295
+
277
296
  </div>
278
-
297
+
279
298
  <div class="method-description">
299
+
280
300
  <p><a class="source-toggle" href="#"
281
- onclick="toggleCode('M000308-source');return false;">[Source]</a></p>
282
- <div class="method-source-code" id="M000308-source">
301
+ onclick="toggleCode('M000219-source');return false;">[Source]</a></p>
302
+ <div class="method-source-code" id="M000219-source">
283
303
  <pre>
284
- <span class="ruby-comment cmt"># File lib/wee/core/callback.rb, line 47</span>
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>)
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>]
287
- <span class="ruby-identifier">c</span>[<span class="ruby-identifier">id</span>]
288
- <span class="ruby-keyword kw">else</span>
289
- <span class="ruby-identifier">raise</span>
304
+ <span class="ruby-comment cmt"># File lib/wee/callback.rb, line 49</span>
305
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">reset_triggered</span>
306
+ <span class="ruby-ivar">@triggered</span> = <span class="ruby-keyword kw">nil</span>
290
307
  <span class="ruby-keyword kw">end</span>
291
- <span class="ruby-keyword kw">end</span>
292
308
  </pre>
293
309
  </div>
310
+
294
311
  </div>
295
312
  </div>
296
313
 
297
- <div id="method-M000307" class="method-detail">
298
- <a name="M000307"></a>
314
+
315
+ <div id="method-M000217" class="method-detail">
316
+ <a name="M000217"></a>
299
317
 
300
318
  <div class="method-heading">
301
- <a href="#M000307" class="method-signature">
302
- <span class="method-name">get_ids_for</span><span class="method-args">(object, type)</span>
319
+
320
+ <a href="#M000217" class="method-signature">
321
+
322
+ <span class="method-name">unregister</span><span class="method-args">(object)</span>
323
+
303
324
  </a>
325
+
304
326
  </div>
305
-
327
+
306
328
  <div class="method-description">
329
+
307
330
  <p><a class="source-toggle" href="#"
308
- onclick="toggleCode('M000307-source');return false;">[Source]</a></p>
309
- <div class="method-source-code" id="M000307-source">
331
+ onclick="toggleCode('M000217-source');return false;">[Source]</a></p>
332
+ <div class="method-source-code" id="M000217-source">
310
333
  <pre>
311
- <span class="ruby-comment cmt"># File lib/wee/core/callback.rb, line 39</span>
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>)
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>]
314
- <span class="ruby-identifier">o</span>[<span class="ruby-identifier">object</span>] <span class="ruby-operator">||</span> []
315
- <span class="ruby-keyword kw">else</span>
316
- []
334
+ <span class="ruby-comment cmt"># File lib/wee/callback.rb, line 20</span>
335
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">unregister</span>(<span class="ruby-identifier">object</span>)
336
+ <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">arr</span> = <span class="ruby-ivar">@obj_map</span>.<span class="ruby-identifier">delete</span>(<span class="ruby-identifier">object</span>)
337
+ <span class="ruby-identifier">arr</span>.<span class="ruby-identifier">each</span> {<span class="ruby-operator">|</span><span class="ruby-identifier">id</span><span class="ruby-operator">|</span> <span class="ruby-ivar">@callbacks</span>.<span class="ruby-identifier">delete</span>(<span class="ruby-identifier">id</span>) }
338
+ <span class="ruby-keyword kw">end</span>
317
339
  <span class="ruby-keyword kw">end</span>
318
- <span class="ruby-keyword kw">end</span>
319
340
  </pre>
320
341
  </div>
342
+
321
343
  </div>
322
344
  </div>
323
345
 
324
346
 
347
+
325
348
  </div>
326
349
 
327
350
 
328
- </div>
329
351
 
330
352
 
353
+ </div>
354
+
331
355
  <div id="validator-badges">
332
356
  <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
333
357
  </div>
334
358
 
335
359
  </body>
336
- </html>
360
+ </html>