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,359 +0,0 @@
1
- <?xml version="1.0" encoding="iso-8859-1"?>
2
- <!DOCTYPE html
3
- PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
4
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
5
-
6
- <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
7
- <head>
8
- <title>Class: Wee::PagelessSession</title>
9
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
10
- <meta http-equiv="Content-Script-Type" content="text/javascript" />
11
- <link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
12
- <script type="text/javascript">
13
- // <![CDATA[
14
-
15
- function popupCode( url ) {
16
- window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
17
- }
18
-
19
- function toggleCode( id ) {
20
- if ( document.getElementById )
21
- elem = document.getElementById( id );
22
- else if ( document.all )
23
- elem = eval( "document.all." + id );
24
- else
25
- return false;
26
-
27
- elemStyle = elem.style;
28
-
29
- if ( elemStyle.display != "block" ) {
30
- elemStyle.display = "block"
31
- } else {
32
- elemStyle.display = "none"
33
- }
34
-
35
- return true;
36
- }
37
-
38
- // Make codeblocks hidden by default
39
- document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
40
-
41
- // ]]>
42
- </script>
43
-
44
- </head>
45
- <body>
46
-
47
-
48
-
49
- <div id="classHeader">
50
- <table class="header-table">
51
- <tr class="top-aligned-row">
52
- <td><strong>Class</strong></td>
53
- <td class="class-name-in-header">Wee::PagelessSession</td>
54
- </tr>
55
- <tr class="top-aligned-row">
56
- <td><strong>In:</strong></td>
57
- <td>
58
- <a href="../../files/lib/wee/pageless/session_rb.html">
59
- lib/wee/pageless/session.rb
60
- </a>
61
- <br />
62
- </td>
63
- </tr>
64
-
65
- <tr class="top-aligned-row">
66
- <td><strong>Parent:</strong></td>
67
- <td>
68
- <a href="Session.html">
69
- Wee::Session
70
- </a>
71
- </td>
72
- </tr>
73
- </table>
74
- </div>
75
- <!-- banner header -->
76
-
77
- <div id="bodyContent">
78
-
79
-
80
-
81
- <div id="contextContent">
82
-
83
- <div id="description">
84
- <p>
85
- A session class, which does not have a page-store and as such cannot
86
- backtrack.
87
- </p>
88
-
89
- </div>
90
-
91
-
92
- </div>
93
-
94
- <div id="method-list">
95
- <h3 class="section-bar">Methods</h3>
96
-
97
- <div class="name-list">
98
- <a href="#M000159">handle_callback_phase</a>&nbsp;&nbsp;
99
- <a href="#M000157">handle_existing_page</a>&nbsp;&nbsp;
100
- <a href="#M000160">handle_new_page_view</a>&nbsp;&nbsp;
101
- <a href="#M000158">handle_render_phase</a>&nbsp;&nbsp;
102
- <a href="#M000156">process_request</a>&nbsp;&nbsp;
103
- <a href="#M000161">set_response</a>&nbsp;&nbsp;
104
- <a href="#M000155">setup</a>&nbsp;&nbsp;
105
- </div>
106
- </div>
107
-
108
- </div>
109
-
110
-
111
- <!-- if includes -->
112
-
113
- <div id="section">
114
-
115
-
116
-
117
- <div id="aliases-list">
118
- <h3 class="section-bar">External Aliases</h3>
119
-
120
- <div class="name-list">
121
- <table summary="aliases">
122
- <tr class="top-aligned-row context-row">
123
- <td class="context-item-name">callbacks</td>
124
- <td>-></td>
125
- <td class="context-item-value">current_callbacks</td>
126
- </tr>
127
- </table>
128
- </div>
129
- </div>
130
-
131
-
132
- <div id="attribute-list">
133
- <h3 class="section-bar">Attributes</h3>
134
-
135
- <div class="name-list">
136
- <table>
137
- <tr class="top-aligned-row context-row">
138
- <td class="context-item-name">callbacks</td>
139
- <td class="context-item-value">&nbsp;[RW]&nbsp;</td>
140
- <td class="context-item-desc"></td>
141
- </tr>
142
- </table>
143
- </div>
144
- </div>
145
-
146
-
147
-
148
- <!-- if method_list -->
149
- <div id="methods">
150
- <h3 class="section-bar">Public Instance methods</h3>
151
-
152
- <div id="method-M000159" class="method-detail">
153
- <a name="M000159"></a>
154
-
155
- <div class="method-heading">
156
- <a href="#M000159" class="method-signature">
157
- <span class="method-name">handle_callback_phase</span><span class="method-args">()</span>
158
- </a>
159
- </div>
160
-
161
- <div class="method-description">
162
- <p><a class="source-toggle" href="#"
163
- onclick="toggleCode('M000159-source');return false;">[Source]</a></p>
164
- <div class="method-source-code" id="M000159-source">
165
- <pre>
166
- <span class="ruby-comment cmt"># File lib/wee/pageless/session.rb, line 42</span>
167
- <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">handle_callback_phase</span>
168
- <span class="ruby-comment cmt"># Actions/inputs were specified.</span>
169
- <span class="ruby-comment cmt">#</span>
170
- <span class="ruby-comment cmt"># We process the request and invoke actions/inputs. Then we generate a</span>
171
- <span class="ruby-comment cmt"># new page view. </span>
172
-
173
- <span class="ruby-identifier">callback_stream</span> = <span class="ruby-constant">Wee</span><span class="ruby-operator">::</span><span class="ruby-constant">CallbackStream</span>.<span class="ruby-identifier">new</span>(<span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">callbacks</span>, <span class="ruby-ivar">@context</span>.<span class="ruby-identifier">request</span>.<span class="ruby-identifier">fields</span>)
174
- <span class="ruby-identifier">send_response</span> = <span class="ruby-ivar">@component_runner</span>.<span class="ruby-identifier">process_callbacks</span>(<span class="ruby-identifier">callback_stream</span>)
175
-
176
- <span class="ruby-identifier">post_callbacks_hook</span>()
177
-
178
- <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">send_response</span>
179
- <span class="ruby-identifier">set_response</span>(<span class="ruby-ivar">@context</span>, <span class="ruby-identifier">send_response</span>) <span class="ruby-comment cmt"># @context.response = send_response</span>
180
- <span class="ruby-keyword kw">else</span>
181
- <span class="ruby-identifier">handle_new_page_view</span>(<span class="ruby-ivar">@context</span>)
182
- <span class="ruby-keyword kw">end</span>
183
- <span class="ruby-keyword kw">end</span>
184
- </pre>
185
- </div>
186
- </div>
187
- </div>
188
-
189
- <div id="method-M000157" class="method-detail">
190
- <a name="M000157"></a>
191
-
192
- <div class="method-heading">
193
- <a href="#M000157" class="method-signature">
194
- <span class="method-name">handle_existing_page</span><span class="method-args">()</span>
195
- </a>
196
- </div>
197
-
198
- <div class="method-description">
199
- <p><a class="source-toggle" href="#"
200
- onclick="toggleCode('M000157-source');return false;">[Source]</a></p>
201
- <div class="method-source-code" id="M000157-source">
202
- <pre>
203
- <span class="ruby-comment cmt"># File lib/wee/pageless/session.rb, line 26</span>
204
- <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">handle_existing_page</span>
205
- <span class="ruby-identifier">p</span> <span class="ruby-ivar">@context</span>.<span class="ruby-identifier">request</span>.<span class="ruby-identifier">fields</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">$DEBUG</span>
206
-
207
- <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@context</span>.<span class="ruby-identifier">request</span>.<span class="ruby-identifier">render?</span>
208
- <span class="ruby-identifier">handle_render_phase</span>
209
- <span class="ruby-keyword kw">else</span>
210
- <span class="ruby-identifier">handle_callback_phase</span>
211
- <span class="ruby-keyword kw">end</span>
212
- <span class="ruby-keyword kw">end</span>
213
- </pre>
214
- </div>
215
- </div>
216
- </div>
217
-
218
- <div id="method-M000158" class="method-detail">
219
- <a name="M000158"></a>
220
-
221
- <div class="method-heading">
222
- <a href="#M000158" class="method-signature">
223
- <span class="method-name">handle_render_phase</span><span class="method-args">()</span>
224
- </a>
225
- </div>
226
-
227
- <div class="method-description">
228
- <p><a class="source-toggle" href="#"
229
- onclick="toggleCode('M000158-source');return false;">[Source]</a></p>
230
- <div class="method-source-code" id="M000158-source">
231
- <pre>
232
- <span class="ruby-comment cmt"># File lib/wee/pageless/session.rb, line 36</span>
233
- <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">handle_render_phase</span>
234
- <span class="ruby-identifier">new_callbacks</span> = <span class="ruby-constant">Wee</span><span class="ruby-operator">::</span><span class="ruby-constant">CallbackRegistry</span>.<span class="ruby-identifier">new</span>(<span class="ruby-constant">Wee</span><span class="ruby-operator">::</span><span class="ruby-constant">SimpleIdGenerator</span>.<span class="ruby-identifier">new</span>)
235
- <span class="ruby-identifier">respond</span>(<span class="ruby-ivar">@context</span>, <span class="ruby-identifier">new_callbacks</span>) <span class="ruby-comment cmt"># render</span>
236
- <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">callbacks</span> = <span class="ruby-identifier">new_callbacks</span>
237
- <span class="ruby-keyword kw">end</span>
238
- </pre>
239
- </div>
240
- </div>
241
- </div>
242
-
243
- <div id="method-M000156" class="method-detail">
244
- <a name="M000156"></a>
245
-
246
- <div class="method-heading">
247
- <a href="#M000156" class="method-signature">
248
- <span class="method-name">process_request</span><span class="method-args">()</span>
249
- </a>
250
- </div>
251
-
252
- <div class="method-description">
253
- <p>
254
- The main routine where the request is processed.
255
- </p>
256
- <p><a class="source-toggle" href="#"
257
- onclick="toggleCode('M000156-source');return false;">[Source]</a></p>
258
- <div class="method-source-code" id="M000156-source">
259
- <pre>
260
- <span class="ruby-comment cmt"># File lib/wee/pageless/session.rb, line 22</span>
261
- <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">process_request</span>
262
- <span class="ruby-identifier">handle_existing_page</span>
263
- <span class="ruby-keyword kw">end</span>
264
- </pre>
265
- </div>
266
- </div>
267
- </div>
268
-
269
- <div id="method-M000155" class="method-detail">
270
- <a name="M000155"></a>
271
-
272
- <div class="method-heading">
273
- <a href="#M000155" class="method-signature">
274
- <span class="method-name">setup</span><span class="method-args">(&amp;block)</span>
275
- </a>
276
- </div>
277
-
278
- <div class="method-description">
279
- <p><a class="source-toggle" href="#"
280
- onclick="toggleCode('M000155-source');return false;">[Source]</a></p>
281
- <div class="method-source-code" id="M000155-source">
282
- <pre>
283
- <span class="ruby-comment cmt"># File lib/wee/pageless/session.rb, line 13</span>
284
- <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">setup</span>(<span class="ruby-operator">&amp;</span><span class="ruby-identifier">block</span>)
285
- <span class="ruby-identifier">with_session</span> <span class="ruby-keyword kw">do</span>
286
- <span class="ruby-identifier">block</span>.<span class="ruby-identifier">call</span>(<span class="ruby-keyword kw">self</span>) <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">block</span>
287
- <span class="ruby-identifier">raise</span> <span class="ruby-constant">ArgumentError</span>, <span class="ruby-value str">&quot;No component runner specified&quot;</span> <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@component_runner</span>.<span class="ruby-identifier">nil?</span>
288
- <span class="ruby-keyword kw">end</span>
289
- <span class="ruby-keyword kw">end</span>
290
- </pre>
291
- </div>
292
- </div>
293
- </div>
294
-
295
- <h3 class="section-bar">Private Instance methods</h3>
296
-
297
- <div id="method-M000160" class="method-detail">
298
- <a name="M000160"></a>
299
-
300
- <div class="method-heading">
301
- <a href="#M000160" class="method-signature">
302
- <span class="method-name">handle_new_page_view</span><span class="method-args">(context)</span>
303
- </a>
304
- </div>
305
-
306
- <div class="method-description">
307
- <p><a class="source-toggle" href="#"
308
- onclick="toggleCode('M000160-source');return false;">[Source]</a></p>
309
- <div class="method-source-code" id="M000160-source">
310
- <pre>
311
- <span class="ruby-comment cmt"># File lib/wee/pageless/session.rb, line 62</span>
312
- <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">handle_new_page_view</span>(<span class="ruby-identifier">context</span>)
313
- <span class="ruby-identifier">redirect_url</span> = <span class="ruby-identifier">context</span>.<span class="ruby-identifier">request</span>.<span class="ruby-identifier">build_url</span>
314
- <span class="ruby-identifier">set_response</span>(<span class="ruby-identifier">context</span>, <span class="ruby-constant">Wee</span><span class="ruby-operator">::</span><span class="ruby-constant">RedirectResponse</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">redirect_url</span>))
315
- <span class="ruby-keyword kw">end</span>
316
- </pre>
317
- </div>
318
- </div>
319
- </div>
320
-
321
- <div id="method-M000161" class="method-detail">
322
- <a name="M000161"></a>
323
-
324
- <div class="method-heading">
325
- <a href="#M000161" class="method-signature">
326
- <span class="method-name">set_response</span><span class="method-args">(context, response)</span>
327
- </a>
328
- </div>
329
-
330
- <div class="method-description">
331
- <p><a class="source-toggle" href="#"
332
- onclick="toggleCode('M000161-source');return false;">[Source]</a></p>
333
- <div class="method-source-code" id="M000161-source">
334
- <pre>
335
- <span class="ruby-comment cmt"># File lib/wee/pageless/session.rb, line 67</span>
336
- <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">set_response</span>(<span class="ruby-identifier">context</span>, <span class="ruby-identifier">response</span>)
337
- <span class="ruby-identifier">response</span>.<span class="ruby-identifier">cookies</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-constant">CGI</span><span class="ruby-operator">::</span><span class="ruby-constant">Cookie</span>.<span class="ruby-identifier">new</span>(<span class="ruby-value str">'SID'</span>, <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">id</span>)
338
- <span class="ruby-identifier">response</span>.<span class="ruby-identifier">header</span>.<span class="ruby-identifier">delete</span>(<span class="ruby-value str">'Expire'</span>)
339
- <span class="ruby-identifier">response</span>.<span class="ruby-identifier">header</span>[<span class="ruby-value str">'Pragma'</span>] = <span class="ruby-value str">'No-Cache'</span>
340
- <span class="ruby-keyword kw">super</span>
341
- <span class="ruby-keyword kw">end</span>
342
- </pre>
343
- </div>
344
- </div>
345
- </div>
346
-
347
-
348
- </div>
349
-
350
-
351
- </div>
352
-
353
-
354
- <div id="validator-badges">
355
- <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
356
- </div>
357
-
358
- </body>
359
- </html>
@@ -1,534 +0,0 @@
1
- <?xml version="1.0" encoding="iso-8859-1"?>
2
- <!DOCTYPE html
3
- PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
4
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
5
-
6
- <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
7
- <head>
8
- <title>Class: Wee::Pager</title>
9
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
10
- <meta http-equiv="Content-Script-Type" content="text/javascript" />
11
- <link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
12
- <script type="text/javascript">
13
- // <![CDATA[
14
-
15
- function popupCode( url ) {
16
- window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
17
- }
18
-
19
- function toggleCode( id ) {
20
- if ( document.getElementById )
21
- elem = document.getElementById( id );
22
- else if ( document.all )
23
- elem = eval( "document.all." + id );
24
- else
25
- return false;
26
-
27
- elemStyle = elem.style;
28
-
29
- if ( elemStyle.display != "block" ) {
30
- elemStyle.display = "block"
31
- } else {
32
- elemStyle.display = "none"
33
- }
34
-
35
- return true;
36
- }
37
-
38
- // Make codeblocks hidden by default
39
- document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
40
-
41
- // ]]>
42
- </script>
43
-
44
- </head>
45
- <body>
46
-
47
-
48
-
49
- <div id="classHeader">
50
- <table class="header-table">
51
- <tr class="top-aligned-row">
52
- <td><strong>Class</strong></td>
53
- <td class="class-name-in-header">Wee::Pager</td>
54
- </tr>
55
- <tr class="top-aligned-row">
56
- <td><strong>In:</strong></td>
57
- <td>
58
- <a href="../../files/lib/wee/components/pager_rb.html">
59
- lib/wee/components/pager.rb
60
- </a>
61
- <br />
62
- </td>
63
- </tr>
64
-
65
- <tr class="top-aligned-row">
66
- <td><strong>Parent:</strong></td>
67
- <td>
68
- <a href="Component.html">
69
- Wee::Component
70
- </a>
71
- </td>
72
- </tr>
73
- </table>
74
- </div>
75
- <!-- banner header -->
76
-
77
- <div id="bodyContent">
78
-
79
-
80
-
81
- <div id="contextContent">
82
-
83
-
84
-
85
- </div>
86
-
87
- <div id="method-list">
88
- <h3 class="section-bar">Methods</h3>
89
-
90
- <div class="name-list">
91
- <a href="#M000172">current_start_index</a>&nbsp;&nbsp;
92
- <a href="#M000174">first</a>&nbsp;&nbsp;
93
- <a href="#M000178">goto</a>&nbsp;&nbsp;
94
- <a href="#M000175">last</a>&nbsp;&nbsp;
95
- <a href="#M000173">last_page_index</a>&nbsp;&nbsp;
96
- <a href="#M000170">new</a>&nbsp;&nbsp;
97
- <a href="#M000177">next</a>&nbsp;&nbsp;
98
- <a href="#M000171">num_pages</a>&nbsp;&nbsp;
99
- <a href="#M000176">prev</a>&nbsp;&nbsp;
100
- <a href="#M000179">render</a>&nbsp;&nbsp;
101
- <a href="#M000180">render_arrow</a>&nbsp;&nbsp;
102
- <a href="#M000181">render_index</a>&nbsp;&nbsp;
103
- <a href="#M000182">render_page_num</a>&nbsp;&nbsp;
104
- <a href="#M000183">validate</a>&nbsp;&nbsp;
105
- </div>
106
- </div>
107
-
108
- </div>
109
-
110
-
111
- <!-- if includes -->
112
-
113
- <div id="section">
114
-
115
-
116
-
117
-
118
-
119
- <div id="attribute-list">
120
- <h3 class="section-bar">Attributes</h3>
121
-
122
- <div class="name-list">
123
- <table>
124
- <tr class="top-aligned-row context-row">
125
- <td class="context-item-name">current_page</td>
126
- <td class="context-item-value">&nbsp;[R]&nbsp;</td>
127
- <td class="context-item-desc"></td>
128
- </tr>
129
- <tr class="top-aligned-row context-row">
130
- <td class="context-item-name">entries_per_page</td>
131
- <td class="context-item-value">&nbsp;[RW]&nbsp;</td>
132
- <td class="context-item-desc"></td>
133
- </tr>
134
- <tr class="top-aligned-row context-row">
135
- <td class="context-item-name">num_entries</td>
136
- <td class="context-item-value">&nbsp;[RW]&nbsp;</td>
137
- <td class="context-item-desc"></td>
138
- </tr>
139
- </table>
140
- </div>
141
- </div>
142
-
143
-
144
-
145
- <!-- if method_list -->
146
- <div id="methods">
147
- <h3 class="section-bar">Public Class methods</h3>
148
-
149
- <div id="method-M000170" class="method-detail">
150
- <a name="M000170"></a>
151
-
152
- <div class="method-heading">
153
- <a href="#M000170" class="method-signature">
154
- <span class="method-name">new</span><span class="method-args">(num_entries=0) {|self if block_given?| ...}</span>
155
- </a>
156
- </div>
157
-
158
- <div class="method-description">
159
- <p><a class="source-toggle" href="#"
160
- onclick="toggleCode('M000170-source');return false;">[Source]</a></p>
161
- <div class="method-source-code" id="M000170-source">
162
- <pre>
163
- <span class="ruby-comment cmt"># File lib/wee/components/pager.rb, line 5</span>
164
- <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">num_entries</span>=<span class="ruby-value">0</span>)
165
- <span class="ruby-keyword kw">super</span>()
166
- <span class="ruby-ivar">@num_entries</span> = <span class="ruby-identifier">num_entries</span>
167
- <span class="ruby-ivar">@current_page</span> = <span class="ruby-value">0</span>
168
- <span class="ruby-ivar">@entries_per_page</span> = <span class="ruby-value">20</span>
169
- <span class="ruby-keyword kw">yield</span> <span class="ruby-keyword kw">self</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">block_given?</span>
170
- <span class="ruby-keyword kw">end</span>
171
- </pre>
172
- </div>
173
- </div>
174
- </div>
175
-
176
- <h3 class="section-bar">Public Instance methods</h3>
177
-
178
- <div id="method-M000172" class="method-detail">
179
- <a name="M000172"></a>
180
-
181
- <div class="method-heading">
182
- <a href="#M000172" class="method-signature">
183
- <span class="method-name">current_start_index</span><span class="method-args">()</span>
184
- </a>
185
- </div>
186
-
187
- <div class="method-description">
188
- <p>
189
- Returns the index of the first entry on the current page
190
- </p>
191
- <p><a class="source-toggle" href="#"
192
- onclick="toggleCode('M000172-source');return false;">[Source]</a></p>
193
- <div class="method-source-code" id="M000172-source">
194
- <pre>
195
- <span class="ruby-comment cmt"># File lib/wee/components/pager.rb, line 22</span>
196
- <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">current_start_index</span>
197
- <span class="ruby-ivar">@current_page</span> <span class="ruby-operator">*</span> <span class="ruby-ivar">@entries_per_page</span>
198
- <span class="ruby-keyword kw">end</span>
199
- </pre>
200
- </div>
201
- </div>
202
- </div>
203
-
204
- <div id="method-M000174" class="method-detail">
205
- <a name="M000174"></a>
206
-
207
- <div class="method-heading">
208
- <a href="#M000174" class="method-signature">
209
- <span class="method-name">first</span><span class="method-args">()</span>
210
- </a>
211
- </div>
212
-
213
- <div class="method-description">
214
- <p>
215
- Go to first page
216
- </p>
217
- <p><a class="source-toggle" href="#"
218
- onclick="toggleCode('M000174-source');return false;">[Source]</a></p>
219
- <div class="method-source-code" id="M000174-source">
220
- <pre>
221
- <span class="ruby-comment cmt"># File lib/wee/components/pager.rb, line 34</span>
222
- <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">first</span>
223
- <span class="ruby-identifier">goto</span>(<span class="ruby-value">0</span>)
224
- <span class="ruby-keyword kw">end</span>
225
- </pre>
226
- </div>
227
- </div>
228
- </div>
229
-
230
- <div id="method-M000178" class="method-detail">
231
- <a name="M000178"></a>
232
-
233
- <div class="method-heading">
234
- <a href="#M000178" class="method-signature">
235
- <span class="method-name">goto</span><span class="method-args">(page)</span>
236
- </a>
237
- </div>
238
-
239
- <div class="method-description">
240
- <p>
241
- Go to page with index <tt>page</tt> Note that page-indices start with zero!
242
- </p>
243
- <p><a class="source-toggle" href="#"
244
- onclick="toggleCode('M000178-source');return false;">[Source]</a></p>
245
- <div class="method-source-code" id="M000178-source">
246
- <pre>
247
- <span class="ruby-comment cmt"># File lib/wee/components/pager.rb, line 59</span>
248
- <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">goto</span>(<span class="ruby-identifier">page</span>)
249
- <span class="ruby-ivar">@current_page</span> = <span class="ruby-identifier">page</span>
250
- <span class="ruby-identifier">validate</span>
251
- <span class="ruby-keyword kw">end</span>
252
- </pre>
253
- </div>
254
- </div>
255
- </div>
256
-
257
- <div id="method-M000175" class="method-detail">
258
- <a name="M000175"></a>
259
-
260
- <div class="method-heading">
261
- <a href="#M000175" class="method-signature">
262
- <span class="method-name">last</span><span class="method-args">()</span>
263
- </a>
264
- </div>
265
-
266
- <div class="method-description">
267
- <p>
268
- Go to last page
269
- </p>
270
- <p><a class="source-toggle" href="#"
271
- onclick="toggleCode('M000175-source');return false;">[Source]</a></p>
272
- <div class="method-source-code" id="M000175-source">
273
- <pre>
274
- <span class="ruby-comment cmt"># File lib/wee/components/pager.rb, line 40</span>
275
- <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">last</span>
276
- <span class="ruby-identifier">goto</span>(<span class="ruby-identifier">last_page_index</span>())
277
- <span class="ruby-keyword kw">end</span>
278
- </pre>
279
- </div>
280
- </div>
281
- </div>
282
-
283
- <div id="method-M000173" class="method-detail">
284
- <a name="M000173"></a>
285
-
286
- <div class="method-heading">
287
- <a href="#M000173" class="method-signature">
288
- <span class="method-name">last_page_index</span><span class="method-args">()</span>
289
- </a>
290
- </div>
291
-
292
- <div class="method-description">
293
- <p>
294
- Returns the index of the last page
295
- </p>
296
- <p><a class="source-toggle" href="#"
297
- onclick="toggleCode('M000173-source');return false;">[Source]</a></p>
298
- <div class="method-source-code" id="M000173-source">
299
- <pre>
300
- <span class="ruby-comment cmt"># File lib/wee/components/pager.rb, line 28</span>
301
- <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">last_page_index</span>
302
- <span class="ruby-identifier">num_pages</span>() <span class="ruby-operator">-</span> <span class="ruby-value">1</span>
303
- <span class="ruby-keyword kw">end</span>
304
- </pre>
305
- </div>
306
- </div>
307
- </div>
308
-
309
- <div id="method-M000177" class="method-detail">
310
- <a name="M000177"></a>
311
-
312
- <div class="method-heading">
313
- <a href="#M000177" class="method-signature">
314
- <span class="method-name">next</span><span class="method-args">()</span>
315
- </a>
316
- </div>
317
-
318
- <div class="method-description">
319
- <p>
320
- Go to next page
321
- </p>
322
- <p><a class="source-toggle" href="#"
323
- onclick="toggleCode('M000177-source');return false;">[Source]</a></p>
324
- <div class="method-source-code" id="M000177-source">
325
- <pre>
326
- <span class="ruby-comment cmt"># File lib/wee/components/pager.rb, line 52</span>
327
- <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">next</span>
328
- <span class="ruby-identifier">goto</span>(<span class="ruby-ivar">@current_page</span> <span class="ruby-operator">+</span> <span class="ruby-value">1</span>)
329
- <span class="ruby-keyword kw">end</span>
330
- </pre>
331
- </div>
332
- </div>
333
- </div>
334
-
335
- <div id="method-M000171" class="method-detail">
336
- <a name="M000171"></a>
337
-
338
- <div class="method-heading">
339
- <a href="#M000171" class="method-signature">
340
- <span class="method-name">num_pages</span><span class="method-args">()</span>
341
- </a>
342
- </div>
343
-
344
- <div class="method-description">
345
- <p>
346
- Returns the number of pages
347
- </p>
348
- <p><a class="source-toggle" href="#"
349
- onclick="toggleCode('M000171-source');return false;">[Source]</a></p>
350
- <div class="method-source-code" id="M000171-source">
351
- <pre>
352
- <span class="ruby-comment cmt"># File lib/wee/components/pager.rb, line 15</span>
353
- <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">num_pages</span>
354
- <span class="ruby-identifier">n</span>, <span class="ruby-identifier">rest</span> = <span class="ruby-ivar">@num_entries</span>.<span class="ruby-identifier">divmod</span>(<span class="ruby-ivar">@entries_per_page</span>)
355
- <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">rest</span> <span class="ruby-operator">&gt;</span> <span class="ruby-value">0</span> <span class="ruby-keyword kw">then</span> <span class="ruby-identifier">n</span> <span class="ruby-operator">+</span> <span class="ruby-value">1</span> <span class="ruby-keyword kw">else</span> <span class="ruby-identifier">n</span> <span class="ruby-keyword kw">end</span>
356
- <span class="ruby-keyword kw">end</span>
357
- </pre>
358
- </div>
359
- </div>
360
- </div>
361
-
362
- <div id="method-M000176" class="method-detail">
363
- <a name="M000176"></a>
364
-
365
- <div class="method-heading">
366
- <a href="#M000176" class="method-signature">
367
- <span class="method-name">prev</span><span class="method-args">()</span>
368
- </a>
369
- </div>
370
-
371
- <div class="method-description">
372
- <p>
373
- Go to previous page
374
- </p>
375
- <p><a class="source-toggle" href="#"
376
- onclick="toggleCode('M000176-source');return false;">[Source]</a></p>
377
- <div class="method-source-code" id="M000176-source">
378
- <pre>
379
- <span class="ruby-comment cmt"># File lib/wee/components/pager.rb, line 46</span>
380
- <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">prev</span>
381
- <span class="ruby-identifier">goto</span>(<span class="ruby-ivar">@current_page</span> <span class="ruby-operator">-</span> <span class="ruby-value">1</span>)
382
- <span class="ruby-keyword kw">end</span>
383
- </pre>
384
- </div>
385
- </div>
386
- </div>
387
-
388
- <div id="method-M000179" class="method-detail">
389
- <a name="M000179"></a>
390
-
391
- <div class="method-heading">
392
- <a href="#M000179" class="method-signature">
393
- <span class="method-name">render</span><span class="method-args">()</span>
394
- </a>
395
- </div>
396
-
397
- <div class="method-description">
398
- <p><a class="source-toggle" href="#"
399
- onclick="toggleCode('M000179-source');return false;">[Source]</a></p>
400
- <div class="method-source-code" id="M000179-source">
401
- <pre>
402
- <span class="ruby-comment cmt"># File lib/wee/components/pager.rb, line 64</span>
403
- <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">render</span>
404
- <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">num_pages</span>() <span class="ruby-operator">&lt;=</span> <span class="ruby-value">0</span>
405
- <span class="ruby-identifier">render_arrow</span>(<span class="ruby-identifier">:first</span>, <span class="ruby-value str">&quot;&lt;&lt;&quot;</span>, <span class="ruby-value str">&quot;Go to first page&quot;</span>); <span class="ruby-identifier">r</span>.<span class="ruby-identifier">space</span>(<span class="ruby-value">2</span>)
406
- <span class="ruby-identifier">render_arrow</span>(<span class="ruby-identifier">:prev</span>, <span class="ruby-value str">&quot;&lt;&quot;</span>, <span class="ruby-value str">&quot;Go to previous page&quot;</span>); <span class="ruby-identifier">r</span>.<span class="ruby-identifier">space</span>(<span class="ruby-value">2</span>)
407
- <span class="ruby-identifier">render_index</span>; <span class="ruby-identifier">r</span>.<span class="ruby-identifier">space</span>(<span class="ruby-value">2</span>)
408
- <span class="ruby-identifier">render_arrow</span>(<span class="ruby-identifier">:next</span>, <span class="ruby-value str">&quot;&gt;&quot;</span>, <span class="ruby-value str">&quot;Go to next page&quot;</span>); <span class="ruby-identifier">r</span>.<span class="ruby-identifier">space</span>(<span class="ruby-value">2</span>)
409
- <span class="ruby-identifier">render_arrow</span>(<span class="ruby-identifier">:last</span>, <span class="ruby-value str">&quot;&gt;&gt;&quot;</span>, <span class="ruby-value str">&quot;Go to last page&quot;</span>)
410
- <span class="ruby-keyword kw">end</span>
411
- </pre>
412
- </div>
413
- </div>
414
- </div>
415
-
416
- <h3 class="section-bar">Private Instance methods</h3>
417
-
418
- <div id="method-M000180" class="method-detail">
419
- <a name="M000180"></a>
420
-
421
- <div class="method-heading">
422
- <a href="#M000180" class="method-signature">
423
- <span class="method-name">render_arrow</span><span class="method-args">(sym, text, tooltip=text)</span>
424
- </a>
425
- </div>
426
-
427
- <div class="method-description">
428
- <p><a class="source-toggle" href="#"
429
- onclick="toggleCode('M000180-source');return false;">[Source]</a></p>
430
- <div class="method-source-code" id="M000180-source">
431
- <pre>
432
- <span class="ruby-comment cmt"># File lib/wee/components/pager.rb, line 75</span>
433
- <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">render_arrow</span>(<span class="ruby-identifier">sym</span>, <span class="ruby-identifier">text</span>, <span class="ruby-identifier">tooltip</span>=<span class="ruby-identifier">text</span>)
434
- <span class="ruby-identifier">r</span>.<span class="ruby-identifier">anchor</span>.<span class="ruby-identifier">callback</span>(<span class="ruby-identifier">sym</span>).<span class="ruby-identifier">tooltip</span>(<span class="ruby-identifier">tooltip</span>).<span class="ruby-identifier">with</span> { <span class="ruby-identifier">r</span>.<span class="ruby-identifier">encode_text</span>(<span class="ruby-identifier">text</span>) }
435
- <span class="ruby-keyword kw">end</span>
436
- </pre>
437
- </div>
438
- </div>
439
- </div>
440
-
441
- <div id="method-M000181" class="method-detail">
442
- <a name="M000181"></a>
443
-
444
- <div class="method-heading">
445
- <a href="#M000181" class="method-signature">
446
- <span class="method-name">render_index</span><span class="method-args">()</span>
447
- </a>
448
- </div>
449
-
450
- <div class="method-description">
451
- <p><a class="source-toggle" href="#"
452
- onclick="toggleCode('M000181-source');return false;">[Source]</a></p>
453
- <div class="method-source-code" id="M000181-source">
454
- <pre>
455
- <span class="ruby-comment cmt"># File lib/wee/components/pager.rb, line 79</span>
456
- <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">render_index</span>
457
- <span class="ruby-identifier">last</span> = <span class="ruby-identifier">last_page_index</span>()
458
- (<span class="ruby-value">0</span> <span class="ruby-operator">..</span> <span class="ruby-identifier">last</span>).<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">i</span><span class="ruby-operator">|</span>
459
- <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">i</span> <span class="ruby-operator">==</span> <span class="ruby-ivar">@current_page</span>
460
- <span class="ruby-identifier">render_page_num</span>(<span class="ruby-identifier">i</span>, <span class="ruby-keyword kw">true</span>)
461
- <span class="ruby-keyword kw">else</span>
462
- <span class="ruby-identifier">render_page_num</span>(<span class="ruby-identifier">i</span>, <span class="ruby-keyword kw">false</span>)
463
- <span class="ruby-keyword kw">end</span>
464
- <span class="ruby-identifier">r</span>.<span class="ruby-identifier">space</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">i</span> <span class="ruby-operator">&lt;</span> <span class="ruby-identifier">last</span>
465
- <span class="ruby-keyword kw">end</span>
466
- <span class="ruby-keyword kw">end</span>
467
- </pre>
468
- </div>
469
- </div>
470
- </div>
471
-
472
- <div id="method-M000182" class="method-detail">
473
- <a name="M000182"></a>
474
-
475
- <div class="method-heading">
476
- <a href="#M000182" class="method-signature">
477
- <span class="method-name">render_page_num</span><span class="method-args">(num, current)</span>
478
- </a>
479
- </div>
480
-
481
- <div class="method-description">
482
- <p><a class="source-toggle" href="#"
483
- onclick="toggleCode('M000182-source');return false;">[Source]</a></p>
484
- <div class="method-source-code" id="M000182-source">
485
- <pre>
486
- <span class="ruby-comment cmt"># File lib/wee/components/pager.rb, line 91</span>
487
- <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">render_page_num</span>(<span class="ruby-identifier">num</span>, <span class="ruby-identifier">current</span>)
488
- <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">current</span>
489
- <span class="ruby-identifier">r</span>.<span class="ruby-identifier">bold</span>(<span class="ruby-identifier">num</span><span class="ruby-operator">+</span><span class="ruby-value">1</span>)
490
- <span class="ruby-keyword kw">else</span>
491
- <span class="ruby-identifier">r</span>.<span class="ruby-identifier">anchor</span>.<span class="ruby-identifier">callback</span>(<span class="ruby-identifier">:goto</span>, <span class="ruby-identifier">num</span>).<span class="ruby-identifier">with</span>(<span class="ruby-identifier">num</span><span class="ruby-operator">+</span><span class="ruby-value">1</span>)
492
- <span class="ruby-keyword kw">end</span>
493
- <span class="ruby-keyword kw">end</span>
494
- </pre>
495
- </div>
496
- </div>
497
- </div>
498
-
499
- <div id="method-M000183" class="method-detail">
500
- <a name="M000183"></a>
501
-
502
- <div class="method-heading">
503
- <a href="#M000183" class="method-signature">
504
- <span class="method-name">validate</span><span class="method-args">()</span>
505
- </a>
506
- </div>
507
-
508
- <div class="method-description">
509
- <p><a class="source-toggle" href="#"
510
- onclick="toggleCode('M000183-source');return false;">[Source]</a></p>
511
- <div class="method-source-code" id="M000183-source">
512
- <pre>
513
- <span class="ruby-comment cmt"># File lib/wee/components/pager.rb, line 99</span>
514
- <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">validate</span>
515
- <span class="ruby-ivar">@current_page</span> = [[<span class="ruby-value">0</span>, <span class="ruby-ivar">@current_page</span>].<span class="ruby-identifier">max</span>, <span class="ruby-identifier">last_page_index</span>()].<span class="ruby-identifier">min</span>
516
- <span class="ruby-keyword kw">end</span>
517
- </pre>
518
- </div>
519
- </div>
520
- </div>
521
-
522
-
523
- </div>
524
-
525
-
526
- </div>
527
-
528
-
529
- <div id="validator-badges">
530
- <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
531
- </div>
532
-
533
- </body>
534
- </html>