wee 0.10.0 → 2.0.0
Sign up to get free protection for your applications and to get access to all the features.
- data/README.rdoc +127 -0
- data/Rakefile +11 -32
- data/doc/rdoc/classes/Array.html +28 -24
- data/doc/rdoc/classes/Hash.html +28 -24
- data/doc/rdoc/classes/Object.html +37 -84
- data/doc/rdoc/classes/String.html +89 -21
- data/doc/rdoc/classes/Struct.html +32 -82
- data/doc/rdoc/classes/Wee.html +285 -86
- data/doc/rdoc/classes/Wee/AnswerDecoration.html +111 -48
- data/doc/rdoc/classes/Wee/{Context.html → AnswerDecoration/Answer.html} +61 -51
- data/doc/rdoc/classes/Wee/Application.html +161 -322
- data/doc/rdoc/classes/Wee/Application/SessionCache.html +162 -0
- data/doc/rdoc/classes/Wee/Brush.html +147 -62
- data/doc/rdoc/classes/{Enumerable.html → Wee/Brush/ActionInputTag.html} +68 -41
- data/doc/rdoc/classes/Wee/Brush/AnchorTag.html +150 -100
- data/doc/rdoc/classes/Wee/Brush/CheckboxTag.html +132 -46
- data/doc/rdoc/classes/Wee/Brush/FileUploadTag.html +63 -41
- data/doc/rdoc/classes/Wee/Brush/FormTag.html +184 -78
- data/doc/rdoc/classes/Wee/Brush/GenericEncodedTextBrush.html +48 -65
- data/doc/rdoc/classes/Wee/Brush/GenericSingleTagBrush.html +83 -37
- data/doc/rdoc/classes/Wee/Brush/GenericTagBrush.html +334 -310
- data/doc/rdoc/classes/Wee/Brush/GenericTextBrush.html +74 -54
- data/doc/rdoc/classes/Wee/Brush/HiddenInputTag.html +58 -43
- data/doc/rdoc/classes/Wee/Brush/ImageButtonTag.html +64 -74
- data/doc/rdoc/classes/Wee/Brush/ImageTag.html +109 -86
- data/doc/rdoc/classes/Wee/Brush/InputTag.html +205 -45
- data/doc/rdoc/classes/Wee/Brush/JavascriptTag.html +96 -34
- data/doc/rdoc/classes/Wee/Brush/Page.html +129 -67
- data/doc/rdoc/classes/Wee/{Utils/LRUCache.html → Brush/PasswordInputTag.html} +65 -38
- data/doc/rdoc/classes/Wee/Brush/RadioButtonTag.html +132 -78
- data/doc/rdoc/classes/Wee/Brush/{RadioButtonTag/RadioGroup.html → RadioGroup.html} +91 -53
- data/doc/rdoc/classes/Wee/Brush/SelectListTag.html +301 -127
- data/doc/rdoc/classes/Wee/Brush/SelectOptionTag.html +96 -33
- data/doc/rdoc/classes/Wee/Brush/SubmitButtonTag.html +59 -44
- data/doc/rdoc/classes/Wee/Brush/TableDataTag.html +94 -57
- data/doc/rdoc/classes/Wee/Brush/TableHeaderTag.html +96 -33
- data/doc/rdoc/classes/Wee/Brush/TableRowTag.html +181 -121
- data/doc/rdoc/classes/Wee/Brush/TableTag.html +94 -32
- data/doc/rdoc/classes/Wee/Brush/TextAreaTag.html +257 -71
- data/doc/rdoc/classes/Wee/Brush/TextInputTag.html +58 -43
- data/doc/rdoc/classes/Wee/CallAnswerMixin.html +289 -0
- data/doc/rdoc/classes/Wee/CallbackMixin.html +233 -0
- data/doc/rdoc/classes/Wee/CallbackRegistry.html +179 -155
- data/doc/rdoc/classes/Wee/Callbacks.html +262 -0
- data/doc/rdoc/classes/Wee/Component.html +228 -779
- data/doc/rdoc/classes/Wee/Decoration.html +144 -159
- data/doc/rdoc/classes/Wee/DecorationMixin.html +340 -0
- data/doc/rdoc/classes/Wee/Delegate.html +119 -76
- data/doc/rdoc/classes/Wee/DupReplaceSnapshotMixin.html +64 -47
- data/doc/rdoc/classes/Wee/ErrorResponse.html +59 -62
- data/doc/rdoc/classes/Wee/FormDecoration.html +51 -37
- data/doc/rdoc/classes/Wee/GenericResponse.html +60 -35
- data/doc/rdoc/classes/Wee/HtmlCanvas.html +1000 -602
- data/doc/rdoc/classes/Wee/HtmlDocument.html +288 -0
- data/doc/rdoc/classes/Wee/HtmlWriter.html +227 -126
- data/doc/rdoc/classes/Wee/IdGenerator.html +60 -31
- data/doc/rdoc/classes/Wee/IdGenerator/Secure.html +282 -0
- data/doc/rdoc/classes/Wee/{SimpleIdGenerator.html → IdGenerator/Sequential.html} +76 -49
- data/doc/rdoc/classes/Wee/JQuery.html +221 -0
- data/doc/rdoc/classes/Wee/LRUCache.html +514 -0
- data/doc/rdoc/classes/Wee/LRUCache/Item.html +158 -0
- data/doc/rdoc/classes/Wee/ObjectSnapshotMixin.html +187 -0
- data/doc/rdoc/classes/Wee/PageDecoration.html +88 -59
- data/doc/rdoc/classes/Wee/Presenter.html +124 -704
- data/doc/rdoc/classes/Wee/RedirectResponse.html +64 -33
- data/doc/rdoc/classes/Wee/RefreshResponse.html +59 -44
- data/doc/rdoc/classes/Wee/Renderer.html +234 -54
- data/doc/rdoc/classes/Wee/Request.html +151 -286
- data/doc/rdoc/classes/Wee/Response.html +29 -212
- data/doc/rdoc/classes/Wee/Session.html +585 -360
- data/doc/rdoc/classes/Wee/{StateHolder.html → Session/AbortCallbackProcessing.html} +67 -40
- data/doc/rdoc/classes/Wee/Session/MutexSerializer.html +166 -0
- data/doc/rdoc/classes/{Cache/Strategy/LFU/Item.html → Wee/Session/Page.html} +26 -27
- data/doc/rdoc/classes/Wee/Session/ThreadSerializer.html +219 -0
- data/doc/rdoc/classes/Wee/State.html +307 -0
- data/doc/rdoc/classes/{Cache/Strategy/LRU/Item.html → Wee/State/Snapshot.html} +26 -27
- data/doc/rdoc/classes/{Cache/Strategy/Unbounded/Item.html → Wee/State/SnapshotIVars.html} +26 -27
- data/doc/rdoc/classes/Wee/StructSnapshotMixin.html +183 -0
- data/doc/rdoc/classes/Wee/WrapperDecoration.html +101 -35
- data/doc/rdoc/created.rid +1 -1
- data/doc/rdoc/files/README_rdoc.html +243 -0
- data/doc/rdoc/files/lib/wee/application_rb.html +22 -30
- data/doc/rdoc/files/lib/wee/{page_rb.html → call_answer_rb.html} +14 -25
- data/doc/rdoc/files/lib/wee/callback_rb.html +12 -29
- data/doc/rdoc/files/lib/wee/component_rb.html +22 -27
- data/doc/rdoc/files/lib/wee/decoration_rb.html +19 -20
- data/doc/rdoc/files/lib/wee/{idgen_rb.html → html_brushes_rb.html} +14 -25
- data/doc/rdoc/files/lib/wee/html_canvas_rb.html +15 -23
- data/doc/rdoc/files/lib/wee/{abstractsession_rb.html → html_document_rb.html} +17 -25
- data/doc/rdoc/files/lib/wee/html_writer_rb.html +15 -23
- data/doc/rdoc/files/lib/wee/{webrick_rb.html → id_generator_rb.html} +19 -25
- data/doc/rdoc/files/lib/wee/{core/page_rb.html → jquery/jquery_rb.html} +14 -25
- data/doc/rdoc/files/lib/wee/{state_registry_rb.html → jquery_rb.html} +17 -27
- data/doc/rdoc/files/lib/{cache/cache_rb.html → wee/lru_cache_rb.html} +14 -25
- data/doc/rdoc/files/lib/wee/presenter_rb.html +12 -34
- data/doc/rdoc/files/lib/wee/{holder_rb.html → renderer_rb.html} +14 -25
- data/doc/rdoc/files/lib/wee/request_rb.html +18 -32
- data/doc/rdoc/files/lib/wee/response_rb.html +17 -24
- data/doc/rdoc/files/lib/wee/session_rb.html +21 -23
- data/doc/rdoc/files/lib/wee/state_rb.html +90 -0
- data/doc/rdoc/files/lib/wee_rb.html +48 -40
- data/doc/rdoc/fr_class_index.html +111 -75
- data/doc/rdoc/fr_file_index.html +46 -76
- data/doc/rdoc/fr_method_index.html +473 -480
- data/doc/rdoc/index.html +6 -9
- data/doc/rdoc/rdoc-style.css +210 -119
- data/examples/ObjectSpaceBrowser.rb +33 -23
- data/examples/ajax.rb +71 -0
- data/examples/continuations.rb +28 -0
- data/examples/demo.rb +92 -36
- data/examples/demo/calculator.rb +63 -0
- data/examples/demo/calendar.rb +42 -55
- data/examples/demo/counter.rb +38 -0
- data/{lib/wee/examples → examples/demo}/editable_counter.rb +11 -6
- data/examples/demo/example.rb +28 -24
- data/examples/demo/file_upload.rb +19 -0
- data/{lib/wee/components → examples/demo}/messagebox.rb +3 -3
- data/examples/demo/radio.rb +33 -0
- data/{lib/wee/examples → examples/demo}/window.rb +15 -10
- data/examples/hw.rb +3 -4
- data/{lib/wee/components → examples}/pager.rb +14 -14
- data/lib/wee.rb +48 -25
- data/lib/wee/application.rb +69 -131
- data/lib/wee/call_answer.rb +118 -0
- data/lib/wee/callback.rb +88 -0
- data/lib/wee/component.rb +141 -0
- data/lib/wee/decoration.rb +242 -0
- data/lib/wee/html_brushes.rb +725 -0
- data/lib/wee/html_canvas.rb +241 -0
- data/lib/wee/html_document.rb +45 -0
- data/lib/wee/html_writer.rb +71 -0
- data/lib/wee/id_generator.rb +70 -0
- data/lib/wee/jquery.rb +1 -0
- data/lib/wee/jquery/jquery.rb +17 -0
- data/lib/wee/jquery/public/jquery-1.3.2.min.js +19 -0
- data/lib/wee/jquery/public/wee-jquery.js +19 -0
- data/lib/wee/lru_cache.rb +89 -0
- data/lib/wee/presenter.rb +43 -0
- data/lib/wee/renderer.rb +65 -0
- data/lib/wee/request.rb +37 -113
- data/lib/wee/response.rb +43 -70
- data/lib/wee/session.rb +304 -113
- data/lib/wee/state.rb +85 -0
- data/test/component_spec.rb +17 -0
- data/wee.gemspec +4 -3
- metadata +249 -452
- data/ChangeLog +0 -657
- data/INSTALL +0 -17
- data/README +0 -272
- data/TODO +0 -142
- data/benchmark/Centrino1300/result.2000.counter.action +0 -45
- data/benchmark/Centrino1300/result.2000.counter.render +0 -43
- data/benchmark/Centrino1300/result.2000.filehandler +0 -43
- data/benchmark/Centrino600/result.2000.counter.action +0 -47
- data/benchmark/Centrino600/result.2000.counter.render +0 -45
- data/benchmark/Centrino600/result.2000.filehandler +0 -43
- data/benchmark/Makefile +0 -53
- data/benchmark/counter.rb +0 -77
- data/benchmark/filehandler.rb +0 -6
- data/benchmark/report_req.rb +0 -12
- data/bin/wee +0 -100
- data/doc/rdoc/classes/ActionView.html +0 -107
- data/doc/rdoc/classes/ActionView/Base.html +0 -133
- data/doc/rdoc/classes/Cache.html +0 -126
- data/doc/rdoc/classes/Cache/StorageCache.html +0 -320
- data/doc/rdoc/classes/Cache/Strategy.html +0 -128
- data/doc/rdoc/classes/Cache/Strategy/CapacityBounded.html +0 -269
- data/doc/rdoc/classes/Cache/Strategy/LFU.html +0 -238
- data/doc/rdoc/classes/Cache/Strategy/LRU.html +0 -238
- data/doc/rdoc/classes/Cache/Strategy/Unbounded.html +0 -225
- data/doc/rdoc/classes/LiteralMethod.html +0 -196
- data/doc/rdoc/classes/Main.html +0 -289
- data/doc/rdoc/classes/OgApplication.html +0 -126
- data/doc/rdoc/classes/OgScaffolder.html +0 -827
- data/doc/rdoc/classes/OgScaffolder/Editor.html +0 -565
- data/doc/rdoc/classes/OgSession.html +0 -172
- data/doc/rdoc/classes/Recipe.html +0 -113
- data/doc/rdoc/classes/Wee/AbstractSession.html +0 -502
- data/doc/rdoc/classes/Wee/Brush/ActionCallbackMixin.html +0 -148
- data/doc/rdoc/classes/Wee/Brush/ActionMixin.html +0 -146
- data/doc/rdoc/classes/Wee/Brush/ActionURLCallbackMixin.html +0 -154
- data/doc/rdoc/classes/Wee/Brush/AssignMixin.html +0 -141
- data/doc/rdoc/classes/Wee/Brush/CallbackMixin.html +0 -141
- data/doc/rdoc/classes/Wee/Brush/InputCallbackMixin.html +0 -148
- data/doc/rdoc/classes/Wee/Brush/SelectListTag/SelectListCallback.html +0 -158
- data/doc/rdoc/classes/Wee/Brush/ToCallback.html +0 -146
- data/doc/rdoc/classes/Wee/Callback.html +0 -231
- data/doc/rdoc/classes/Wee/CallbackStream.html +0 -227
- data/doc/rdoc/classes/Wee/Canvas.html +0 -235
- data/doc/rdoc/classes/Wee/CanvasMixin.html +0 -225
- data/doc/rdoc/classes/Wee/Component/OnAnswer.html +0 -153
- data/doc/rdoc/classes/Wee/ComponentDispatcher.html +0 -289
- data/doc/rdoc/classes/Wee/ComponentRunner.html +0 -321
- data/doc/rdoc/classes/Wee/ErrorPage.html +0 -175
- data/doc/rdoc/classes/Wee/Examples.html +0 -114
- data/doc/rdoc/classes/Wee/Examples/Calculator.html +0 -319
- data/doc/rdoc/classes/Wee/Examples/Counter.html +0 -289
- data/doc/rdoc/classes/Wee/Examples/EditableCounter.html +0 -210
- data/doc/rdoc/classes/Wee/Examples/Window.html +0 -346
- data/doc/rdoc/classes/Wee/FastCGIAdaptor.html +0 -227
- data/doc/rdoc/classes/Wee/Helper.html +0 -148
- data/doc/rdoc/classes/Wee/HtmlCanvasRenderer.html +0 -1230
- data/doc/rdoc/classes/Wee/LiteralMethodCallback.html +0 -198
- data/doc/rdoc/classes/Wee/LoginDecoration.html +0 -261
- data/doc/rdoc/classes/Wee/Md5IdGenerator.html +0 -181
- data/doc/rdoc/classes/Wee/MessageBox.html +0 -180
- data/doc/rdoc/classes/Wee/MethodCallback.html +0 -193
- data/doc/rdoc/classes/Wee/Nitro.html +0 -114
- data/doc/rdoc/classes/Wee/Nitro/ControllerClassMixin.html +0 -192
- data/doc/rdoc/classes/Wee/Nitro/ControllerMixin.html +0 -345
- data/doc/rdoc/classes/Wee/Nitro/FormTag.html +0 -155
- data/doc/rdoc/classes/Wee/Nitro/HtmlCanvasRenderer.html +0 -178
- data/doc/rdoc/classes/Wee/Page.html +0 -115
- data/doc/rdoc/classes/Wee/PagelessApplication.html +0 -154
- data/doc/rdoc/classes/Wee/PagelessComponentDriver.html +0 -296
- data/doc/rdoc/classes/Wee/PagelessRequest.html +0 -208
- data/doc/rdoc/classes/Wee/PagelessSession.html +0 -359
- data/doc/rdoc/classes/Wee/Pager.html +0 -534
- data/doc/rdoc/classes/Wee/Rails.html +0 -114
- data/doc/rdoc/classes/Wee/Rails/ControllerClassMixin.html +0 -192
- data/doc/rdoc/classes/Wee/Rails/ControllerMixin.html +0 -342
- data/doc/rdoc/classes/Wee/Rails/FormTag.html +0 -155
- data/doc/rdoc/classes/Wee/Rails/HtmlCanvasRenderer.html +0 -177
- data/doc/rdoc/classes/Wee/RenderingContext.html +0 -283
- data/doc/rdoc/classes/Wee/RequestHandler.html +0 -341
- data/doc/rdoc/classes/Wee/Snapshot.html +0 -211
- data/doc/rdoc/classes/Wee/StateRegistry.html +0 -434
- data/doc/rdoc/classes/Wee/StateRegistry/Snapshot.html +0 -320
- data/doc/rdoc/classes/Wee/StateRegistry/WithObject.html +0 -153
- data/doc/rdoc/classes/Wee/Utils.html +0 -300
- data/doc/rdoc/classes/Wee/ValueHolder.html +0 -220
- data/doc/rdoc/classes/Wee/WEBrickAdaptor.html +0 -368
- data/doc/rdoc/files/INSTALL.html +0 -130
- data/doc/rdoc/files/README.html +0 -471
- data/doc/rdoc/files/lib/wee/adaptors/fastcgi_rb.html +0 -108
- data/doc/rdoc/files/lib/wee/adaptors/nitro_rb.html +0 -101
- data/doc/rdoc/files/lib/wee/adaptors/rails_rb.html +0 -101
- data/doc/rdoc/files/lib/wee/adaptors/webrick_rb.html +0 -108
- data/doc/rdoc/files/lib/wee/component_ext_rb.html +0 -101
- data/doc/rdoc/files/lib/wee/components/component_dispatcher_rb.html +0 -108
- data/doc/rdoc/files/lib/wee/components/form_decoration_rb.html +0 -101
- data/doc/rdoc/files/lib/wee/components/login_decoration_rb.html +0 -101
- data/doc/rdoc/files/lib/wee/components/messagebox_rb.html +0 -101
- data/doc/rdoc/files/lib/wee/components/page_decoration_rb.html +0 -101
- data/doc/rdoc/files/lib/wee/components/pager_rb.html +0 -101
- data/doc/rdoc/files/lib/wee/components/wrapper_decoration_rb.html +0 -101
- data/doc/rdoc/files/lib/wee/components_rb.html +0 -114
- data/doc/rdoc/files/lib/wee/context_rb.html +0 -101
- data/doc/rdoc/files/lib/wee/continuation/core/component_rb.html +0 -101
- data/doc/rdoc/files/lib/wee/continuation/session_rb.html +0 -108
- data/doc/rdoc/files/lib/wee/continuation_rb.html +0 -116
- data/doc/rdoc/files/lib/wee/core/callback_rb.html +0 -115
- data/doc/rdoc/files/lib/wee/core/component_rb.html +0 -108
- data/doc/rdoc/files/lib/wee/core/componentrunner_rb.html +0 -110
- data/doc/rdoc/files/lib/wee/core/context_rb.html +0 -101
- data/doc/rdoc/files/lib/wee/core/decoration_rb.html +0 -133
- data/doc/rdoc/files/lib/wee/core/idgen_rb.html +0 -101
- data/doc/rdoc/files/lib/wee/core/presenter_rb.html +0 -112
- data/doc/rdoc/files/lib/wee/core/renderer_rb.html +0 -107
- data/doc/rdoc/files/lib/wee/core/snapshot_rb.html +0 -113
- data/doc/rdoc/files/lib/wee/core/valueholder_rb.html +0 -110
- data/doc/rdoc/files/lib/wee/core_ext_rb.html +0 -101
- data/doc/rdoc/files/lib/wee/core_rb.html +0 -124
- data/doc/rdoc/files/lib/wee/databases/og/application_rb.html +0 -101
- data/doc/rdoc/files/lib/wee/databases/og/old_scaffolder_rb.html +0 -101
- data/doc/rdoc/files/lib/wee/databases/og/scaffolder_rb.html +0 -115
- data/doc/rdoc/files/lib/wee/databases/og/session_rb.html +0 -101
- data/doc/rdoc/files/lib/wee/databases/og_rb.html +0 -111
- data/doc/rdoc/files/lib/wee/examples/calculator_rb.html +0 -107
- data/doc/rdoc/files/lib/wee/examples/counter_rb.html +0 -101
- data/doc/rdoc/files/lib/wee/examples/editable_counter_rb.html +0 -114
- data/doc/rdoc/files/lib/wee/examples/window_rb.html +0 -101
- data/doc/rdoc/files/lib/wee/idgen/md5_rb.html +0 -115
- data/doc/rdoc/files/lib/wee/idgen/simple_rb.html +0 -107
- data/doc/rdoc/files/lib/wee/pageless/application_rb.html +0 -108
- data/doc/rdoc/files/lib/wee/pageless/request_rb.html +0 -101
- data/doc/rdoc/files/lib/wee/pageless/session_rb.html +0 -109
- data/doc/rdoc/files/lib/wee/pageless_rb.html +0 -110
- data/doc/rdoc/files/lib/wee/renderer/html/brushes_rb.html +0 -101
- data/doc/rdoc/files/lib/wee/renderer/html/canvas_rb.html +0 -108
- data/doc/rdoc/files/lib/wee/renderer/html/writer_rb.html +0 -108
- data/doc/rdoc/files/lib/wee/rendering/html/brushes_rb.html +0 -101
- data/doc/rdoc/files/lib/wee/rendering/html/canvas_rb.html +0 -101
- data/doc/rdoc/files/lib/wee/rendering/html/writer_rb.html +0 -108
- data/doc/rdoc/files/lib/wee/requesthandler_rb.html +0 -101
- data/doc/rdoc/files/lib/wee/skeleton/og/components/main_rb.html +0 -101
- data/doc/rdoc/files/lib/wee/skeleton/og/conf/db_rb.html +0 -114
- data/doc/rdoc/files/lib/wee/skeleton/og/models/recipe_rb.html +0 -101
- data/doc/rdoc/files/lib/wee/skeleton/og/run_rb.html +0 -115
- data/doc/rdoc/files/lib/wee/skeleton/simple/components/main_rb.html +0 -101
- data/doc/rdoc/files/lib/wee/skeleton/simple/run_rb.html +0 -111
- data/doc/rdoc/files/lib/wee/snapshot_ext_rb.html +0 -101
- data/doc/rdoc/files/lib/wee/snapshot_rb.html +0 -107
- data/doc/rdoc/files/lib/wee/stuff_rb.html +0 -144
- data/doc/rdoc/files/lib/wee/template_rb.html +0 -101
- data/doc/rdoc/files/lib/wee/utils/autoreload_rb.html +0 -101
- data/doc/rdoc/files/lib/wee/utils/cache_rb.html +0 -108
- data/doc/rdoc/files/lib/wee/utils/helper_rb.html +0 -101
- data/doc/rdoc/files/lib/wee/utils_rb.html +0 -110
- data/examples/ajax/ajax.js +0 -444
- data/examples/ajax/ajax.rb +0 -31
- data/examples/cc.rb +0 -74
- data/examples/dispatcher.rb +0 -37
- data/examples/draw.rb +0 -94
- data/examples/live-update.rb +0 -45
- data/examples/nitro/run.rb +0 -42
- data/examples/og-test.rb +0 -60
- data/examples/radio.rb +0 -44
- data/examples/test.rb +0 -39
- data/install.rb +0 -14
- data/lib/cache/cache.rb +0 -167
- data/lib/wee/abstractsession.rb +0 -96
- data/lib/wee/adaptors/fastcgi.rb +0 -76
- data/lib/wee/adaptors/nitro.rb +0 -155
- data/lib/wee/adaptors/rails.rb +0 -154
- data/lib/wee/adaptors/webrick.rb +0 -89
- data/lib/wee/components.rb +0 -7
- data/lib/wee/components/component_dispatcher.rb +0 -46
- data/lib/wee/components/form_decoration.rb +0 -7
- data/lib/wee/components/login_decoration.rb +0 -35
- data/lib/wee/components/page_decoration.rb +0 -14
- data/lib/wee/components/wrapper_decoration.rb +0 -7
- data/lib/wee/continuation.rb +0 -5
- data/lib/wee/continuation/core/component.rb +0 -56
- data/lib/wee/continuation/session.rb +0 -64
- data/lib/wee/core.rb +0 -16
- data/lib/wee/core/callback.rb +0 -121
- data/lib/wee/core/component.rb +0 -356
- data/lib/wee/core/componentrunner.rb +0 -73
- data/lib/wee/core/context.rb +0 -27
- data/lib/wee/core/decoration.rb +0 -138
- data/lib/wee/core/idgen.rb +0 -5
- data/lib/wee/core/page.rb +0 -1
- data/lib/wee/core/presenter.rb +0 -100
- data/lib/wee/core/renderer.rb +0 -23
- data/lib/wee/core/snapshot.rb +0 -21
- data/lib/wee/core/valueholder.rb +0 -19
- data/lib/wee/core_ext.rb +0 -122
- data/lib/wee/databases/og.rb +0 -4
- data/lib/wee/databases/og/application.rb +0 -3
- data/lib/wee/databases/og/old_scaffolder.rb +0 -98
- data/lib/wee/databases/og/scaffolder.rb +0 -255
- data/lib/wee/databases/og/session.rb +0 -9
- data/lib/wee/examples/calculator.rb +0 -70
- data/lib/wee/examples/counter.rb +0 -33
- data/lib/wee/idgen/md5.rb +0 -21
- data/lib/wee/idgen/sequential.rb +0 -11
- data/lib/wee/pageless.rb +0 -3
- data/lib/wee/pageless/application.rb +0 -13
- data/lib/wee/pageless/request.rb +0 -27
- data/lib/wee/pageless/session.rb +0 -74
- data/lib/wee/renderer/html/brushes.rb +0 -667
- data/lib/wee/renderer/html/canvas.rb +0 -265
- data/lib/wee/renderer/html/writer.rb +0 -80
- data/lib/wee/requesthandler.rb +0 -81
- data/lib/wee/skeleton/og/README +0 -38
- data/lib/wee/skeleton/og/components/main.rb +0 -20
- data/lib/wee/skeleton/og/conf/db.rb +0 -8
- data/lib/wee/skeleton/og/models/recipe.rb +0 -5
- data/lib/wee/skeleton/og/run.rb +0 -23
- data/lib/wee/skeleton/simple/README +0 -32
- data/lib/wee/skeleton/simple/components/main.rb +0 -25
- data/lib/wee/skeleton/simple/run.rb +0 -12
- data/lib/wee/snapshot_ext.rb +0 -41
- data/lib/wee/template.rb +0 -42
- data/lib/wee/utils.rb +0 -5
- data/lib/wee/utils/autoreload.rb +0 -56
- data/lib/wee/utils/cache.rb +0 -7
- data/lib/wee/utils/helper.rb +0 -51
@@ -1,12 +1,9 @@
|
|
1
|
-
|
2
|
-
|
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=
|
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 }
|
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
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
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">
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
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’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>
|
127
|
-
<a href="#M000375">do_render</a>
|
128
|
-
<a href="#M000370">get_property</a>
|
129
|
-
<a href="#M000371">lookup_property</a>
|
130
|
-
<a href="#M000380">process_callbacks</a>
|
131
|
-
<a href="#M000368">properties</a>
|
132
|
-
<a href="#M000369">properties=</a>
|
133
|
-
<a href="#M000377">r</a>
|
134
|
-
<a href="#M000374">render</a>
|
135
|
-
<a href="#M000376">renderer</a>
|
136
|
-
<a href="#M000364">renderer_class</a>
|
137
|
-
<a href="#M000383">renderer_class</a>
|
138
|
-
<a href="#M000382">renderer_class</a>
|
139
|
-
<a href="#M000379">renderer_class</a>
|
140
|
-
<a href="#M000367">send_render_response</a>
|
141
|
-
<a href="#M000366">send_response</a>
|
142
|
-
<a href="#M000365">session</a>
|
143
|
-
<a href="#M000373">template</a>
|
144
|
-
<a href="#M000372">uses_property</a>
|
145
|
-
<a href="#M000378">with_renderer_for</a>
|
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>
|
156
113
|
|
114
|
+
<a href="#M000062">process_callbacks</a>
|
157
115
|
|
116
|
+
<a href="#M000060">render</a>
|
158
117
|
|
118
|
+
<a href="#M000059">render_on</a>
|
159
119
|
|
160
|
-
|
120
|
+
<a href="#M000063">renderer_class</a>
|
161
121
|
|
122
|
+
<a href="#M000064">session</a>
|
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
|
-
|
210
|
-
<a name="M000365"></a>
|
138
|
+
<div id="methods">
|
211
139
|
|
212
|
-
|
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-
|
240
|
-
<a name="
|
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">(&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">&</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
|
-
|
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
|
-
|
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
|
-
|
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
|
-
|
292
|
-
Send a premature response.
|
293
|
-
</p>
|
157
|
+
|
294
158
|
<p><a class="source-toggle" href="#"
|
295
|
-
onclick="toggleCode('
|
296
|
-
<div class="method-source-code" id="
|
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/
|
299
|
-
|
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
|
-
|
309
|
-
|
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
|
-
|
323
|
-
<div id="methods">
|
324
|
-
<h3 class="section-bar">Public Class methods</h3>
|
176
|
+
<a href="#M000062" class="method-signature">
|
325
177
|
|
326
|
-
|
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">"lookup_property(#{ hash[:property].inspect })"</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">""</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">""</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">".rb"</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
|
-
|
425
|
-
Returns an "owned" property.
|
426
|
-
</p>
|
185
|
+
|
427
186
|
<p><a class="source-toggle" href="#"
|
428
|
-
onclick="toggleCode('
|
429
|
-
<div class="method-source-code" id="
|
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/
|
432
|
-
|
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
|
-
|
495
|
-
|
199
|
+
<div id="method-M000060" class="method-detail">
|
200
|
+
<a name="M000060"></a>
|
496
201
|
|
497
|
-
|
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
|
-
|
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
|
-
|
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
|
-
|
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('
|
551
|
-
<div class="method-source-code" id="
|
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/
|
554
|
-
|
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
|
-
|
562
|
-
|
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
|
-
|
576
|
-
<div id="methods">
|
577
|
-
<h3 class="section-bar">Public Instance methods</h3>
|
232
|
+
<a href="#M000059" class="method-signature">
|
578
233
|
|
579
|
-
|
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’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’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('
|
667
|
-
<div class="method-source-code" id="
|
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/
|
670
|
-
|
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
|
-
|
677
|
-
|
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
|
-
|
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
|
712
|
-
method if you want to use a different
|
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">"Method renderer_class needs to be implemented!"</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('
|
753
|
-
<div class="method-source-code" id="
|
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/
|
756
|
-
|
757
|
-
|
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
|
-
|
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
|
-
|
785
|
-
<div id="methods">
|
786
|
-
<h3 class="section-bar">Public Instance methods</h3>
|
305
|
+
<a href="#M000064" class="method-signature">
|
787
306
|
|
788
|
-
|
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">(&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">&</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
|
-
|
851
|
-
|
852
|
-
|
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('
|
861
|
-
<div class="method-source-code" id="
|
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/
|
864
|
-
|
865
|
-
|
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>
|