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
@@ -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::Presenter</title>
9
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
5
+ <title>Class: Wee::Presenter [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,875 +51,299 @@
55
51
  <tr class="top-aligned-row">
56
52
  <td><strong>In:</strong></td>
57
53
  <td>
58
- <a href="../../files/lib/wee/core_ext_rb.html">
59
- lib/wee/core_ext.rb
60
- </a>
61
- <br />
62
- <a href="../../files/lib/wee/template_rb.html">
63
- lib/wee/template.rb
64
- </a>
65
- <br />
66
- <a href="../../files/lib/wee/core/presenter_rb.html">
67
- lib/wee/core/presenter.rb
68
- </a>
69
- <br />
70
- <a href="../../files/lib/wee/adaptors/rails_rb.html">
71
- lib/wee/adaptors/rails.rb
72
- </a>
73
- <br />
74
- <a href="../../files/lib/wee/adaptors/nitro_rb.html">
75
- lib/wee/adaptors/nitro.rb
54
+
55
+
56
+ <a href="../../files/lib/wee/presenter_rb.html">
57
+
58
+ lib/wee/presenter.rb
59
+
76
60
  </a>
61
+
62
+
77
63
  <br />
64
+
78
65
  </td>
79
66
  </tr>
80
67
 
68
+
81
69
  <tr class="top-aligned-row">
82
70
  <td><strong>Parent:</strong></td>
83
71
  <td>
72
+
84
73
  <a href="../Object.html">
74
+
85
75
  Object
76
+
86
77
  </a>
78
+
87
79
  </td>
88
80
  </tr>
81
+
89
82
  </table>
90
83
  </div>
91
84
  <!-- banner header -->
92
85
 
93
86
  <div id="bodyContent">
94
87
 
95
-
96
-
97
88
  <div id="contextContent">
98
89
 
99
90
  <div id="description">
100
91
  <p>
101
- <a href="Presenter.html">Wee::Presenter</a> is the superclass of all
102
- classes that want to participate in rendering and callback-processing. <a
103
- href="Component.html">Wee::Component</a> and <a
104
- href="Decoration.html">Wee::Decoration</a> are it&#8217;s two most
105
- important subclasses.
92
+ <a href="Presenter.html">Presenter</a> is the superclass of all classes
93
+ that want to participate in rendering and callback-processing. It merely
94
+ specifies an interface without actual implementation.
95
+ </p>
96
+ <p>
97
+ Class <a href="Component.html">Component</a> and <a
98
+ href="Decoration.html">Decoration</a> are it&#8217;s two most important
99
+ subclasses.
106
100
  </p>
107
101
 
108
102
  </div>
109
103
 
110
-
111
- <div id="contents-list">
112
- <h3 class="section-bar">Contents</h3>
113
- <ul>
114
- <li><a href="#SEC00035">Session</a></li>
115
- <li><a href="#SEC00036">Properties</a></li>
116
- <li><a href="#SEC00105">Render</a></li>
117
- <li><a href="#SEC00106">Callback</a></li>
118
- <li><a href="#SEC00107">Backtrack</a></li>
119
- </ul>
120
104
  </div>
121
105
 
106
+
122
107
  <div id="method-list">
123
108
  <h3 class="section-bar">Methods</h3>
124
109
 
125
110
  <div class="name-list">
126
- <a href="#M000381">backtrack_state</a>&nbsp;&nbsp;
127
- <a href="#M000375">do_render</a>&nbsp;&nbsp;
128
- <a href="#M000370">get_property</a>&nbsp;&nbsp;
129
- <a href="#M000371">lookup_property</a>&nbsp;&nbsp;
130
- <a href="#M000380">process_callbacks</a>&nbsp;&nbsp;
131
- <a href="#M000368">properties</a>&nbsp;&nbsp;
132
- <a href="#M000369">properties=</a>&nbsp;&nbsp;
133
- <a href="#M000377">r</a>&nbsp;&nbsp;
134
- <a href="#M000374">render</a>&nbsp;&nbsp;
135
- <a href="#M000376">renderer</a>&nbsp;&nbsp;
136
- <a href="#M000364">renderer_class</a>&nbsp;&nbsp;
137
- <a href="#M000383">renderer_class</a>&nbsp;&nbsp;
138
- <a href="#M000382">renderer_class</a>&nbsp;&nbsp;
139
- <a href="#M000379">renderer_class</a>&nbsp;&nbsp;
140
- <a href="#M000367">send_render_response</a>&nbsp;&nbsp;
141
- <a href="#M000366">send_response</a>&nbsp;&nbsp;
142
- <a href="#M000365">session</a>&nbsp;&nbsp;
143
- <a href="#M000373">template</a>&nbsp;&nbsp;
144
- <a href="#M000372">uses_property</a>&nbsp;&nbsp;
145
- <a href="#M000378">with_renderer_for</a>&nbsp;&nbsp;
146
- </div>
147
- </div>
148
-
149
- </div>
150
-
151
-
152
- <!-- if includes -->
153
-
154
- <div id="section">
155
111
 
112
+ <a href="#M000061">backtrack</a>&nbsp;&nbsp;
156
113
 
114
+ <a href="#M000062">process_callbacks</a>&nbsp;&nbsp;
157
115
 
116
+ <a href="#M000060">render</a>&nbsp;&nbsp;
158
117
 
118
+ <a href="#M000059">render_on</a>&nbsp;&nbsp;
159
119
 
160
-
120
+ <a href="#M000063">renderer_class</a>&nbsp;&nbsp;
161
121
 
122
+ <a href="#M000064">session</a>&nbsp;&nbsp;
162
123
 
163
- <!-- if method_list -->
164
- <div id="methods">
165
- <h3 class="section-bar">Public Instance methods</h3>
166
-
167
- <div id="method-M000364" class="method-detail">
168
- <a name="M000364"></a>
169
-
170
- <div class="method-heading">
171
- <a href="#M000364" class="method-signature">
172
- <span class="method-name">renderer_class</span><span class="method-args">()</span>
173
- </a>
174
- </div>
175
-
176
- <div class="method-description">
177
- <p><a class="source-toggle" href="#"
178
- onclick="toggleCode('M000364-source');return false;">[Source]</a></p>
179
- <div class="method-source-code" id="M000364-source">
180
- <pre>
181
- <span class="ruby-comment cmt"># File lib/wee/core_ext.rb, line 3</span>
182
- <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">renderer_class</span>
183
- <span class="ruby-constant">Wee</span><span class="ruby-operator">::</span><span class="ruby-constant">DefaultRenderer</span>
184
- <span class="ruby-keyword kw">end</span>
185
- </pre>
186
- </div>
187
- </div>
188
124
  </div>
189
-
190
-
191
125
  </div>
192
- <div id="section">
193
- <h2 class="section-title"><a name="SEC00035">Session</a></h2>
194
- <div class="section-comment">
195
-
196
- </div>
197
126
 
127
+ </div>
198
128
 
129
+ <!-- if includes -->
199
130
 
131
+ <div id="section">
200
132
 
201
133
 
202
-
203
134
 
204
135
 
205
136
  <!-- if method_list -->
206
- <div id="methods">
207
- <h3 class="section-bar">Public Instance methods</h3>
208
137
 
209
- <div id="method-M000365" class="method-detail">
210
- <a name="M000365"></a>
138
+ <div id="methods">
211
139
 
212
- <div class="method-heading">
213
- <a href="#M000365" class="method-signature">
214
- <span class="method-name">session</span><span class="method-args">()</span>
215
- </a>
216
- </div>
217
-
218
- <div class="method-description">
219
- <p>
220
- Returns the current session. A presenter (or component) has always an
221
- associated session. The returned object is of class <a
222
- href="Session.html">Wee::Session</a> or a subclass thereof.
223
- </p>
224
- <p><a class="source-toggle" href="#"
225
- onclick="toggleCode('M000365-source');return false;">[Source]</a></p>
226
- <div class="method-source-code" id="M000365-source">
227
- <pre>
228
- <span class="ruby-comment cmt"># File lib/wee/core_ext.rb, line 17</span>
229
- <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">session</span>
230
- <span class="ruby-constant">Wee</span><span class="ruby-operator">::</span><span class="ruby-constant">Session</span>.<span class="ruby-identifier">current</span>
231
- <span class="ruby-keyword kw">end</span>
232
- </pre>
233
- </div>
234
- </div>
235
- </div>
140
+ <h3 class="section-bar">Public Instance methods</h3>
236
141
 
237
- <h3 class="section-bar">Protected Instance methods</h3>
238
142
 
239
- <div id="method-M000367" class="method-detail">
240
- <a name="M000367"></a>
143
+ <div id="method-M000061" class="method-detail">
144
+ <a name="M000061"></a>
241
145
 
242
146
  <div class="method-heading">
243
- <a href="#M000367" class="method-signature">
244
- <span class="method-name">send_render_response</span><span class="method-args">(&amp;block)</span>
245
- </a>
246
- </div>
247
-
248
- <div class="method-description">
249
- <p>
250
- Call the block inside a rendering environment, then send the response
251
- prematurely.
252
- </p>
253
- <p><a class="source-toggle" href="#"
254
- onclick="toggleCode('M000367-source');return false;">[Source]</a></p>
255
- <div class="method-source-code" id="M000367-source">
256
- <pre>
257
- <span class="ruby-comment cmt"># File lib/wee/core_ext.rb, line 31</span>
258
- <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">send_render_response</span>(<span class="ruby-operator">&amp;</span><span class="ruby-identifier">block</span>)
259
- <span class="ruby-comment cmt"># Generate a response</span>
260
- <span class="ruby-identifier">response</span> = <span class="ruby-constant">Wee</span><span class="ruby-operator">::</span><span class="ruby-constant">GenericResponse</span>.<span class="ruby-identifier">new</span>(<span class="ruby-value str">'text/html'</span>, <span class="ruby-value str">''</span>)
261
147
 
262
- <span class="ruby-comment cmt"># Get the current context we are in</span>
263
- <span class="ruby-identifier">context</span> = <span class="ruby-identifier">session</span>.<span class="ruby-identifier">current_context</span>
148
+ <a href="#M000061" class="method-signature">
264
149
 
265
- <span class="ruby-comment cmt"># A rendering context is needed to use 'r' (if you want, you can simply</span>
266
- <span class="ruby-comment cmt"># omit this and just return the response with some html/xml filled in.</span>
267
- <span class="ruby-identifier">rendering_context</span> = <span class="ruby-constant">Wee</span><span class="ruby-operator">::</span><span class="ruby-constant">RenderingContext</span>.<span class="ruby-identifier">new</span>(
268
- <span class="ruby-identifier">context</span>,
269
- <span class="ruby-identifier">session</span>.<span class="ruby-identifier">current_callbacks</span>,
270
- <span class="ruby-constant">Wee</span><span class="ruby-operator">::</span><span class="ruby-constant">HtmlWriter</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">response</span>.<span class="ruby-identifier">content</span>))
150
+ <span class="method-name">backtrack</span><span class="method-args">(state)</span>
271
151
 
272
- <span class="ruby-identifier">with_renderer_for</span>(<span class="ruby-identifier">rendering_context</span>, <span class="ruby-operator">&amp;</span><span class="ruby-identifier">block</span>)
152
+ </a>
273
153
 
274
- <span class="ruby-identifier">send_response</span>(<span class="ruby-identifier">response</span>)
275
- <span class="ruby-keyword kw">end</span>
276
- </pre>
277
- </div>
278
154
  </div>
279
- </div>
280
155
 
281
- <div id="method-M000366" class="method-detail">
282
- <a name="M000366"></a>
283
-
284
- <div class="method-heading">
285
- <a href="#M000366" class="method-signature">
286
- <span class="method-name">send_response</span><span class="method-args">(response)</span>
287
- </a>
288
- </div>
289
-
290
156
  <div class="method-description">
291
- <p>
292
- Send a premature response.
293
- </p>
157
+
294
158
  <p><a class="source-toggle" href="#"
295
- onclick="toggleCode('M000366-source');return false;">[Source]</a></p>
296
- <div class="method-source-code" id="M000366-source">
159
+ onclick="toggleCode('M000061-source');return false;">[Source]</a></p>
160
+ <div class="method-source-code" id="M000061-source">
297
161
  <pre>
298
- <span class="ruby-comment cmt"># File lib/wee/core_ext.rb, line 25</span>
299
- <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">send_response</span>(<span class="ruby-identifier">response</span>)
300
- <span class="ruby-identifier">throw</span> <span class="ruby-identifier">:wee_abort_callback_processing</span>, <span class="ruby-identifier">response</span>
301
- <span class="ruby-keyword kw">end</span>
162
+ <span class="ruby-comment cmt"># File lib/wee/presenter.rb, line 17</span>
163
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">backtrack</span>(<span class="ruby-identifier">state</span>); <span class="ruby-identifier">raise</span> <span class="ruby-keyword kw">end</span>
302
164
  </pre>
303
165
  </div>
166
+
304
167
  </div>
305
168
  </div>
306
169
 
307
170
 
308
- </div>
309
- <div id="section">
310
- <h2 class="section-title"><a name="SEC00036">Properties</a></h2>
311
- <div class="section-comment">
312
-
313
- </div>
314
-
315
-
316
-
317
-
318
-
319
-
171
+ <div id="method-M000062" class="method-detail">
172
+ <a name="M000062"></a>
320
173
 
174
+ <div class="method-heading">
321
175
 
322
- <!-- if method_list -->
323
- <div id="methods">
324
- <h3 class="section-bar">Public Class methods</h3>
176
+ <a href="#M000062" class="method-signature">
325
177
 
326
- <div id="method-M000373" class="method-detail">
327
- <a name="M000373"></a>
178
+ <span class="method-name">process_callbacks</span><span class="method-args">(callbacks)</span>
328
179
 
329
- <div class="method-heading">
330
- <a href="#M000373" class="method-signature">
331
- <span class="method-name">template</span><span class="method-args">(method, hash={})</span>
332
180
  </a>
333
- </div>
334
-
335
- <div class="method-description">
336
- <p><a class="source-toggle" href="#"
337
- onclick="toggleCode('M000373-source');return false;">[Source]</a></p>
338
- <div class="method-source-code" id="M000373-source">
339
- <pre>
340
- <span class="ruby-comment cmt"># File lib/wee/template.rb, line 2</span>
341
- <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">template</span>(<span class="ruby-identifier">method</span>, <span class="ruby-identifier">hash</span>={})
342
- <span class="ruby-identifier">method</span> = <span class="ruby-identifier">method</span>.<span class="ruby-identifier">to_s</span>
343
-
344
- <span class="ruby-identifier">file_code</span> =
345
- <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">hash</span>.<span class="ruby-identifier">has_key?</span>(<span class="ruby-identifier">:property</span>)
346
- <span class="ruby-node">&quot;lookup_property(#{ hash[:property].inspect })&quot;</span>
347
- <span class="ruby-keyword kw">elsif</span> <span class="ruby-identifier">hash</span>.<span class="ruby-identifier">has_key?</span>(<span class="ruby-identifier">:file</span>)
348
- <span class="ruby-identifier">hash</span>[<span class="ruby-identifier">:file</span>].<span class="ruby-identifier">inspect</span>
349
- <span class="ruby-keyword kw">elsif</span> <span class="ruby-identifier">hash</span>.<span class="ruby-identifier">has_key?</span>(<span class="ruby-identifier">:local</span>)
350
- <span class="ruby-comment cmt"># like file, but use relative to current path</span>
351
-
352
- <span class="ruby-identifier">caller_path</span> = <span class="ruby-identifier">caller</span>.<span class="ruby-identifier">first</span>.<span class="ruby-identifier">sub</span>(<span class="ruby-regexp re">/:\d+$/</span>, <span class="ruby-value str">&quot;&quot;</span>)
353
-
354
- <span class="ruby-constant">File</span>.<span class="ruby-identifier">join</span>(<span class="ruby-constant">File</span>.<span class="ruby-identifier">dirname</span>(<span class="ruby-identifier">caller_path</span>), <span class="ruby-identifier">hash</span>[<span class="ruby-identifier">:local</span>]).<span class="ruby-identifier">inspect</span>
355
- <span class="ruby-keyword kw">else</span>
356
- <span class="ruby-identifier">caller_path</span> = <span class="ruby-identifier">caller</span>.<span class="ruby-identifier">first</span>.<span class="ruby-identifier">sub</span>(<span class="ruby-regexp re">/:\d+$/</span>, <span class="ruby-value str">&quot;&quot;</span>)
357
- <span class="ruby-identifier">basename</span> = <span class="ruby-identifier">caller_path</span>[<span class="ruby-value">0</span>, <span class="ruby-identifier">caller_path</span>.<span class="ruby-identifier">rindex</span>(<span class="ruby-value str">&quot;.rb&quot;</span>)]
358
- <span class="ruby-identifier">ext</span> = <span class="ruby-value str">'.tpl'</span>
359
-
360
- <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">method</span> <span class="ruby-operator">=~</span> <span class="ruby-regexp re">/^render(.*)$/</span>
361
- <span class="ruby-identifier">basename</span> <span class="ruby-operator">+</span> <span class="ruby-identifier">ext</span> <span class="ruby-operator">+</span> <span class="ruby-identifier">$1</span>.<span class="ruby-identifier">tr</span>(<span class="ruby-value str">'_'</span>, <span class="ruby-value str">'-'</span>)
362
- <span class="ruby-keyword kw">else</span>
363
- <span class="ruby-identifier">raise</span> <span class="ruby-constant">ArgumentError</span>
364
- <span class="ruby-keyword kw">end</span>.<span class="ruby-identifier">inspect</span>
365
- <span class="ruby-keyword kw">end</span>
366
-
367
- <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">hash</span>[<span class="ruby-identifier">:r_as_param</span>]
368
- <span class="ruby-identifier">class_eval</span> <span class="ruby-node">%{
369
- def #{ method }(r)
370
- r.template(#{ file_code })
371
- end
372
- }</span>
373
- <span class="ruby-keyword kw">else</span>
374
- <span class="ruby-identifier">class_eval</span> <span class="ruby-node">%{
375
- def #{ method }
376
- r.template(#{ file_code })
377
- end
378
- }</span>
379
- <span class="ruby-keyword kw">end</span>
380
- <span class="ruby-keyword kw">end</span>
381
- </pre>
382
- </div>
383
- </div>
384
- </div>
385
-
386
- <div id="method-M000372" class="method-detail">
387
- <a name="M000372"></a>
388
181
 
389
- <div class="method-heading">
390
- <a href="#M000372" class="method-signature">
391
- <span class="method-name">uses_property</span><span class="method-args">(*args)</span>
392
- </a>
393
182
  </div>
394
-
395
- <div class="method-description">
396
- <p>
397
- This is currently only used for describing which properties are required by
398
- the underlying component.
399
- </p>
400
- <p><a class="source-toggle" href="#"
401
- onclick="toggleCode('M000372-source');return false;">[Source]</a></p>
402
- <div class="method-source-code" id="M000372-source">
403
- <pre>
404
- <span class="ruby-comment cmt"># File lib/wee/core_ext.rb, line 119</span>
405
- <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">uses_property</span>(<span class="ruby-operator">*</span><span class="ruby-identifier">args</span>)
406
- <span class="ruby-keyword kw">end</span>
407
- </pre>
408
- </div>
409
- </div>
410
- </div>
411
183
 
412
- <h3 class="section-bar">Public Instance methods</h3>
413
-
414
- <div id="method-M000370" class="method-detail">
415
- <a name="M000370"></a>
416
-
417
- <div class="method-heading">
418
- <a href="#M000370" class="method-signature">
419
- <span class="method-name">get_property</span><span class="method-args">(prop)</span>
420
- </a>
421
- </div>
422
-
423
184
  <div class="method-description">
424
- <p>
425
- Returns an &quot;owned&quot; property.
426
- </p>
185
+
427
186
  <p><a class="source-toggle" href="#"
428
- onclick="toggleCode('M000370-source');return false;">[Source]</a></p>
429
- <div class="method-source-code" id="M000370-source">
187
+ onclick="toggleCode('M000062-source');return false;">[Source]</a></p>
188
+ <div class="method-source-code" id="M000062-source">
430
189
  <pre>
431
- <span class="ruby-comment cmt"># File lib/wee/core_ext.rb, line 62</span>
432
- <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">get_property</span>(<span class="ruby-identifier">prop</span>)
433
- <span class="ruby-keyword kw">if</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">properties</span>
434
- <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">properties</span>[<span class="ruby-identifier">prop</span>]
435
- <span class="ruby-keyword kw">else</span>
436
- <span class="ruby-keyword kw">nil</span>
437
- <span class="ruby-keyword kw">end</span>
438
- <span class="ruby-keyword kw">end</span>
190
+ <span class="ruby-comment cmt"># File lib/wee/presenter.rb, line 18</span>
191
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">process_callbacks</span>(<span class="ruby-identifier">callbacks</span>); <span class="ruby-identifier">raise</span> <span class="ruby-keyword kw">end</span>
439
192
  </pre>
440
193
  </div>
441
- </div>
442
- </div>
443
-
444
- <div id="method-M000371" class="method-detail">
445
- <a name="M000371"></a>
446
194
 
447
- <div class="method-heading">
448
- <a href="#M000371" class="method-signature">
449
- <span class="method-name">lookup_property</span><span class="method-args">(prop)</span>
450
- </a>
451
195
  </div>
452
-
453
- <div class="method-description">
454
- <p>
455
- Tries to lookup a property from different places. <tt>nil</tt> as property
456
- value is not allowed!
457
- </p>
458
- <p>
459
- Search order:
460
- </p>
461
- <ol>
462
- <li>self.get_property(prop)
463
-
464
- </li>
465
- <li>session.get_property(prop, self.class)
466
-
467
- </li>
468
- <li>application.get_property(prop, self.class)
469
-
470
- </li>
471
- <li>session.get_property(prop, nil)
472
-
473
- </li>
474
- <li>application.get_property(prop, nil)
475
-
476
- </li>
477
- <li>@@properties[prop]
478
-
479
- </li>
480
- </ol>
481
- <p><a class="source-toggle" href="#"
482
- onclick="toggleCode('M000371-source');return false;">[Source]</a></p>
483
- <div class="method-source-code" id="M000371-source">
484
- <pre>
485
- <span class="ruby-comment cmt"># File lib/wee/core_ext.rb, line 88</span>
486
- <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">lookup_property</span>(<span class="ruby-identifier">prop</span>)
487
- <span class="ruby-identifier">val</span> = <span class="ruby-identifier">get_property</span>(<span class="ruby-identifier">prop</span>)
488
- <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">val</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">val</span> <span class="ruby-operator">!=</span> <span class="ruby-keyword kw">nil</span>
196
+ </div>
489
197
 
490
- <span class="ruby-identifier">sess</span> = <span class="ruby-identifier">session</span>()
491
- <span class="ruby-identifier">app</span> = <span class="ruby-identifier">sess</span>.<span class="ruby-identifier">application</span>
492
- <span class="ruby-identifier">klass</span> = <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">class</span>
493
198
 
494
- <span class="ruby-identifier">val</span> = <span class="ruby-identifier">sess</span>.<span class="ruby-identifier">get_property</span>(<span class="ruby-identifier">prop</span>, <span class="ruby-identifier">klass</span>)
495
- <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">val</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">val</span> <span class="ruby-operator">!=</span> <span class="ruby-keyword kw">nil</span>
199
+ <div id="method-M000060" class="method-detail">
200
+ <a name="M000060"></a>
496
201
 
497
- <span class="ruby-identifier">val</span> = <span class="ruby-identifier">app</span>.<span class="ruby-identifier">get_property</span>(<span class="ruby-identifier">prop</span>, <span class="ruby-identifier">klass</span>)
498
- <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">val</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">val</span> <span class="ruby-operator">!=</span> <span class="ruby-keyword kw">nil</span>
202
+ <div class="method-heading">
499
203
 
500
- <span class="ruby-identifier">val</span> = <span class="ruby-identifier">sess</span>.<span class="ruby-identifier">get_property</span>(<span class="ruby-identifier">prop</span>, <span class="ruby-keyword kw">nil</span>)
501
- <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">val</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">val</span> <span class="ruby-operator">!=</span> <span class="ruby-keyword kw">nil</span>
204
+ <a href="#M000060" class="method-signature">
502
205
 
503
- <span class="ruby-identifier">val</span> = <span class="ruby-identifier">app</span>.<span class="ruby-identifier">get_property</span>(<span class="ruby-identifier">prop</span>, <span class="ruby-keyword kw">nil</span>)
504
- <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">val</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">val</span> <span class="ruby-operator">!=</span> <span class="ruby-keyword kw">nil</span>
206
+ <span class="method-name">render</span><span class="method-args">(r)</span>
505
207
 
506
- <span class="ruby-keyword kw">if</span> <span class="ruby-keyword kw">defined?</span>(<span class="ruby-ivar">@@properties</span>)
507
- <span class="ruby-identifier">val</span> = <span class="ruby-ivar">@@properties</span>[<span class="ruby-identifier">prop</span>]
508
- <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">val</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">val</span> <span class="ruby-operator">!=</span> <span class="ruby-keyword kw">nil</span>
509
- <span class="ruby-keyword kw">end</span>
208
+ </a>
510
209
 
511
- <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">nil</span>
512
- <span class="ruby-keyword kw">end</span>
513
- </pre>
514
- </div>
515
210
  </div>
516
- </div>
517
-
518
- <div id="method-M000368" class="method-detail">
519
- <a name="M000368"></a>
520
211
 
521
- <div class="method-heading">
522
- <a href="#M000368" class="method-signature">
523
- <span class="method-name">properties</span><span class="method-args">()</span>
524
- </a>
525
- </div>
526
-
527
212
  <div class="method-description">
528
- <p><a class="source-toggle" href="#"
529
- onclick="toggleCode('M000368-source');return false;">[Source]</a></p>
530
- <div class="method-source-code" id="M000368-source">
531
- <pre>
532
- <span class="ruby-comment cmt"># File lib/wee/core_ext.rb, line 57</span>
533
- <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">properties</span>() <span class="ruby-ivar">@__properties</span> <span class="ruby-keyword kw">end</span>
534
- </pre>
535
- </div>
536
- </div>
537
- </div>
538
213
 
539
- <div id="method-M000369" class="method-detail">
540
- <a name="M000369"></a>
541
-
542
- <div class="method-heading">
543
- <a href="#M000369" class="method-signature">
544
- <span class="method-name">properties=</span><span class="method-args">(props)</span>
545
- </a>
546
- </div>
547
-
548
- <div class="method-description">
549
214
  <p><a class="source-toggle" href="#"
550
- onclick="toggleCode('M000369-source');return false;">[Source]</a></p>
551
- <div class="method-source-code" id="M000369-source">
215
+ onclick="toggleCode('M000060-source');return false;">[Source]</a></p>
216
+ <div class="method-source-code" id="M000060-source">
552
217
  <pre>
553
- <span class="ruby-comment cmt"># File lib/wee/core_ext.rb, line 58</span>
554
- <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">properties=</span>(<span class="ruby-identifier">props</span>) <span class="ruby-ivar">@__properties</span> = <span class="ruby-identifier">props</span> <span class="ruby-keyword kw">end</span>
218
+ <span class="ruby-comment cmt"># File lib/wee/presenter.rb, line 16</span>
219
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">render</span>(<span class="ruby-identifier">r</span>); <span class="ruby-identifier">raise</span> <span class="ruby-keyword kw">end</span>
555
220
  </pre>
556
221
  </div>
222
+
557
223
  </div>
558
224
  </div>
559
225
 
560
226
 
561
- </div>
562
- <div id="section">
563
- <h2 class="section-title"><a name="SEC00105">Render</a></h2>
564
- <div class="section-comment">
565
-
566
- </div>
567
-
568
-
569
-
570
-
571
-
572
-
227
+ <div id="method-M000059" class="method-detail">
228
+ <a name="M000059"></a>
573
229
 
230
+ <div class="method-heading">
574
231
 
575
- <!-- if method_list -->
576
- <div id="methods">
577
- <h3 class="section-bar">Public Instance methods</h3>
232
+ <a href="#M000059" class="method-signature">
578
233
 
579
- <div id="method-M000375" class="method-detail">
580
- <a name="M000375"></a>
234
+ <span class="method-name">render_on</span><span class="method-args">(r)</span>
581
235
 
582
- <div class="method-heading">
583
- <a href="#M000375" class="method-signature">
584
- <span class="method-name">do_render</span><span class="method-args">(rendering_context)</span>
585
236
  </a>
586
- </div>
587
-
588
- <div class="method-description">
589
- <p>
590
- Render the presenter in the given rendering context. <b>DO NOT</b>
591
- overwrite this method, unless you know exactly what you&#8217;re doing!
592
- </p>
593
- <p>
594
- Creates a new renderer object of the class returned by method <a
595
- href="Presenter.html#M000364">renderer_class</a>, makes this the current
596
- renderer, then invokes method <a href="Presenter.html#M000374">render</a>.
597
- </p>
598
- <dl>
599
- <dt><tt>rendering_context</tt></dt><dd>An object of class <a href="RenderingContext.html">RenderingContext</a>
600
237
 
601
- </dd>
602
- </dl>
603
- <p><a class="source-toggle" href="#"
604
- onclick="toggleCode('M000375-source');return false;">[Source]</a></p>
605
- <div class="method-source-code" id="M000375-source">
606
- <pre>
607
- <span class="ruby-comment cmt"># File lib/wee/core/presenter.rb, line 33</span>
608
- <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">do_render</span>(<span class="ruby-identifier">rendering_context</span>)
609
- <span class="ruby-identifier">with_renderer_for</span>(<span class="ruby-identifier">rendering_context</span>) <span class="ruby-keyword kw">do</span> <span class="ruby-identifier">render</span>() <span class="ruby-keyword kw">end</span>
610
- <span class="ruby-keyword kw">end</span>
611
- </pre>
612
- </div>
613
238
  </div>
614
- </div>
615
239
 
616
- <div id="method-M000374" class="method-detail">
617
- <a name="M000374"></a>
618
-
619
- <div class="method-heading">
620
- <a href="#M000374" class="method-signature">
621
- <span class="method-name">render</span><span class="method-args">()</span>
622
- </a>
623
- </div>
624
-
625
240
  <div class="method-description">
626
- <p>
627
- This method renders the content of the presenter.
628
- </p>
629
- <p>
630
- <b>OVERWRITE</b> this method in your own presenter classes to implement the
631
- view. By default this method does nothing!
632
- </p>
633
- <p>
634
- Use the current renderer as returned by <a
635
- href="Presenter.html#M000376">renderer</a> or it&#8217;s short-cut <a
636
- href="Presenter.html#M000377">r</a>.
637
- </p>
638
- <p><a class="source-toggle" href="#"
639
- onclick="toggleCode('M000374-source');return false;">[Source]</a></p>
640
- <div class="method-source-code" id="M000374-source">
641
- <pre>
642
- <span class="ruby-comment cmt"># File lib/wee/core/presenter.rb, line 20</span>
643
- <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">render</span>
644
- <span class="ruby-keyword kw">end</span>
645
- </pre>
646
- </div>
647
- </div>
648
- </div>
649
241
 
650
- <h3 class="section-bar">Protected Instance methods</h3>
651
-
652
- <div id="method-M000377" class="method-detail">
653
- <a name="M000377"></a>
654
-
655
- <div class="method-heading">
656
- <a href="#M000377" class="method-signature">
657
- <span class="method-name">r</span><span class="method-args">()</span>
658
- </a>
659
- </div>
660
-
661
- <div class="method-description">
662
- <p>
663
- Short cut for <a href="Presenter.html#M000376">renderer</a>.
664
- </p>
665
242
  <p><a class="source-toggle" href="#"
666
- onclick="toggleCode('M000377-source');return false;">[Source]</a></p>
667
- <div class="method-source-code" id="M000377-source">
243
+ onclick="toggleCode('M000059-source');return false;">[Source]</a></p>
244
+ <div class="method-source-code" id="M000059-source">
668
245
  <pre>
669
- <span class="ruby-comment cmt"># File lib/wee/core/presenter.rb, line 43</span>
670
- <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">r</span>() <span class="ruby-ivar">@__renderer</span> <span class="ruby-keyword kw">end</span>
246
+ <span class="ruby-comment cmt"># File lib/wee/presenter.rb, line 12</span>
247
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">render_on</span>(<span class="ruby-identifier">r</span>)
248
+ <span class="ruby-identifier">r</span>.<span class="ruby-identifier">with</span>(<span class="ruby-keyword kw">self</span>) {<span class="ruby-operator">|</span><span class="ruby-identifier">new_r</span><span class="ruby-operator">|</span> <span class="ruby-identifier">render</span>(<span class="ruby-identifier">new_r</span>)}
249
+ <span class="ruby-keyword kw">end</span>
671
250
  </pre>
672
251
  </div>
252
+
673
253
  </div>
674
254
  </div>
675
255
 
676
- <div id="method-M000376" class="method-detail">
677
- <a name="M000376"></a>
256
+
257
+ <div id="method-M000063" class="method-detail">
258
+ <a name="M000063"></a>
678
259
 
679
260
  <div class="method-heading">
680
- <a href="#M000376" class="method-signature">
681
- <span class="method-name">renderer</span><span class="method-args">()</span>
682
- </a>
683
- </div>
684
-
685
- <div class="method-description">
686
- <p>
687
- Returns the current renderer object for use by the render methods.
688
- </p>
689
- <p><a class="source-toggle" href="#"
690
- onclick="toggleCode('M000376-source');return false;">[Source]</a></p>
691
- <div class="method-source-code" id="M000376-source">
692
- <pre>
693
- <span class="ruby-comment cmt"># File lib/wee/core/presenter.rb, line 40</span>
694
- <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">renderer</span>() <span class="ruby-ivar">@__renderer</span> <span class="ruby-keyword kw">end</span>
695
- </pre>
696
- </div>
697
- </div>
698
- </div>
699
261
 
700
- <div id="method-M000379" class="method-detail">
701
- <a name="M000379"></a>
262
+ <a href="#M000063" class="method-signature">
702
263
 
703
- <div class="method-heading">
704
- <a href="#M000379" class="method-signature">
705
264
  <span class="method-name">renderer_class</span><span class="method-args">()</span>
265
+
706
266
  </a>
267
+
707
268
  </div>
708
-
269
+
709
270
  <div class="method-description">
271
+
710
272
  <p>
711
- Returns the class used as renderer for this presenter. Overwrite this
712
- method if you want to use a different renderer.
273
+ Returns the class used as <a href="Renderer.html">Renderer</a> for this
274
+ presenter. Overwrite this method if you want to use a different <a
275
+ href="Renderer.html">Renderer</a> than the default one.
713
276
  </p>
714
277
  <p>
715
278
  Returned class must be a subclass of <a
716
279
  href="Renderer.html">Wee::Renderer</a>.
717
280
  </p>
718
- <p>
719
- NEEDS TO BE OVERWRITTEN by some non-core files.
720
- </p>
721
- <p><a class="source-toggle" href="#"
722
- onclick="toggleCode('M000379-source');return false;">[Source]</a></p>
723
- <div class="method-source-code" id="M000379-source">
724
- <pre>
725
- <span class="ruby-comment cmt"># File lib/wee/core/presenter.rb, line 66</span>
726
- <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">renderer_class</span>
727
- <span class="ruby-identifier">raise</span> <span class="ruby-value str">&quot;Method renderer_class needs to be implemented!&quot;</span>
728
- <span class="ruby-keyword kw">end</span>
729
- </pre>
730
- </div>
731
- </div>
732
- </div>
733
-
734
- <div id="method-M000378" class="method-detail">
735
- <a name="M000378"></a>
736
281
 
737
- <div class="method-heading">
738
- <a href="#M000378" class="method-signature">
739
- <span class="method-name">with_renderer_for</span><span class="method-args">(rendering_context) {|| ...}</span>
740
- </a>
741
- </div>
742
-
743
- <div class="method-description">
744
- <p>
745
- Creates a new renderer object of the class returned by method <a
746
- href="Presenter.html#M000364">renderer_class</a>, then makes this the
747
- current renderer for the time the block it yields to executes. Finally, it
748
- restores the current renderer to the former one and closes the newly
749
- created renderer.
750
- </p>
751
282
  <p><a class="source-toggle" href="#"
752
- onclick="toggleCode('M000378-source');return false;">[Source]</a></p>
753
- <div class="method-source-code" id="M000378-source">
283
+ onclick="toggleCode('M000063-source');return false;">[Source]</a></p>
284
+ <div class="method-source-code" id="M000063-source">
754
285
  <pre>
755
- <span class="ruby-comment cmt"># File lib/wee/core/presenter.rb, line 50</span>
756
- <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">with_renderer_for</span>(<span class="ruby-identifier">rendering_context</span>)
757
- <span class="ruby-identifier">old_renderer</span> = <span class="ruby-ivar">@__renderer</span>
758
- <span class="ruby-keyword kw">begin</span>
759
- <span class="ruby-identifier">renderer_class</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">rendering_context</span>, <span class="ruby-keyword kw">self</span>) {<span class="ruby-operator">|</span><span class="ruby-ivar">@__renderer</span><span class="ruby-operator">|</span> <span class="ruby-keyword kw">yield</span> }
760
- <span class="ruby-keyword kw">ensure</span>
761
- <span class="ruby-ivar">@__renderer</span> = <span class="ruby-identifier">old_renderer</span>
286
+ <span class="ruby-comment cmt"># File lib/wee/presenter.rb, line 26</span>
287
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">renderer_class</span>
288
+ <span class="ruby-constant">Wee</span><span class="ruby-operator">::</span><span class="ruby-constant">DefaultRenderer</span>
762
289
  <span class="ruby-keyword kw">end</span>
763
- <span class="ruby-keyword kw">end</span>
764
290
  </pre>
765
291
  </div>
292
+
766
293
  </div>
767
294
  </div>
768
295
 
769
296
 
770
- </div>
771
- <div id="section">
772
- <h2 class="section-title"><a name="SEC00106">Callback</a></h2>
773
- <div class="section-comment">
774
-
775
- </div>
776
-
777
-
778
-
297
+ <h3 class="section-bar">Protected Instance methods</h3>
779
298
 
780
299
 
781
-
300
+ <div id="method-M000064" class="method-detail">
301
+ <a name="M000064"></a>
782
302
 
303
+ <div class="method-heading">
783
304
 
784
- <!-- if method_list -->
785
- <div id="methods">
786
- <h3 class="section-bar">Public Instance methods</h3>
305
+ <a href="#M000064" class="method-signature">
787
306
 
788
- <div id="method-M000380" class="method-detail">
789
- <a name="M000380"></a>
307
+ <span class="method-name">session</span><span class="method-args">()</span>
790
308
 
791
- <div class="method-heading">
792
- <a href="#M000380" class="method-signature">
793
- <span class="method-name">process_callbacks</span><span class="method-args">(&amp;block)</span>
794
309
  </a>
795
- </div>
796
-
797
- <div class="method-description">
798
- <p>
799
- Process all callbacks specified for this presenter.
800
- </p>
801
- <dl>
802
- <dt><tt>block</tt></dt><dd>Specifies the action to be taken (e.g. whether to invoke input or action
803
- callbacks).
804
310
 
805
- </dd>
806
- </dl>
807
- <p><a class="source-toggle" href="#"
808
- onclick="toggleCode('M000380-source');return false;">[Source]</a></p>
809
- <div class="method-source-code" id="M000380-source">
810
- <pre>
811
- <span class="ruby-comment cmt"># File lib/wee/core/presenter.rb, line 82</span>
812
- <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">process_callbacks</span>(<span class="ruby-operator">&amp;</span><span class="ruby-identifier">block</span>)
813
- <span class="ruby-identifier">block</span>.<span class="ruby-identifier">call</span>(<span class="ruby-keyword kw">self</span>)
814
- <span class="ruby-keyword kw">end</span>
815
- </pre>
816
- </div>
817
311
  </div>
818
- </div>
819
-
820
-
821
- </div>
822
- <div id="section">
823
- <h2 class="section-title"><a name="SEC00107">Backtrack</a></h2>
824
- <div class="section-comment">
825
-
826
- </div>
827
-
828
-
829
-
830
-
831
312
 
832
-
833
-
834
-
835
- <!-- if method_list -->
836
- <div id="methods">
837
- <h3 class="section-bar">Public Instance methods</h3>
838
-
839
- <div id="method-M000381" class="method-detail">
840
- <a name="M000381"></a>
841
-
842
- <div class="method-heading">
843
- <a href="#M000381" class="method-signature">
844
- <span class="method-name">backtrack_state</span><span class="method-args">(snapshot)</span>
845
- </a>
846
- </div>
847
-
848
313
  <div class="method-description">
314
+
849
315
  <p>
850
- Dummy implementation. See <a
851
- href="Component.html#M000339">Component#backtrack_state</a> for more
852
- information.
316
+ Returns the current session. A presenter (or component) has always an
317
+ associated session. The returned object is of class <a
318
+ href="Session.html">Wee::Session</a> or a subclass thereof.
853
319
  </p>
854
- <dl>
855
- <dt><tt>snapshot</tt></dt><dd>An object of class <a href="Snapshot.html">Snapshot</a>
856
320
 
857
- </dd>
858
- </dl>
859
321
  <p><a class="source-toggle" href="#"
860
- onclick="toggleCode('M000381-source');return false;">[Source]</a></p>
861
- <div class="method-source-code" id="M000381-source">
322
+ onclick="toggleCode('M000064-source');return false;">[Source]</a></p>
323
+ <div class="method-source-code" id="M000064-source">
862
324
  <pre>
863
- <span class="ruby-comment cmt"># File lib/wee/core/presenter.rb, line 97</span>
864
- <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">backtrack_state</span>(<span class="ruby-identifier">snapshot</span>)
865
- <span class="ruby-keyword kw">end</span>
325
+ <span class="ruby-comment cmt"># File lib/wee/presenter.rb, line 37</span>
326
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">session</span>
327
+ <span class="ruby-constant">Wee</span><span class="ruby-operator">::</span><span class="ruby-constant">Session</span>.<span class="ruby-identifier">current</span>
328
+ <span class="ruby-keyword kw">end</span>
866
329
  </pre>
867
330
  </div>
868
- </div>
869
- </div>
870
-
871
- <div id="method-M000383" class="method-detail">
872
- <a name="M000383"></a>
873
331
 
874
- <div class="method-heading">
875
- <a href="#M000383" class="method-signature">
876
- <span class="method-name">renderer_class</span><span class="method-args">()</span>
877
- </a>
878
- </div>
879
-
880
- <div class="method-description">
881
- <p><a class="source-toggle" href="#"
882
- onclick="toggleCode('M000383-source');return false;">[Source]</a></p>
883
- <div class="method-source-code" id="M000383-source">
884
- <pre>
885
- <span class="ruby-comment cmt"># File lib/wee/adaptors/nitro.rb, line 20</span>
886
- <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">renderer_class</span>
887
- <span class="ruby-constant">Wee</span><span class="ruby-operator">::</span><span class="ruby-constant">Nitro</span><span class="ruby-operator">::</span><span class="ruby-constant">HtmlCanvasRenderer</span>
888
- <span class="ruby-keyword kw">end</span>
889
- </pre>
890
- </div>
891
332
  </div>
892
333
  </div>
893
334
 
894
- <div id="method-M000382" class="method-detail">
895
- <a name="M000382"></a>
896
-
897
- <div class="method-heading">
898
- <a href="#M000382" class="method-signature">
899
- <span class="method-name">renderer_class</span><span class="method-args">()</span>
900
- </a>
901
- </div>
902
-
903
- <div class="method-description">
904
- <p><a class="source-toggle" href="#"
905
- onclick="toggleCode('M000382-source');return false;">[Source]</a></p>
906
- <div class="method-source-code" id="M000382-source">
907
- <pre>
908
- <span class="ruby-comment cmt"># File lib/wee/adaptors/rails.rb, line 20</span>
909
- <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">renderer_class</span>
910
- <span class="ruby-constant">Wee</span><span class="ruby-operator">::</span><span class="ruby-constant">Rails</span><span class="ruby-operator">::</span><span class="ruby-constant">HtmlCanvasRenderer</span>
911
- <span class="ruby-keyword kw">end</span>
912
- </pre>
913
- </div>
914
- </div>
915
- </div>
916
335
 
917
336
 
918
337
  </div>
919
338
 
920
339
 
921
- </div>
922
340
 
923
341
 
342
+ </div>
343
+
924
344
  <div id="validator-badges">
925
345
  <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
926
346
  </div>
927
347
 
928
348
  </body>
929
- </html>
349
+ </html>