wee 0.10.0 → 2.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- 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::Brush::GenericSingleTagBrush</title>
|
|
9
|
-
<meta http-equiv="Content-Type" content="text/html; charset=
|
|
5
|
+
<title>Class: Wee::Brush::GenericSingleTagBrush [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,44 +51,55 @@
|
|
|
55
51
|
<tr class="top-aligned-row">
|
|
56
52
|
<td><strong>In:</strong></td>
|
|
57
53
|
<td>
|
|
58
|
-
|
|
59
|
-
|
|
54
|
+
|
|
55
|
+
|
|
56
|
+
<a href="../../../files/lib/wee/html_brushes_rb.html">
|
|
57
|
+
|
|
58
|
+
lib/wee/html_brushes.rb
|
|
59
|
+
|
|
60
60
|
</a>
|
|
61
|
+
|
|
62
|
+
|
|
61
63
|
<br />
|
|
64
|
+
|
|
62
65
|
</td>
|
|
63
66
|
</tr>
|
|
64
67
|
|
|
68
|
+
|
|
65
69
|
<tr class="top-aligned-row">
|
|
66
70
|
<td><strong>Parent:</strong></td>
|
|
67
71
|
<td>
|
|
72
|
+
|
|
68
73
|
Brush::GenericTagBrush
|
|
74
|
+
|
|
69
75
|
</td>
|
|
70
76
|
</tr>
|
|
77
|
+
|
|
71
78
|
</table>
|
|
72
79
|
</div>
|
|
73
80
|
<!-- banner header -->
|
|
74
81
|
|
|
75
82
|
<div id="bodyContent">
|
|
76
83
|
|
|
77
|
-
|
|
78
|
-
|
|
79
84
|
<div id="contextContent">
|
|
80
85
|
|
|
81
|
-
|
|
82
|
-
|
|
83
86
|
</div>
|
|
84
87
|
|
|
88
|
+
|
|
85
89
|
<div id="method-list">
|
|
86
90
|
<h3 class="section-bar">Methods</h3>
|
|
87
91
|
|
|
88
92
|
<div class="name-list">
|
|
89
|
-
|
|
93
|
+
|
|
94
|
+
<a href="#M000134">nesting?</a>
|
|
95
|
+
|
|
96
|
+
<a href="#M000133">with</a>
|
|
97
|
+
|
|
90
98
|
</div>
|
|
91
99
|
</div>
|
|
92
100
|
|
|
93
101
|
</div>
|
|
94
102
|
|
|
95
|
-
|
|
96
103
|
<!-- if includes -->
|
|
97
104
|
|
|
98
105
|
<div id="section">
|
|
@@ -100,47 +107,86 @@
|
|
|
100
107
|
|
|
101
108
|
|
|
102
109
|
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
110
|
<!-- if method_list -->
|
|
111
|
+
|
|
108
112
|
<div id="methods">
|
|
113
|
+
|
|
109
114
|
<h3 class="section-bar">Public Class methods</h3>
|
|
110
115
|
|
|
111
|
-
|
|
112
|
-
|
|
116
|
+
|
|
117
|
+
<div id="method-M000134" class="method-detail">
|
|
118
|
+
<a name="M000134"></a>
|
|
119
|
+
|
|
120
|
+
<div class="method-heading">
|
|
121
|
+
|
|
122
|
+
<a href="#M000134" class="method-signature">
|
|
123
|
+
|
|
124
|
+
<span class="method-name">nesting?</span><span class="method-args">()</span>
|
|
125
|
+
|
|
126
|
+
</a>
|
|
127
|
+
|
|
128
|
+
</div>
|
|
129
|
+
|
|
130
|
+
<div class="method-description">
|
|
131
|
+
|
|
132
|
+
<p><a class="source-toggle" href="#"
|
|
133
|
+
onclick="toggleCode('M000134-source');return false;">[Source]</a></p>
|
|
134
|
+
<div class="method-source-code" id="M000134-source">
|
|
135
|
+
<pre>
|
|
136
|
+
<span class="ruby-comment cmt"># File lib/wee/html_brushes.rb, line 158</span>
|
|
137
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">nesting?</span>() <span class="ruby-keyword kw">false</span> <span class="ruby-keyword kw">end</span>
|
|
138
|
+
</pre>
|
|
139
|
+
</div>
|
|
140
|
+
|
|
141
|
+
</div>
|
|
142
|
+
</div>
|
|
143
|
+
|
|
144
|
+
|
|
145
|
+
<h3 class="section-bar">Public Instance methods</h3>
|
|
146
|
+
|
|
147
|
+
|
|
148
|
+
<div id="method-M000133" class="method-detail">
|
|
149
|
+
<a name="M000133"></a>
|
|
113
150
|
|
|
114
151
|
<div class="method-heading">
|
|
115
|
-
|
|
116
|
-
<
|
|
152
|
+
|
|
153
|
+
<a href="#M000133" class="method-signature">
|
|
154
|
+
|
|
155
|
+
<span class="method-name">with</span><span class="method-args">()</span>
|
|
156
|
+
|
|
117
157
|
</a>
|
|
158
|
+
|
|
118
159
|
</div>
|
|
119
|
-
|
|
160
|
+
|
|
120
161
|
<div class="method-description">
|
|
162
|
+
|
|
121
163
|
<p><a class="source-toggle" href="#"
|
|
122
|
-
onclick="toggleCode('
|
|
123
|
-
<div class="method-source-code" id="
|
|
164
|
+
onclick="toggleCode('M000133-source');return false;">[Source]</a></p>
|
|
165
|
+
<div class="method-source-code" id="M000133-source">
|
|
124
166
|
<pre>
|
|
125
|
-
<span class="ruby-comment cmt"># File lib/wee/
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
167
|
+
<span class="ruby-comment cmt"># File lib/wee/html_brushes.rb, line 153</span>
|
|
168
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">with</span>
|
|
169
|
+
<span class="ruby-ivar">@document</span>.<span class="ruby-identifier">single_tag</span>(<span class="ruby-ivar">@tag</span>, <span class="ruby-ivar">@attributes</span>)
|
|
170
|
+
<span class="ruby-ivar">@document</span> = <span class="ruby-ivar">@canvas</span> = <span class="ruby-keyword kw">nil</span>
|
|
171
|
+
<span class="ruby-keyword kw">end</span>
|
|
129
172
|
</pre>
|
|
130
173
|
</div>
|
|
174
|
+
|
|
131
175
|
</div>
|
|
132
176
|
</div>
|
|
133
177
|
|
|
134
178
|
|
|
179
|
+
|
|
135
180
|
</div>
|
|
136
181
|
|
|
137
182
|
|
|
138
|
-
</div>
|
|
139
183
|
|
|
140
184
|
|
|
185
|
+
</div>
|
|
186
|
+
|
|
141
187
|
<div id="validator-badges">
|
|
142
188
|
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
|
143
189
|
</div>
|
|
144
190
|
|
|
145
191
|
</body>
|
|
146
|
-
</html>
|
|
192
|
+
</html>
|
|
@@ -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::Brush::GenericTagBrush</title>
|
|
9
|
-
<meta http-equiv="Content-Type" content="text/html; charset=
|
|
5
|
+
<title>Class: Wee::Brush::GenericTagBrush [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,503 +51,531 @@
|
|
|
55
51
|
<tr class="top-aligned-row">
|
|
56
52
|
<td><strong>In:</strong></td>
|
|
57
53
|
<td>
|
|
58
|
-
|
|
59
|
-
|
|
54
|
+
|
|
55
|
+
|
|
56
|
+
<a href="../../../files/lib/wee/html_brushes_rb.html">
|
|
57
|
+
|
|
58
|
+
lib/wee/html_brushes.rb
|
|
59
|
+
|
|
60
60
|
</a>
|
|
61
|
+
|
|
62
|
+
|
|
61
63
|
<br />
|
|
64
|
+
|
|
62
65
|
</td>
|
|
63
66
|
</tr>
|
|
64
67
|
|
|
68
|
+
|
|
65
69
|
<tr class="top-aligned-row">
|
|
66
70
|
<td><strong>Parent:</strong></td>
|
|
67
71
|
<td>
|
|
68
|
-
|
|
72
|
+
|
|
73
|
+
<a href="../Brush.html">
|
|
74
|
+
|
|
75
|
+
Wee::Brush
|
|
76
|
+
|
|
77
|
+
</a>
|
|
78
|
+
|
|
69
79
|
</td>
|
|
70
80
|
</tr>
|
|
81
|
+
|
|
71
82
|
</table>
|
|
72
83
|
</div>
|
|
73
84
|
<!-- banner header -->
|
|
74
85
|
|
|
75
86
|
<div id="bodyContent">
|
|
76
87
|
|
|
77
|
-
|
|
78
|
-
|
|
79
88
|
<div id="contextContent">
|
|
80
89
|
|
|
81
|
-
|
|
82
|
-
|
|
83
90
|
</div>
|
|
84
91
|
|
|
92
|
+
|
|
85
93
|
<div id="method-list">
|
|
86
94
|
<h3 class="section-bar">Methods</h3>
|
|
87
95
|
|
|
88
96
|
<div class="name-list">
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
97
|
+
|
|
98
|
+
<a href="#M000126">get_oid</a>
|
|
99
|
+
|
|
100
|
+
<a href="#M000123">html_attr</a>
|
|
101
|
+
|
|
102
|
+
<a href="#M000124">new</a>
|
|
103
|
+
|
|
104
|
+
<a href="#M000125">oid</a>
|
|
105
|
+
|
|
106
|
+
<a href="#M000128">onclick_callback</a>
|
|
107
|
+
|
|
108
|
+
<a href="#M000127">onclick_javascript</a>
|
|
109
|
+
|
|
110
|
+
<a href="#M000131">onclick_update_callback</a>
|
|
111
|
+
|
|
112
|
+
<a href="#M000130">onclick_update_self_callback</a>
|
|
113
|
+
|
|
114
|
+
<a href="#M000129">ondblclick_callback</a>
|
|
115
|
+
|
|
116
|
+
<a href="#M000132">with</a>
|
|
117
|
+
|
|
104
118
|
</div>
|
|
105
119
|
</div>
|
|
106
120
|
|
|
107
121
|
</div>
|
|
108
122
|
|
|
109
|
-
|
|
110
123
|
<!-- if includes -->
|
|
111
124
|
|
|
112
125
|
<div id="section">
|
|
113
126
|
|
|
114
127
|
|
|
115
128
|
|
|
129
|
+
<div id="attribute-list">
|
|
130
|
+
<h3 class="section-bar">Attributes</h3>
|
|
131
|
+
|
|
132
|
+
<div class="name-list">
|
|
133
|
+
<table>
|
|
134
|
+
|
|
135
|
+
<tr class="top-aligned-row context-row">
|
|
136
|
+
<td class="context-item-name">css_class</td>
|
|
137
|
+
|
|
138
|
+
<td class="context-item-value"> [HtmlAttribute] </td>
|
|
139
|
+
|
|
140
|
+
<td class="context-item-desc"></td>
|
|
141
|
+
</tr>
|
|
142
|
+
|
|
143
|
+
<tr class="top-aligned-row context-row">
|
|
144
|
+
<td class="context-item-name">css_style</td>
|
|
145
|
+
|
|
146
|
+
<td class="context-item-value"> [HtmlAttribute] </td>
|
|
147
|
+
|
|
148
|
+
<td class="context-item-desc"></td>
|
|
149
|
+
</tr>
|
|
150
|
+
|
|
151
|
+
<tr class="top-aligned-row context-row">
|
|
152
|
+
<td class="context-item-name">html_name</td>
|
|
153
|
+
|
|
154
|
+
<td class="context-item-value"> [HtmlAttribute] </td>
|
|
155
|
+
|
|
156
|
+
<td class="context-item-desc"></td>
|
|
157
|
+
</tr>
|
|
158
|
+
|
|
159
|
+
<tr class="top-aligned-row context-row">
|
|
160
|
+
<td class="context-item-name">html_name</td>
|
|
161
|
+
|
|
162
|
+
<td class="context-item-value"> [HtmlAttribute] </td>
|
|
163
|
+
|
|
164
|
+
<td class="context-item-desc"></td>
|
|
165
|
+
</tr>
|
|
166
|
+
|
|
167
|
+
<tr class="top-aligned-row context-row">
|
|
168
|
+
<td class="context-item-name">id</td>
|
|
169
|
+
|
|
170
|
+
<td class="context-item-value"> [HtmlAttribute] </td>
|
|
171
|
+
|
|
172
|
+
<td class="context-item-desc"></td>
|
|
173
|
+
</tr>
|
|
174
|
+
|
|
175
|
+
<tr class="top-aligned-row context-row">
|
|
176
|
+
<td class="context-item-name">name</td>
|
|
177
|
+
|
|
178
|
+
<td class="context-item-value"> [HtmlAttribute] </td>
|
|
179
|
+
|
|
180
|
+
<td class="context-item-desc"></td>
|
|
181
|
+
</tr>
|
|
182
|
+
|
|
183
|
+
<tr class="top-aligned-row context-row">
|
|
184
|
+
<td class="context-item-name">onclick</td>
|
|
185
|
+
|
|
186
|
+
<td class="context-item-value"> [HtmlAttribute] </td>
|
|
116
187
|
|
|
188
|
+
<td class="context-item-desc"></td>
|
|
189
|
+
</tr>
|
|
117
190
|
|
|
118
|
-
|
|
191
|
+
<tr class="top-aligned-row context-row">
|
|
192
|
+
<td class="context-item-name">ondblclick</td>
|
|
193
|
+
|
|
194
|
+
<td class="context-item-value"> [HtmlAttribute] </td>
|
|
195
|
+
|
|
196
|
+
<td class="context-item-desc"></td>
|
|
197
|
+
</tr>
|
|
198
|
+
|
|
199
|
+
</table>
|
|
200
|
+
</div>
|
|
201
|
+
</div>
|
|
119
202
|
|
|
120
203
|
|
|
121
204
|
<!-- if method_list -->
|
|
205
|
+
|
|
122
206
|
<div id="methods">
|
|
207
|
+
|
|
123
208
|
<h3 class="section-bar">Public Class methods</h3>
|
|
124
209
|
|
|
125
|
-
|
|
126
|
-
|
|
210
|
+
|
|
211
|
+
<div id="method-M000123" class="method-detail">
|
|
212
|
+
<a name="M000123"></a>
|
|
127
213
|
|
|
128
214
|
<div class="method-heading">
|
|
129
|
-
<a href="#M000229" class="method-signature">
|
|
130
|
-
<span class="method-name">new</span><span class="method-args">(tag, is_single_tag=false)</span>
|
|
131
|
-
</a>
|
|
132
|
-
</div>
|
|
133
|
-
|
|
134
|
-
<div class="method-description">
|
|
135
|
-
<p><a class="source-toggle" href="#"
|
|
136
|
-
onclick="toggleCode('M000229-source');return false;">[Source]</a></p>
|
|
137
|
-
<div class="method-source-code" id="M000229-source">
|
|
138
|
-
<pre>
|
|
139
|
-
<span class="ruby-comment cmt"># File lib/wee/renderer/html/brushes.rb, line 136</span>
|
|
140
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">tag</span>, <span class="ruby-identifier">is_single_tag</span>=<span class="ruby-keyword kw">false</span>)
|
|
141
|
-
<span class="ruby-keyword kw">super</span>()
|
|
142
|
-
<span class="ruby-ivar">@tag</span>, <span class="ruby-ivar">@is_single_tag</span> = <span class="ruby-identifier">tag</span>, <span class="ruby-identifier">is_single_tag</span>
|
|
143
|
-
<span class="ruby-ivar">@attributes</span> = <span class="ruby-constant">Hash</span>.<span class="ruby-identifier">new</span>
|
|
144
|
-
<span class="ruby-keyword kw">end</span>
|
|
145
|
-
</pre>
|
|
146
|
-
</div>
|
|
147
|
-
</div>
|
|
148
|
-
</div>
|
|
149
215
|
|
|
150
|
-
|
|
216
|
+
<a href="#M000123" class="method-signature">
|
|
151
217
|
|
|
152
|
-
|
|
153
|
-
<a name="M000220"></a>
|
|
218
|
+
<span class="method-name">html_attr</span><span class="method-args">(attr, hash={})</span>
|
|
154
219
|
|
|
155
|
-
<div class="method-heading">
|
|
156
|
-
<a href="#M000220" class="method-signature">
|
|
157
|
-
<span class="method-name">bool_attr</span><span class="method-args">(*attrs)</span>
|
|
158
220
|
</a>
|
|
221
|
+
|
|
159
222
|
</div>
|
|
160
|
-
|
|
223
|
+
|
|
161
224
|
<div class="method-description">
|
|
225
|
+
|
|
162
226
|
<p><a class="source-toggle" href="#"
|
|
163
|
-
onclick="toggleCode('
|
|
164
|
-
<div class="method-source-code" id="
|
|
227
|
+
onclick="toggleCode('M000123-source');return false;">[Source]</a></p>
|
|
228
|
+
<div class="method-source-code" id="M000123-source">
|
|
165
229
|
<pre>
|
|
166
|
-
<span class="ruby-comment cmt"># File lib/wee/
|
|
167
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">
|
|
168
|
-
<span class="ruby-identifier">
|
|
169
|
-
|
|
170
|
-
|
|
230
|
+
<span class="ruby-comment cmt"># File lib/wee/html_brushes.rb, line 49</span>
|
|
231
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">html_attr</span>(<span class="ruby-identifier">attr</span>, <span class="ruby-identifier">hash</span>={})
|
|
232
|
+
<span class="ruby-identifier">name</span> = <span class="ruby-identifier">hash</span>[<span class="ruby-identifier">:html_name</span>] <span class="ruby-operator">||</span> <span class="ruby-identifier">attr</span>
|
|
233
|
+
<span class="ruby-keyword kw">if</span> <span class="ruby-identifier">hash</span>[<span class="ruby-identifier">:type</span>] <span class="ruby-operator">==</span> <span class="ruby-identifier">:bool</span>
|
|
234
|
+
<span class="ruby-identifier">class_eval</span> <span class="ruby-node">%{
|
|
235
|
+
def #{ attr }(bool=true)
|
|
171
236
|
if bool
|
|
172
|
-
@attributes[
|
|
237
|
+
@attributes[:"#{ name }"] = nil
|
|
173
238
|
else
|
|
174
|
-
@attributes.delete(
|
|
239
|
+
@attributes.delete(:"#{ name }")
|
|
175
240
|
end
|
|
176
241
|
self
|
|
177
242
|
end
|
|
178
|
-
|
|
179
|
-
|
|
243
|
+
}</span>
|
|
244
|
+
<span class="ruby-keyword kw">else</span>
|
|
245
|
+
<span class="ruby-identifier">class_eval</span> <span class="ruby-node">%{
|
|
246
|
+
def #{ attr }(value)
|
|
247
|
+
if value == nil
|
|
248
|
+
@attributes.delete(:"#{ name }")
|
|
249
|
+
else
|
|
250
|
+
@attributes[:"#{ name }"] = value
|
|
251
|
+
end
|
|
252
|
+
self
|
|
253
|
+
end
|
|
254
|
+
}</span>
|
|
255
|
+
<span class="ruby-keyword kw">end</span>
|
|
256
|
+
|
|
257
|
+
(<span class="ruby-identifier">hash</span>[<span class="ruby-identifier">:aliases</span>] <span class="ruby-operator">||</span> []).<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">a</span><span class="ruby-operator">|</span>
|
|
258
|
+
<span class="ruby-identifier">class_eval</span> <span class="ruby-node">"alias #{ a } #{ attr }"</span>
|
|
259
|
+
<span class="ruby-keyword kw">end</span>
|
|
260
|
+
|
|
261
|
+
(<span class="ruby-identifier">hash</span>[<span class="ruby-identifier">:shortcuts</span>] <span class="ruby-operator">||</span> {}).<span class="ruby-identifier">each_pair</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">k</span>, <span class="ruby-identifier">v</span><span class="ruby-operator">|</span>
|
|
262
|
+
<span class="ruby-identifier">class_eval</span> <span class="ruby-node">"def #{ k }() #{ attr }(#{ v.inspect }) end"</span>
|
|
263
|
+
<span class="ruby-keyword kw">end</span>
|
|
180
264
|
<span class="ruby-keyword kw">end</span>
|
|
181
265
|
</pre>
|
|
182
266
|
</div>
|
|
267
|
+
|
|
183
268
|
</div>
|
|
184
269
|
</div>
|
|
185
270
|
|
|
186
|
-
|
|
187
|
-
|
|
271
|
+
|
|
272
|
+
<div id="method-M000124" class="method-detail">
|
|
273
|
+
<a name="M000124"></a>
|
|
188
274
|
|
|
189
275
|
<div class="method-heading">
|
|
190
|
-
|
|
191
|
-
<
|
|
276
|
+
|
|
277
|
+
<a href="#M000124" class="method-signature">
|
|
278
|
+
|
|
279
|
+
<span class="method-name">new</span><span class="method-args">(tag)</span>
|
|
280
|
+
|
|
192
281
|
</a>
|
|
282
|
+
|
|
193
283
|
</div>
|
|
194
|
-
|
|
284
|
+
|
|
195
285
|
<div class="method-description">
|
|
286
|
+
|
|
196
287
|
<p><a class="source-toggle" href="#"
|
|
197
|
-
onclick="toggleCode('
|
|
198
|
-
<div class="method-source-code" id="
|
|
288
|
+
onclick="toggleCode('M000124-source');return false;">[Source]</a></p>
|
|
289
|
+
<div class="method-source-code" id="M000124-source">
|
|
199
290
|
<pre>
|
|
200
|
-
<span class="ruby-comment cmt"># File lib/wee/
|
|
201
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">
|
|
202
|
-
<span class="ruby-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
html_attr('#{ a }', value)
|
|
206
|
-
end
|
|
207
|
-
"</span>
|
|
208
|
-
}
|
|
291
|
+
<span class="ruby-comment cmt"># File lib/wee/html_brushes.rb, line 93</span>
|
|
292
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">tag</span>)
|
|
293
|
+
<span class="ruby-keyword kw">super</span>()
|
|
294
|
+
<span class="ruby-ivar">@tag</span> = <span class="ruby-identifier">tag</span>
|
|
295
|
+
<span class="ruby-ivar">@attributes</span> = <span class="ruby-constant">Hash</span>.<span class="ruby-identifier">new</span>
|
|
209
296
|
<span class="ruby-keyword kw">end</span>
|
|
210
297
|
</pre>
|
|
211
298
|
</div>
|
|
299
|
+
|
|
212
300
|
</div>
|
|
213
301
|
</div>
|
|
214
302
|
|
|
303
|
+
|
|
215
304
|
<h3 class="section-bar">Public Instance methods</h3>
|
|
216
305
|
|
|
217
|
-
|
|
218
|
-
|
|
306
|
+
|
|
307
|
+
<div id="method-M000126" class="method-detail">
|
|
308
|
+
<a name="M000126"></a>
|
|
219
309
|
|
|
220
310
|
<div class="method-heading">
|
|
221
|
-
<a href="#M000225" class="method-signature">
|
|
222
|
-
<span class="method-name">__action_callback</span><span class="method-args">(symbol=nil, *args, &block)</span>
|
|
223
|
-
</a>
|
|
224
|
-
</div>
|
|
225
|
-
|
|
226
|
-
<div class="method-description">
|
|
227
|
-
<p><a class="source-toggle" href="#"
|
|
228
|
-
onclick="toggleCode('M000225-source');return false;">[Source]</a></p>
|
|
229
|
-
<div class="method-source-code" id="M000225-source">
|
|
230
|
-
<pre>
|
|
231
|
-
<span class="ruby-comment cmt"># File lib/wee/renderer/html/brushes.rb, line 116</span>
|
|
232
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">__action_callback</span>(<span class="ruby-identifier">symbol</span>=<span class="ruby-keyword kw">nil</span>, <span class="ruby-operator">*</span><span class="ruby-identifier">args</span>, <span class="ruby-operator">&</span><span class="ruby-identifier">block</span>)
|
|
233
|
-
<span class="ruby-identifier">name</span>(<span class="ruby-ivar">@canvas</span>.<span class="ruby-identifier">register_callback</span>(<span class="ruby-identifier">:action</span>, <span class="ruby-identifier">to_callback</span>(<span class="ruby-identifier">symbol</span>, <span class="ruby-identifier">args</span>, <span class="ruby-identifier">block</span>)))
|
|
234
|
-
<span class="ruby-keyword kw">end</span>
|
|
235
|
-
</pre>
|
|
236
|
-
</div>
|
|
237
|
-
</div>
|
|
238
|
-
</div>
|
|
239
311
|
|
|
240
|
-
|
|
241
|
-
|
|
312
|
+
<a href="#M000126" class="method-signature">
|
|
313
|
+
|
|
314
|
+
<span class="method-name">get_oid</span><span class="method-args">()</span>
|
|
242
315
|
|
|
243
|
-
<div class="method-heading">
|
|
244
|
-
<a href="#M000226" class="method-signature">
|
|
245
|
-
<span class="method-name">__actionurl_callback</span><span class="method-args">(symbol=nil, *args, &block)</span>
|
|
246
316
|
</a>
|
|
317
|
+
|
|
247
318
|
</div>
|
|
248
|
-
|
|
319
|
+
|
|
249
320
|
<div class="method-description">
|
|
321
|
+
|
|
250
322
|
<p>
|
|
251
|
-
|
|
323
|
+
Returns a unique DOM id for the underlying component
|
|
252
324
|
</p>
|
|
325
|
+
|
|
253
326
|
<p><a class="source-toggle" href="#"
|
|
254
|
-
onclick="toggleCode('
|
|
255
|
-
<div class="method-source-code" id="
|
|
327
|
+
onclick="toggleCode('M000126-source');return false;">[Source]</a></p>
|
|
328
|
+
<div class="method-source-code" id="M000126-source">
|
|
256
329
|
<pre>
|
|
257
|
-
<span class="ruby-comment cmt"># File lib/wee/
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
330
|
+
<span class="ruby-comment cmt"># File lib/wee/html_brushes.rb, line 109</span>
|
|
331
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">get_oid</span>
|
|
332
|
+
<span class="ruby-node">"wee_#{@canvas.current_component.object_id}"</span>
|
|
333
|
+
<span class="ruby-keyword kw">end</span>
|
|
261
334
|
</pre>
|
|
262
335
|
</div>
|
|
336
|
+
|
|
263
337
|
</div>
|
|
264
338
|
</div>
|
|
265
339
|
|
|
266
|
-
|
|
267
|
-
|
|
340
|
+
|
|
341
|
+
<div id="method-M000125" class="method-detail">
|
|
342
|
+
<a name="M000125"></a>
|
|
268
343
|
|
|
269
344
|
<div class="method-heading">
|
|
270
|
-
|
|
271
|
-
<
|
|
345
|
+
|
|
346
|
+
<a href="#M000125" class="method-signature">
|
|
347
|
+
|
|
348
|
+
<span class="method-name">oid</span><span class="method-args">()</span>
|
|
349
|
+
|
|
272
350
|
</a>
|
|
351
|
+
|
|
273
352
|
</div>
|
|
274
|
-
|
|
353
|
+
|
|
275
354
|
<div class="method-description">
|
|
355
|
+
|
|
276
356
|
<p>
|
|
277
|
-
|
|
357
|
+
Assigns a unique DOM id
|
|
278
358
|
</p>
|
|
359
|
+
|
|
279
360
|
<p><a class="source-toggle" href="#"
|
|
280
|
-
onclick="toggleCode('
|
|
281
|
-
<div class="method-source-code" id="
|
|
361
|
+
onclick="toggleCode('M000125-source');return false;">[Source]</a></p>
|
|
362
|
+
<div class="method-source-code" id="M000125-source">
|
|
282
363
|
<pre>
|
|
283
|
-
<span class="ruby-comment cmt"># File lib/wee/
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
364
|
+
<span class="ruby-comment cmt"># File lib/wee/html_brushes.rb, line 102</span>
|
|
365
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">oid</span>
|
|
366
|
+
<span class="ruby-identifier">id</span>(<span class="ruby-identifier">get_oid</span>())
|
|
367
|
+
<span class="ruby-keyword kw">end</span>
|
|
287
368
|
</pre>
|
|
288
369
|
</div>
|
|
370
|
+
|
|
289
371
|
</div>
|
|
290
372
|
</div>
|
|
291
373
|
|
|
292
|
-
|
|
293
|
-
|
|
374
|
+
|
|
375
|
+
<div id="method-M000128" class="method-detail">
|
|
376
|
+
<a name="M000128"></a>
|
|
294
377
|
|
|
295
378
|
<div class="method-heading">
|
|
296
|
-
<a href="#M000224" class="method-signature">
|
|
297
|
-
<span class="method-name">__input_callback</span><span class="method-args">(symbol=nil, *args, &block)</span>
|
|
298
|
-
</a>
|
|
299
|
-
</div>
|
|
300
|
-
|
|
301
|
-
<div class="method-description">
|
|
302
|
-
<p><a class="source-toggle" href="#"
|
|
303
|
-
onclick="toggleCode('M000224-source');return false;">[Source]</a></p>
|
|
304
|
-
<div class="method-source-code" id="M000224-source">
|
|
305
|
-
<pre>
|
|
306
|
-
<span class="ruby-comment cmt"># File lib/wee/renderer/html/brushes.rb, line 112</span>
|
|
307
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">__input_callback</span>(<span class="ruby-identifier">symbol</span>=<span class="ruby-keyword kw">nil</span>, <span class="ruby-operator">*</span><span class="ruby-identifier">args</span>, <span class="ruby-operator">&</span><span class="ruby-identifier">block</span>)
|
|
308
|
-
<span class="ruby-identifier">name</span>(<span class="ruby-ivar">@canvas</span>.<span class="ruby-identifier">register_callback</span>(<span class="ruby-identifier">:input</span>, <span class="ruby-identifier">to_callback</span>(<span class="ruby-identifier">symbol</span>, <span class="ruby-identifier">args</span>, <span class="ruby-identifier">block</span>)))
|
|
309
|
-
<span class="ruby-keyword kw">end</span>
|
|
310
|
-
</pre>
|
|
311
|
-
</div>
|
|
312
|
-
</div>
|
|
313
|
-
</div>
|
|
314
379
|
|
|
315
|
-
|
|
316
|
-
|
|
380
|
+
<a href="#M000128" class="method-signature">
|
|
381
|
+
|
|
382
|
+
<span class="method-name">onclick_callback</span><span class="method-args">(&block)</span>
|
|
317
383
|
|
|
318
|
-
<div class="method-heading">
|
|
319
|
-
<a href="#M000230" class="method-signature">
|
|
320
|
-
<span class="method-name">css_class</span><span class="method-args">(c)</span>
|
|
321
384
|
</a>
|
|
385
|
+
|
|
322
386
|
</div>
|
|
323
|
-
|
|
387
|
+
|
|
324
388
|
<div class="method-description">
|
|
389
|
+
|
|
325
390
|
<p><a class="source-toggle" href="#"
|
|
326
|
-
onclick="toggleCode('
|
|
327
|
-
<div class="method-source-code" id="
|
|
391
|
+
onclick="toggleCode('M000128-source');return false;">[Source]</a></p>
|
|
392
|
+
<div class="method-source-code" id="M000128-source">
|
|
328
393
|
<pre>
|
|
329
|
-
<span class="ruby-comment cmt"># File lib/wee/
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
394
|
+
<span class="ruby-comment cmt"># File lib/wee/html_brushes.rb, line 117</span>
|
|
395
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">onclick_callback</span>(<span class="ruby-operator">&</span><span class="ruby-identifier">block</span>)
|
|
396
|
+
<span class="ruby-identifier">url</span> = <span class="ruby-ivar">@canvas</span>.<span class="ruby-identifier">url_for_callback</span>(<span class="ruby-identifier">block</span>)
|
|
397
|
+
<span class="ruby-identifier">onclick</span>(<span class="ruby-node">"javascript: document.location.href='#{ url }'"</span>)
|
|
398
|
+
<span class="ruby-keyword kw">end</span>
|
|
333
399
|
</pre>
|
|
334
400
|
</div>
|
|
401
|
+
|
|
335
402
|
</div>
|
|
336
403
|
</div>
|
|
337
404
|
|
|
338
|
-
|
|
339
|
-
|
|
405
|
+
|
|
406
|
+
<div id="method-M000127" class="method-detail">
|
|
407
|
+
<a name="M000127"></a>
|
|
340
408
|
|
|
341
409
|
<div class="method-heading">
|
|
342
|
-
<a href="#M000233" class="method-signature">
|
|
343
|
-
<span class="method-name">css_class_for</span><span class="method-args">(prop)</span>
|
|
344
|
-
</a>
|
|
345
|
-
</div>
|
|
346
|
-
|
|
347
|
-
<div class="method-description">
|
|
348
|
-
<p>
|
|
349
|
-
This method construct the css-class attribute by looking up the property
|
|
350
|
-
from the current component.
|
|
351
|
-
</p>
|
|
352
|
-
<p><a class="source-toggle" href="#"
|
|
353
|
-
onclick="toggleCode('M000233-source');return false;">[Source]</a></p>
|
|
354
|
-
<div class="method-source-code" id="M000233-source">
|
|
355
|
-
<pre>
|
|
356
|
-
<span class="ruby-comment cmt"># File lib/wee/renderer/html/brushes.rb, line 163</span>
|
|
357
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">css_class_for</span>(<span class="ruby-identifier">prop</span>)
|
|
358
|
-
<span class="ruby-identifier">val</span> = <span class="ruby-ivar">@canvas</span>.<span class="ruby-identifier">current_component</span>.<span class="ruby-identifier">lookup_property</span>(<span class="ruby-identifier">prop</span>)
|
|
359
|
-
<span class="ruby-identifier">raise</span> <span class="ruby-node">"no property found for: <#{ prop }>"</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">val</span>.<span class="ruby-identifier">nil?</span>
|
|
360
|
-
<span class="ruby-identifier">css_class</span>(<span class="ruby-identifier">val</span>)
|
|
361
|
-
<span class="ruby-keyword kw">end</span>
|
|
362
|
-
</pre>
|
|
363
|
-
</div>
|
|
364
|
-
</div>
|
|
365
|
-
</div>
|
|
366
410
|
|
|
367
|
-
|
|
368
|
-
|
|
411
|
+
<a href="#M000127" class="method-signature">
|
|
412
|
+
|
|
413
|
+
<span class="method-name">onclick_javascript</span><span class="method-args">(v)</span>
|
|
369
414
|
|
|
370
|
-
<div class="method-heading">
|
|
371
|
-
<a href="#M000228" class="method-signature">
|
|
372
|
-
<span class="method-name">method_missing</span><span class="method-args">(id, attr)</span>
|
|
373
415
|
</a>
|
|
416
|
+
|
|
374
417
|
</div>
|
|
375
|
-
|
|
418
|
+
|
|
376
419
|
<div class="method-description">
|
|
420
|
+
|
|
377
421
|
<p><a class="source-toggle" href="#"
|
|
378
|
-
onclick="toggleCode('
|
|
379
|
-
<div class="method-source-code" id="
|
|
422
|
+
onclick="toggleCode('M000127-source');return false;">[Source]</a></p>
|
|
423
|
+
<div class="method-source-code" id="M000127-source">
|
|
380
424
|
<pre>
|
|
381
|
-
<span class="ruby-comment cmt"># File lib/wee/
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
425
|
+
<span class="ruby-comment cmt"># File lib/wee/html_brushes.rb, line 113</span>
|
|
426
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">onclick_javascript</span>(<span class="ruby-identifier">v</span>)
|
|
427
|
+
<span class="ruby-identifier">onclick</span>(<span class="ruby-node">"javascript: #{v}"</span>)
|
|
428
|
+
<span class="ruby-keyword kw">end</span>
|
|
385
429
|
</pre>
|
|
386
430
|
</div>
|
|
431
|
+
|
|
387
432
|
</div>
|
|
388
433
|
</div>
|
|
389
434
|
|
|
390
|
-
|
|
391
|
-
|
|
435
|
+
|
|
436
|
+
<div id="method-M000131" class="method-detail">
|
|
437
|
+
<a name="M000131"></a>
|
|
392
438
|
|
|
393
439
|
<div class="method-heading">
|
|
394
|
-
<a href="#M000231" class="method-signature">
|
|
395
|
-
<span class="method-name">onclick_callback</span><span class="method-args">(symbol=nil, *args, &block)</span>
|
|
396
|
-
</a>
|
|
397
|
-
</div>
|
|
398
|
-
|
|
399
|
-
<div class="method-description">
|
|
400
|
-
<p><a class="source-toggle" href="#"
|
|
401
|
-
onclick="toggleCode('M000231-source');return false;">[Source]</a></p>
|
|
402
|
-
<div class="method-source-code" id="M000231-source">
|
|
403
|
-
<pre>
|
|
404
|
-
<span class="ruby-comment cmt"># File lib/wee/renderer/html/brushes.rb, line 148</span>
|
|
405
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">onclick_callback</span>(<span class="ruby-identifier">symbol</span>=<span class="ruby-keyword kw">nil</span>, <span class="ruby-operator">*</span><span class="ruby-identifier">args</span>, <span class="ruby-operator">&</span><span class="ruby-identifier">block</span>)
|
|
406
|
-
<span class="ruby-identifier">raise</span> <span class="ruby-constant">ArgumentError</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">symbol</span> <span class="ruby-keyword kw">and</span> <span class="ruby-identifier">block</span>
|
|
407
|
-
<span class="ruby-identifier">url</span> = <span class="ruby-ivar">@canvas</span>.<span class="ruby-identifier">url_for_callback</span>(<span class="ruby-identifier">to_callback</span>(<span class="ruby-identifier">symbol</span>, <span class="ruby-identifier">args</span>, <span class="ruby-identifier">block</span>))
|
|
408
|
-
<span class="ruby-identifier">onclick</span>(<span class="ruby-node">"javascript: document.location.href='#{ url }';"</span>)
|
|
409
|
-
<span class="ruby-keyword kw">end</span>
|
|
410
|
-
</pre>
|
|
411
|
-
</div>
|
|
412
|
-
</div>
|
|
413
|
-
</div>
|
|
414
440
|
|
|
415
|
-
|
|
416
|
-
|
|
441
|
+
<a href="#M000131" class="method-signature">
|
|
442
|
+
|
|
443
|
+
<span class="method-name">onclick_update_callback</span><span class="method-args">(&block)</span>
|
|
417
444
|
|
|
418
|
-
<div class="method-heading">
|
|
419
|
-
<a href="#M000232" class="method-signature">
|
|
420
|
-
<span class="method-name">onclick_update</span><span class="method-args">(update_id, symbol=nil, *args, &block)</span>
|
|
421
445
|
</a>
|
|
446
|
+
|
|
422
447
|
</div>
|
|
423
|
-
|
|
448
|
+
|
|
424
449
|
<div class="method-description">
|
|
450
|
+
|
|
425
451
|
<p><a class="source-toggle" href="#"
|
|
426
|
-
onclick="toggleCode('
|
|
427
|
-
<div class="method-source-code" id="
|
|
452
|
+
onclick="toggleCode('M000131-source');return false;">[Source]</a></p>
|
|
453
|
+
<div class="method-source-code" id="M000131-source">
|
|
428
454
|
<pre>
|
|
429
|
-
<span class="ruby-comment cmt"># File lib/wee/
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
455
|
+
<span class="ruby-comment cmt"># File lib/wee/html_brushes.rb, line 136</span>
|
|
456
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">onclick_update_callback</span>(<span class="ruby-operator">&</span><span class="ruby-identifier">block</span>)
|
|
457
|
+
<span class="ruby-identifier">raise</span> <span class="ruby-constant">ArgumentError</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">block</span>
|
|
458
|
+
<span class="ruby-identifier">url</span> = <span class="ruby-ivar">@canvas</span>.<span class="ruby-identifier">url_for_callback</span>(<span class="ruby-ivar">@canvas</span>.<span class="ruby-identifier">session</span>.<span class="ruby-identifier">render_ajax_proc</span>(<span class="ruby-identifier">block</span>, <span class="ruby-ivar">@canvas</span>.<span class="ruby-identifier">current_component</span>))
|
|
459
|
+
<span class="ruby-identifier">onclick</span>(<span class="ruby-node">"javascript: wee.update('#{url}')"</span>)
|
|
460
|
+
<span class="ruby-keyword kw">end</span>
|
|
435
461
|
</pre>
|
|
436
462
|
</div>
|
|
463
|
+
|
|
437
464
|
</div>
|
|
438
465
|
</div>
|
|
439
466
|
|
|
440
|
-
|
|
441
|
-
|
|
467
|
+
|
|
468
|
+
<div id="method-M000130" class="method-detail">
|
|
469
|
+
<a name="M000130"></a>
|
|
442
470
|
|
|
443
471
|
<div class="method-heading">
|
|
444
|
-
|
|
445
|
-
<
|
|
472
|
+
|
|
473
|
+
<a href="#M000130" class="method-signature">
|
|
474
|
+
|
|
475
|
+
<span class="method-name">onclick_update_self_callback</span><span class="method-args">(&block)</span>
|
|
476
|
+
|
|
446
477
|
</a>
|
|
478
|
+
|
|
447
479
|
</div>
|
|
448
|
-
|
|
480
|
+
|
|
449
481
|
<div class="method-description">
|
|
482
|
+
|
|
450
483
|
<p><a class="source-toggle" href="#"
|
|
451
|
-
onclick="toggleCode('
|
|
452
|
-
<div class="method-source-code" id="
|
|
484
|
+
onclick="toggleCode('M000130-source');return false;">[Source]</a></p>
|
|
485
|
+
<div class="method-source-code" id="M000130-source">
|
|
453
486
|
<pre>
|
|
454
|
-
<span class="ruby-comment cmt"># File lib/wee/
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
<span class="ruby-identifier">
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
<span class="ruby-identifier">doc</span>.<span class="ruby-identifier">start_tag</span>(<span class="ruby-ivar">@tag</span>, <span class="ruby-ivar">@attributes</span>)
|
|
463
|
-
<span class="ruby-keyword kw">if</span> <span class="ruby-identifier">text</span>
|
|
464
|
-
<span class="ruby-identifier">doc</span>.<span class="ruby-identifier">text</span>(<span class="ruby-identifier">text</span>)
|
|
465
|
-
<span class="ruby-keyword kw">super</span>(<span class="ruby-identifier">text</span>, <span class="ruby-operator">&</span><span class="ruby-identifier">block</span>)
|
|
466
|
-
<span class="ruby-keyword kw">else</span>
|
|
467
|
-
<span class="ruby-keyword kw">super</span>(<span class="ruby-operator">&</span><span class="ruby-identifier">block</span>)
|
|
468
|
-
<span class="ruby-keyword kw">end</span>
|
|
469
|
-
<span class="ruby-identifier">doc</span>.<span class="ruby-identifier">end_tag</span>(<span class="ruby-ivar">@tag</span>)
|
|
487
|
+
<span class="ruby-comment cmt"># File lib/wee/html_brushes.rb, line 127</span>
|
|
488
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">onclick_update_self_callback</span>(<span class="ruby-operator">&</span><span class="ruby-identifier">block</span>)
|
|
489
|
+
<span class="ruby-identifier">raise</span> <span class="ruby-constant">ArgumentError</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">block</span>
|
|
490
|
+
<span class="ruby-identifier">current_component</span> = <span class="ruby-ivar">@canvas</span>.<span class="ruby-identifier">current_component</span>
|
|
491
|
+
<span class="ruby-identifier">onclick_update_callback</span> {<span class="ruby-operator">|</span><span class="ruby-identifier">r</span><span class="ruby-operator">|</span>
|
|
492
|
+
<span class="ruby-identifier">block</span>.<span class="ruby-identifier">call</span>(<span class="ruby-identifier">r</span>)
|
|
493
|
+
<span class="ruby-identifier">r</span>.<span class="ruby-identifier">update</span>(<span class="ruby-identifier">current_component</span>)
|
|
494
|
+
}
|
|
470
495
|
<span class="ruby-keyword kw">end</span>
|
|
471
|
-
<span class="ruby-keyword kw">nil</span>
|
|
472
|
-
<span class="ruby-keyword kw">end</span>
|
|
473
496
|
</pre>
|
|
474
497
|
</div>
|
|
498
|
+
|
|
475
499
|
</div>
|
|
476
500
|
</div>
|
|
477
501
|
|
|
478
|
-
<h3 class="section-bar">Private Instance methods</h3>
|
|
479
502
|
|
|
480
|
-
<div id="method-
|
|
481
|
-
<a name="
|
|
503
|
+
<div id="method-M000129" class="method-detail">
|
|
504
|
+
<a name="M000129"></a>
|
|
482
505
|
|
|
483
506
|
<div class="method-heading">
|
|
484
|
-
|
|
485
|
-
<
|
|
507
|
+
|
|
508
|
+
<a href="#M000129" class="method-signature">
|
|
509
|
+
|
|
510
|
+
<span class="method-name">ondblclick_callback</span><span class="method-args">(&block)</span>
|
|
511
|
+
|
|
486
512
|
</a>
|
|
513
|
+
|
|
487
514
|
</div>
|
|
488
|
-
|
|
515
|
+
|
|
489
516
|
<div class="method-description">
|
|
517
|
+
|
|
490
518
|
<p><a class="source-toggle" href="#"
|
|
491
|
-
onclick="toggleCode('
|
|
492
|
-
<div class="method-source-code" id="
|
|
519
|
+
onclick="toggleCode('M000129-source');return false;">[Source]</a></p>
|
|
520
|
+
<div class="method-source-code" id="M000129-source">
|
|
493
521
|
<pre>
|
|
494
|
-
<span class="ruby-comment cmt"># File lib/wee/
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
<span class="ruby-
|
|
498
|
-
<span class="ruby-keyword kw">else</span>
|
|
499
|
-
<span class="ruby-ivar">@attributes</span>[<span class="ruby-identifier">attr</span>] = <span class="ruby-identifier">value</span>.<span class="ruby-identifier">to_s</span>
|
|
522
|
+
<span class="ruby-comment cmt"># File lib/wee/html_brushes.rb, line 122</span>
|
|
523
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">ondblclick_callback</span>(<span class="ruby-operator">&</span><span class="ruby-identifier">block</span>)
|
|
524
|
+
<span class="ruby-identifier">url</span> = <span class="ruby-ivar">@canvas</span>.<span class="ruby-identifier">url_for_callback</span>(<span class="ruby-identifier">block</span>)
|
|
525
|
+
<span class="ruby-identifier">ondblclick</span>(<span class="ruby-node">"javascript: document.location.href='#{ url }'"</span>)
|
|
500
526
|
<span class="ruby-keyword kw">end</span>
|
|
501
|
-
<span class="ruby-keyword kw">self</span>
|
|
502
|
-
<span class="ruby-keyword kw">end</span>
|
|
503
527
|
</pre>
|
|
504
528
|
</div>
|
|
529
|
+
|
|
505
530
|
</div>
|
|
506
531
|
</div>
|
|
507
532
|
|
|
508
|
-
|
|
509
|
-
|
|
533
|
+
|
|
534
|
+
<div id="method-M000132" class="method-detail">
|
|
535
|
+
<a name="M000132"></a>
|
|
510
536
|
|
|
511
537
|
<div class="method-heading">
|
|
512
|
-
|
|
513
|
-
<
|
|
538
|
+
|
|
539
|
+
<a href="#M000132" class="method-signature">
|
|
540
|
+
|
|
541
|
+
<span class="method-name">with</span><span class="method-args">(text=nil, &block)</span>
|
|
542
|
+
|
|
514
543
|
</a>
|
|
544
|
+
|
|
515
545
|
</div>
|
|
516
|
-
|
|
546
|
+
|
|
517
547
|
<div class="method-description">
|
|
518
|
-
|
|
519
|
-
Converts the arguments into a callable object.
|
|
520
|
-
</p>
|
|
548
|
+
|
|
521
549
|
<p><a class="source-toggle" href="#"
|
|
522
|
-
onclick="toggleCode('
|
|
523
|
-
<div class="method-source-code" id="
|
|
550
|
+
onclick="toggleCode('M000132-source');return false;">[Source]</a></p>
|
|
551
|
+
<div class="method-source-code" id="M000132-source">
|
|
524
552
|
<pre>
|
|
525
|
-
<span class="ruby-comment cmt"># File lib/wee/
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
<span class="ruby-
|
|
530
|
-
<span class="ruby-identifier">
|
|
531
|
-
|
|
532
|
-
<span class="ruby-keyword kw">if</span> <span class="ruby-identifier">symbol</span>.<span class="ruby-identifier">is_a?</span>(<span class="ruby-constant">Symbol</span>) <span class="ruby-keyword kw">or</span> <span class="ruby-identifier">symbol</span>.<span class="ruby-identifier">is_a?</span>(<span class="ruby-constant">String</span>)
|
|
533
|
-
<span class="ruby-constant">Wee</span><span class="ruby-operator">::</span><span class="ruby-constant">LiteralMethodCallback</span>.<span class="ruby-identifier">new</span>(<span class="ruby-ivar">@canvas</span>.<span class="ruby-identifier">current_component</span>, <span class="ruby-identifier">symbol</span>, <span class="ruby-operator">*</span><span class="ruby-identifier">args</span>)
|
|
534
|
-
<span class="ruby-keyword kw">else</span>
|
|
535
|
-
<span class="ruby-identifier">raise</span> <span class="ruby-constant">ArgumentError</span> <span class="ruby-keyword kw">if</span> <span class="ruby-keyword kw">not</span> <span class="ruby-identifier">args</span>.<span class="ruby-identifier">empty?</span>
|
|
536
|
-
<span class="ruby-identifier">symbol</span>
|
|
537
|
-
<span class="ruby-keyword kw">end</span>
|
|
553
|
+
<span class="ruby-comment cmt"># File lib/wee/html_brushes.rb, line 142</span>
|
|
554
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">with</span>(<span class="ruby-identifier">text</span>=<span class="ruby-keyword kw">nil</span>, <span class="ruby-operator">&</span><span class="ruby-identifier">block</span>)
|
|
555
|
+
<span class="ruby-ivar">@document</span>.<span class="ruby-identifier">start_tag</span>(<span class="ruby-ivar">@tag</span>, <span class="ruby-ivar">@attributes</span>)
|
|
556
|
+
<span class="ruby-ivar">@document</span>.<span class="ruby-identifier">text</span>(<span class="ruby-identifier">text</span>) <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">text</span>
|
|
557
|
+
<span class="ruby-ivar">@canvas</span>.<span class="ruby-identifier">nest</span>(<span class="ruby-operator">&</span><span class="ruby-identifier">block</span>) <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">block</span>
|
|
558
|
+
<span class="ruby-ivar">@document</span>.<span class="ruby-identifier">end_tag</span>(<span class="ruby-ivar">@tag</span>)
|
|
559
|
+
<span class="ruby-ivar">@document</span> = <span class="ruby-ivar">@canvas</span> = <span class="ruby-keyword kw">nil</span>
|
|
538
560
|
<span class="ruby-keyword kw">end</span>
|
|
539
|
-
<span class="ruby-keyword kw">end</span>
|
|
540
561
|
</pre>
|
|
541
562
|
</div>
|
|
563
|
+
|
|
542
564
|
</div>
|
|
543
565
|
</div>
|
|
544
566
|
|
|
545
567
|
|
|
568
|
+
|
|
546
569
|
</div>
|
|
547
570
|
|
|
548
571
|
|
|
549
|
-
</div>
|
|
550
572
|
|
|
551
573
|
|
|
574
|
+
</div>
|
|
575
|
+
|
|
552
576
|
<div id="validator-badges">
|
|
553
577
|
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
|
554
578
|
</div>
|
|
555
579
|
|
|
556
580
|
</body>
|
|
557
|
-
</html>
|
|
581
|
+
</html>
|