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::GenericResponse</title>
|
9
|
-
<meta http-equiv="Content-Type" content="text/html; charset=
|
5
|
+
<title>Class: Wee::GenericResponse [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,108 +51,137 @@
|
|
55
51
|
<tr class="top-aligned-row">
|
56
52
|
<td><strong>In:</strong></td>
|
57
53
|
<td>
|
54
|
+
|
55
|
+
|
58
56
|
<a href="../../files/lib/wee/response_rb.html">
|
57
|
+
|
59
58
|
lib/wee/response.rb
|
59
|
+
|
60
60
|
</a>
|
61
|
+
|
62
|
+
|
61
63
|
<br />
|
64
|
+
|
62
65
|
</td>
|
63
66
|
</tr>
|
64
67
|
|
68
|
+
|
65
69
|
<tr class="top-aligned-row">
|
66
70
|
<td><strong>Parent:</strong></td>
|
67
71
|
<td>
|
72
|
+
|
68
73
|
<a href="Response.html">
|
74
|
+
|
69
75
|
Wee::Response
|
76
|
+
|
70
77
|
</a>
|
78
|
+
|
71
79
|
</td>
|
72
80
|
</tr>
|
81
|
+
|
73
82
|
</table>
|
74
83
|
</div>
|
75
84
|
<!-- banner header -->
|
76
85
|
|
77
86
|
<div id="bodyContent">
|
78
87
|
|
79
|
-
|
80
|
-
|
81
88
|
<div id="contextContent">
|
82
89
|
|
83
|
-
|
84
|
-
|
85
90
|
</div>
|
86
91
|
|
92
|
+
|
87
93
|
<div id="method-list">
|
88
94
|
<h3 class="section-bar">Methods</h3>
|
89
95
|
|
90
96
|
<div class="name-list">
|
91
|
-
|
97
|
+
|
98
|
+
<a href="#M000112">new</a>
|
99
|
+
|
92
100
|
</div>
|
93
101
|
</div>
|
94
102
|
|
95
103
|
</div>
|
96
104
|
|
97
|
-
|
98
105
|
<!-- if includes -->
|
99
106
|
|
100
107
|
<div id="section">
|
101
108
|
|
102
|
-
|
103
109
|
<div id="constants-list">
|
104
110
|
<h3 class="section-bar">Constants</h3>
|
105
111
|
|
106
112
|
<div class="name-list">
|
107
113
|
<table summary="Constants">
|
114
|
+
|
108
115
|
<tr class="top-aligned-row context-row">
|
109
116
|
<td class="context-item-name">EXPIRE_OFFSET</td>
|
110
117
|
<td>=</td>
|
111
118
|
<td class="context-item-value">3600*24*365*20</td>
|
119
|
+
|
112
120
|
</tr>
|
121
|
+
|
122
|
+
<tr class="top-aligned-row context-row">
|
123
|
+
<td class="context-item-name">EXPIRES_HEADER</td>
|
124
|
+
<td>=</td>
|
125
|
+
<td class="context-item-value">'Expires'.freeze</td>
|
126
|
+
|
127
|
+
</tr>
|
128
|
+
|
113
129
|
</table>
|
114
130
|
</div>
|
115
131
|
</div>
|
116
132
|
|
117
133
|
|
118
134
|
|
119
|
-
|
120
|
-
|
121
135
|
|
122
136
|
<!-- if method_list -->
|
137
|
+
|
123
138
|
<div id="methods">
|
139
|
+
|
124
140
|
<h3 class="section-bar">Public Class methods</h3>
|
125
141
|
|
126
|
-
|
127
|
-
|
142
|
+
|
143
|
+
<div id="method-M000112" class="method-detail">
|
144
|
+
<a name="M000112"></a>
|
128
145
|
|
129
146
|
<div class="method-heading">
|
130
|
-
|
131
|
-
<
|
147
|
+
|
148
|
+
<a href="#M000112" class="method-signature">
|
149
|
+
|
150
|
+
<span class="method-name">new</span><span class="method-args">(*args)</span>
|
151
|
+
|
132
152
|
</a>
|
153
|
+
|
133
154
|
</div>
|
134
|
-
|
155
|
+
|
135
156
|
<div class="method-description">
|
157
|
+
|
136
158
|
<p><a class="source-toggle" href="#"
|
137
|
-
onclick="toggleCode('
|
138
|
-
<div class="method-source-code" id="
|
159
|
+
onclick="toggleCode('M000112-source');return false;">[Source]</a></p>
|
160
|
+
<div class="method-source-code" id="M000112-source">
|
139
161
|
<pre>
|
140
|
-
<span class="ruby-comment cmt"># File lib/wee/response.rb, line
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
162
|
+
<span class="ruby-comment cmt"># File lib/wee/response.rb, line 14</span>
|
163
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-operator">*</span><span class="ruby-identifier">args</span>)
|
164
|
+
<span class="ruby-keyword kw">super</span>
|
165
|
+
<span class="ruby-keyword kw">self</span>[<span class="ruby-constant">EXPIRES_HEADER</span>] <span class="ruby-operator">||=</span> (<span class="ruby-constant">Time</span>.<span class="ruby-identifier">now</span> <span class="ruby-operator">+</span> <span class="ruby-constant">EXPIRE_OFFSET</span>).<span class="ruby-identifier">rfc822</span>
|
166
|
+
<span class="ruby-keyword kw">end</span>
|
145
167
|
</pre>
|
146
168
|
</div>
|
169
|
+
|
147
170
|
</div>
|
148
171
|
</div>
|
149
172
|
|
150
173
|
|
174
|
+
|
151
175
|
</div>
|
152
176
|
|
153
177
|
|
154
|
-
</div>
|
155
178
|
|
156
179
|
|
180
|
+
</div>
|
181
|
+
|
157
182
|
<div id="validator-badges">
|
158
183
|
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
159
184
|
</div>
|
160
185
|
|
161
186
|
</body>
|
162
|
-
</html>
|
187
|
+
</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::HtmlCanvas</title>
|
9
|
-
<meta http-equiv="Content-Type" content="text/html; charset=
|
5
|
+
<title>Class: Wee::HtmlCanvas [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,86 +51,157 @@
|
|
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_canvas_rb.html">
|
57
|
+
|
58
|
+
lib/wee/html_canvas.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
|
-
|
69
|
-
|
72
|
+
|
73
|
+
<a href="Renderer.html">
|
74
|
+
|
75
|
+
Wee::Renderer
|
76
|
+
|
70
77
|
</a>
|
78
|
+
|
71
79
|
</td>
|
72
80
|
</tr>
|
81
|
+
|
73
82
|
</table>
|
74
83
|
</div>
|
75
84
|
<!-- banner header -->
|
76
85
|
|
77
86
|
<div id="bodyContent">
|
78
87
|
|
79
|
-
|
80
|
-
|
81
88
|
<div id="contextContent">
|
82
89
|
|
83
|
-
|
84
|
-
|
85
90
|
</div>
|
86
91
|
|
92
|
+
|
87
93
|
<div id="method-list">
|
88
94
|
<h3 class="section-bar">Methods</h3>
|
89
95
|
|
90
96
|
<div class="name-list">
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
97
|
+
|
98
|
+
<a href="#M000077"><<</a>
|
99
|
+
|
100
|
+
<a href="#M000071">brush_tag</a>
|
101
|
+
|
102
|
+
<a href="#M000088">build_url</a>
|
103
|
+
|
104
|
+
<a href="#M000069">close</a>
|
105
|
+
|
106
|
+
<a href="#M000079">css</a>
|
107
|
+
|
108
|
+
<a href="#M000081">divert</a>
|
109
|
+
|
110
|
+
<a href="#M000078">encode_text</a>
|
111
|
+
|
112
|
+
<a href="#M000073">generic_single_tag</a>
|
113
|
+
|
114
|
+
<a href="#M000072">generic_tag</a>
|
115
|
+
|
116
|
+
<a href="#M000091">handle</a>
|
117
|
+
|
118
|
+
<a href="#M000092">handle2</a>
|
119
|
+
|
120
|
+
<a href="#M000093">handle3</a>
|
121
|
+
|
122
|
+
<a href="#M000084">link_css</a>
|
123
|
+
|
124
|
+
<a href="#M000080">multiline_text</a>
|
125
|
+
|
126
|
+
<a href="#M000070">nest</a>
|
127
|
+
|
128
|
+
<a href="#M000068">new</a>
|
129
|
+
|
130
|
+
<a href="#M000085">new_radio_group</a>
|
131
|
+
|
132
|
+
<a href="#M000083">once</a>
|
133
|
+
|
134
|
+
<a href="#M000089">register_callback</a>
|
135
|
+
|
136
|
+
<a href="#M000074">select_list</a>
|
137
|
+
|
138
|
+
<a href="#M000090">set_brush</a>
|
139
|
+
|
140
|
+
<a href="#M000075">space</a>
|
141
|
+
|
142
|
+
<a href="#M000076">text</a>
|
143
|
+
|
144
|
+
<a href="#M000082">update</a>
|
145
|
+
|
146
|
+
<a href="#M000086">url_for_callback</a>
|
147
|
+
|
148
|
+
<a href="#M000087">url_for_callback_id</a>
|
149
|
+
|
127
150
|
</div>
|
128
151
|
</div>
|
129
152
|
|
130
153
|
</div>
|
131
154
|
|
132
|
-
|
133
155
|
<!-- if includes -->
|
134
156
|
|
135
157
|
<div id="section">
|
136
158
|
|
159
|
+
<div id="constants-list">
|
160
|
+
<h3 class="section-bar">Constants</h3>
|
161
|
+
|
162
|
+
<div class="name-list">
|
163
|
+
<table summary="Constants">
|
164
|
+
|
165
|
+
<tr class="top-aligned-row context-row">
|
166
|
+
<td class="context-item-name">HTML_NBSP</td>
|
167
|
+
<td>=</td>
|
168
|
+
<td class="context-item-value">"&nbsp;".freeze</td>
|
169
|
+
|
170
|
+
</tr>
|
171
|
+
|
172
|
+
<tr class="top-aligned-row context-row">
|
173
|
+
<td class="context-item-name">HTML_TYPE_CSS</td>
|
174
|
+
<td>=</td>
|
175
|
+
<td class="context-item-value">'text/css'.freeze</td>
|
176
|
+
|
177
|
+
</tr>
|
178
|
+
|
179
|
+
<tr class="top-aligned-row context-row">
|
180
|
+
<td class="context-item-name">HTML_REL_STYLESHEET</td>
|
181
|
+
<td>=</td>
|
182
|
+
<td class="context-item-value">'stylesheet'.freeze</td>
|
183
|
+
|
184
|
+
</tr>
|
185
|
+
|
186
|
+
</table>
|
187
|
+
</div>
|
188
|
+
</div>
|
189
|
+
|
190
|
+
<div id="aliases-list">
|
191
|
+
<h3 class="section-bar">External Aliases</h3>
|
192
|
+
|
193
|
+
<div class="name-list">
|
194
|
+
<table summary="aliases">
|
137
195
|
|
196
|
+
<tr class="top-aligned-row context-row">
|
197
|
+
<td class="context-item-name">check_box</td>
|
198
|
+
<td>-></td>
|
199
|
+
<td class="context-item-value">checkbox</td>
|
200
|
+
</tr>
|
201
|
+
|
202
|
+
</table>
|
203
|
+
</div>
|
204
|
+
</div>
|
138
205
|
|
139
206
|
|
140
207
|
|
@@ -143,898 +210,1229 @@
|
|
143
210
|
|
144
211
|
<div class="name-list">
|
145
212
|
<table>
|
213
|
+
|
146
214
|
<tr class="top-aligned-row context-row">
|
147
|
-
<td class="context-item-name">
|
148
|
-
|
215
|
+
<td class="context-item-name">anchor</td>
|
216
|
+
|
217
|
+
<td class="context-item-value"> [Brush] </td>
|
218
|
+
|
149
219
|
<td class="context-item-desc"></td>
|
150
220
|
</tr>
|
221
|
+
|
151
222
|
<tr class="top-aligned-row context-row">
|
152
|
-
<td class="context-item-name">
|
153
|
-
|
223
|
+
<td class="context-item-name">body</td>
|
224
|
+
|
225
|
+
<td class="context-item-value"> [GenericTagBrush] </td>
|
226
|
+
|
154
227
|
<td class="context-item-desc"></td>
|
155
228
|
</tr>
|
229
|
+
|
156
230
|
<tr class="top-aligned-row context-row">
|
157
|
-
<td class="context-item-name">
|
158
|
-
|
231
|
+
<td class="context-item-name">bold</td>
|
232
|
+
|
233
|
+
<td class="context-item-value"> [Brush] </td>
|
234
|
+
|
159
235
|
<td class="context-item-desc"></td>
|
160
236
|
</tr>
|
161
|
-
</table>
|
162
|
-
</div>
|
163
|
-
</div>
|
164
|
-
|
165
237
|
|
238
|
+
<tr class="top-aligned-row context-row">
|
239
|
+
<td class="context-item-name">break</td>
|
166
240
|
|
167
|
-
|
168
|
-
<div id="methods">
|
169
|
-
<h3 class="section-bar">Public Class methods</h3>
|
241
|
+
<td class="context-item-value"> [Brush] </td>
|
170
242
|
|
171
|
-
|
172
|
-
|
243
|
+
<td class="context-item-desc"></td>
|
244
|
+
</tr>
|
173
245
|
|
174
|
-
<
|
175
|
-
<
|
176
|
-
<span class="method-name">generic_single_tag</span><span class="method-args">(*attrs)</span>
|
177
|
-
</a>
|
178
|
-
</div>
|
179
|
-
|
180
|
-
<div class="method-description">
|
181
|
-
<p><a class="source-toggle" href="#"
|
182
|
-
onclick="toggleCode('M000102-source');return false;">[Source]</a></p>
|
183
|
-
<div class="method-source-code" id="M000102-source">
|
184
|
-
<pre>
|
185
|
-
<span class="ruby-comment cmt"># File lib/wee/renderer/html/canvas.rb, line 49</span>
|
186
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">generic_single_tag</span>(<span class="ruby-operator">*</span><span class="ruby-identifier">attrs</span>)
|
187
|
-
<span class="ruby-identifier">attrs</span>.<span class="ruby-identifier">each</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">a</span><span class="ruby-operator">|</span>
|
188
|
-
<span class="ruby-identifier">class_eval</span> <span class="ruby-node">"
|
189
|
-
def #{ a }(*args, &block)
|
190
|
-
handle(Brush::GenericSingleTagBrush.new('#{ a }'), *args, &block)
|
191
|
-
end
|
192
|
-
"</span>
|
193
|
-
}
|
194
|
-
<span class="ruby-keyword kw">end</span>
|
195
|
-
</pre>
|
196
|
-
</div>
|
197
|
-
</div>
|
198
|
-
</div>
|
246
|
+
<tr class="top-aligned-row context-row">
|
247
|
+
<td class="context-item-name">check_box</td>
|
199
248
|
|
200
|
-
|
201
|
-
<a name="M000101"></a>
|
249
|
+
<td class="context-item-value"> [Brush] </td>
|
202
250
|
|
203
|
-
|
204
|
-
|
205
|
-
<span class="method-name">generic_tag</span><span class="method-args">(*attrs)</span>
|
206
|
-
</a>
|
207
|
-
</div>
|
208
|
-
|
209
|
-
<div class="method-description">
|
210
|
-
<p><a class="source-toggle" href="#"
|
211
|
-
onclick="toggleCode('M000101-source');return false;">[Source]</a></p>
|
212
|
-
<div class="method-source-code" id="M000101-source">
|
213
|
-
<pre>
|
214
|
-
<span class="ruby-comment cmt"># File lib/wee/renderer/html/canvas.rb, line 39</span>
|
215
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">generic_tag</span>(<span class="ruby-operator">*</span><span class="ruby-identifier">attrs</span>)
|
216
|
-
<span class="ruby-identifier">attrs</span>.<span class="ruby-identifier">each</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">a</span><span class="ruby-operator">|</span>
|
217
|
-
<span class="ruby-identifier">class_eval</span> <span class="ruby-node">"
|
218
|
-
def #{ a }(*args, &block)
|
219
|
-
handle(Brush::GenericTagBrush.new('#{ a }'), *args, &block)
|
220
|
-
end
|
221
|
-
"</span>
|
222
|
-
}
|
223
|
-
<span class="ruby-keyword kw">end</span>
|
224
|
-
</pre>
|
225
|
-
</div>
|
226
|
-
</div>
|
227
|
-
</div>
|
251
|
+
<td class="context-item-desc"></td>
|
252
|
+
</tr>
|
228
253
|
|
229
|
-
|
230
|
-
|
254
|
+
<tr class="top-aligned-row context-row">
|
255
|
+
<td class="context-item-name">div</td>
|
231
256
|
|
232
|
-
|
233
|
-
<a href="#M000103" class="method-signature">
|
234
|
-
<span class="method-name">new</span><span class="method-args">(rendering_context)</span>
|
235
|
-
</a>
|
236
|
-
</div>
|
237
|
-
|
238
|
-
<div class="method-description">
|
239
|
-
<p><a class="source-toggle" href="#"
|
240
|
-
onclick="toggleCode('M000103-source');return false;">[Source]</a></p>
|
241
|
-
<div class="method-source-code" id="M000103-source">
|
242
|
-
<pre>
|
243
|
-
<span class="ruby-comment cmt"># File lib/wee/renderer/html/canvas.rb, line 59</span>
|
244
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">rendering_context</span>)
|
245
|
-
<span class="ruby-keyword kw">super</span>()
|
246
|
-
<span class="ruby-ivar">@rendering_context</span> = <span class="ruby-identifier">rendering_context</span>
|
247
|
-
<span class="ruby-ivar">@document</span> = <span class="ruby-identifier">rendering_context</span>.<span class="ruby-identifier">document</span>
|
248
|
-
<span class="ruby-keyword kw">end</span>
|
249
|
-
</pre>
|
250
|
-
</div>
|
251
|
-
</div>
|
252
|
-
</div>
|
257
|
+
<td class="context-item-value"> [GenericTagBrush] </td>
|
253
258
|
|
254
|
-
|
259
|
+
<td class="context-item-desc"></td>
|
260
|
+
</tr>
|
255
261
|
|
256
|
-
|
257
|
-
|
262
|
+
<tr class="top-aligned-row context-row">
|
263
|
+
<td class="context-item-name">file_upload</td>
|
258
264
|
|
259
|
-
|
260
|
-
<span class="method-name"><<</span><span class="method-args">(str)</span>
|
261
|
-
</div>
|
262
|
-
|
263
|
-
<div class="method-description">
|
264
|
-
<p>
|
265
|
-
Alias for <a href="HtmlCanvas.html#M000131">text</a>
|
266
|
-
</p>
|
267
|
-
</div>
|
268
|
-
</div>
|
265
|
+
<td class="context-item-value"> [Brush] </td>
|
269
266
|
|
270
|
-
|
271
|
-
|
267
|
+
<td class="context-item-desc"></td>
|
268
|
+
</tr>
|
272
269
|
|
273
|
-
<
|
274
|
-
<
|
275
|
-
<span class="method-name">anchor</span><span class="method-args">(*args, &block)</span>
|
276
|
-
</a>
|
277
|
-
</div>
|
278
|
-
|
279
|
-
<div class="method-description">
|
280
|
-
<p><a class="source-toggle" href="#"
|
281
|
-
onclick="toggleCode('M000123-source');return false;">[Source]</a></p>
|
282
|
-
<div class="method-source-code" id="M000123-source">
|
283
|
-
<pre>
|
284
|
-
<span class="ruby-comment cmt"># File lib/wee/renderer/html/canvas.rb, line 147</span>
|
285
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">anchor</span>(<span class="ruby-operator">*</span><span class="ruby-identifier">args</span>, <span class="ruby-operator">&</span><span class="ruby-identifier">block</span>)
|
286
|
-
<span class="ruby-identifier">handle</span>(<span class="ruby-constant">Brush</span><span class="ruby-operator">::</span><span class="ruby-constant">AnchorTag</span>.<span class="ruby-identifier">new</span>, <span class="ruby-operator">*</span><span class="ruby-identifier">args</span>, <span class="ruby-operator">&</span><span class="ruby-identifier">block</span>)
|
287
|
-
<span class="ruby-keyword kw">end</span>
|
288
|
-
</pre>
|
289
|
-
</div>
|
290
|
-
</div>
|
291
|
-
</div>
|
270
|
+
<tr class="top-aligned-row context-row">
|
271
|
+
<td class="context-item-name">form</td>
|
292
272
|
|
293
|
-
|
294
|
-
<a name="M000125"></a>
|
273
|
+
<td class="context-item-value"> [Brush] </td>
|
295
274
|
|
296
|
-
|
297
|
-
|
298
|
-
<span class="method-name">bold</span><span class="method-args">(*args, &block)</span>
|
299
|
-
</a>
|
300
|
-
</div>
|
301
|
-
|
302
|
-
<div class="method-description">
|
303
|
-
<p><a class="source-toggle" href="#"
|
304
|
-
onclick="toggleCode('M000125-source');return false;">[Source]</a></p>
|
305
|
-
<div class="method-source-code" id="M000125-source">
|
306
|
-
<pre>
|
307
|
-
<span class="ruby-comment cmt"># File lib/wee/renderer/html/canvas.rb, line 155</span>
|
308
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">bold</span>(<span class="ruby-operator">*</span><span class="ruby-identifier">args</span>, <span class="ruby-operator">&</span><span class="ruby-identifier">block</span>)
|
309
|
-
<span class="ruby-identifier">handle</span>(<span class="ruby-constant">Brush</span><span class="ruby-operator">::</span><span class="ruby-constant">GenericTagBrush</span>.<span class="ruby-identifier">new</span>(<span class="ruby-value str">"b"</span>), <span class="ruby-operator">*</span><span class="ruby-identifier">args</span>, <span class="ruby-operator">&</span><span class="ruby-identifier">block</span>)
|
310
|
-
<span class="ruby-keyword kw">end</span>
|
311
|
-
</pre>
|
312
|
-
</div>
|
313
|
-
</div>
|
314
|
-
</div>
|
275
|
+
<td class="context-item-desc"></td>
|
276
|
+
</tr>
|
315
277
|
|
316
|
-
|
317
|
-
|
278
|
+
<tr class="top-aligned-row context-row">
|
279
|
+
<td class="context-item-name">h1</td>
|
318
280
|
|
319
|
-
|
320
|
-
<a href="#M000128" class="method-signature">
|
321
|
-
<span class="method-name">break</span><span class="method-args">()</span>
|
322
|
-
</a>
|
323
|
-
</div>
|
324
|
-
|
325
|
-
<div class="method-description">
|
326
|
-
<p><a class="source-toggle" href="#"
|
327
|
-
onclick="toggleCode('M000128-source');return false;">[Source]</a></p>
|
328
|
-
<div class="method-source-code" id="M000128-source">
|
329
|
-
<pre>
|
330
|
-
<span class="ruby-comment cmt"># File lib/wee/renderer/html/canvas.rb, line 167</span>
|
331
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">break</span>
|
332
|
-
<span class="ruby-identifier">set_brush</span>(<span class="ruby-constant">Brush</span><span class="ruby-operator">::</span><span class="ruby-constant">GenericSingleTagBrush</span>.<span class="ruby-identifier">new</span>(<span class="ruby-value str">"br"</span>))
|
333
|
-
<span class="ruby-keyword kw">end</span>
|
334
|
-
</pre>
|
335
|
-
</div>
|
336
|
-
</div>
|
337
|
-
</div>
|
281
|
+
<td class="context-item-value"> [GenericTagBrush] </td>
|
338
282
|
|
339
|
-
|
340
|
-
|
283
|
+
<td class="context-item-desc"></td>
|
284
|
+
</tr>
|
341
285
|
|
342
|
-
<
|
343
|
-
<
|
344
|
-
<span class="method-name">encode_text</span><span class="method-args">(str)</span>
|
345
|
-
</a>
|
346
|
-
</div>
|
347
|
-
|
348
|
-
<div class="method-description">
|
349
|
-
<p><a class="source-toggle" href="#"
|
350
|
-
onclick="toggleCode('M000133-source');return false;">[Source]</a></p>
|
351
|
-
<div class="method-source-code" id="M000133-source">
|
352
|
-
<pre>
|
353
|
-
<span class="ruby-comment cmt"># File lib/wee/renderer/html/canvas.rb, line 184</span>
|
354
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">encode_text</span>(<span class="ruby-identifier">str</span>)
|
355
|
-
<span class="ruby-identifier">set_brush</span>(<span class="ruby-constant">Brush</span><span class="ruby-operator">::</span><span class="ruby-constant">GenericEncodedTextBrush</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">str</span>))
|
356
|
-
<span class="ruby-keyword kw">end</span>
|
357
|
-
</pre>
|
358
|
-
</div>
|
359
|
-
</div>
|
360
|
-
</div>
|
286
|
+
<tr class="top-aligned-row context-row">
|
287
|
+
<td class="context-item-name">h2</td>
|
361
288
|
|
362
|
-
|
363
|
-
<a name="M000121"></a>
|
289
|
+
<td class="context-item-value"> [GenericTagBrush] </td>
|
364
290
|
|
365
|
-
|
366
|
-
|
367
|
-
<span class="method-name">file_upload</span><span class="method-args">(*args, &block)</span>
|
368
|
-
</a>
|
369
|
-
</div>
|
370
|
-
|
371
|
-
<div class="method-description">
|
372
|
-
<p><a class="source-toggle" href="#"
|
373
|
-
onclick="toggleCode('M000121-source');return false;">[Source]</a></p>
|
374
|
-
<div class="method-source-code" id="M000121-source">
|
375
|
-
<pre>
|
376
|
-
<span class="ruby-comment cmt"># File lib/wee/renderer/html/canvas.rb, line 139</span>
|
377
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">file_upload</span>(<span class="ruby-operator">*</span><span class="ruby-identifier">args</span>, <span class="ruby-operator">&</span><span class="ruby-identifier">block</span>)
|
378
|
-
<span class="ruby-identifier">handle</span>(<span class="ruby-constant">Wee</span><span class="ruby-operator">::</span><span class="ruby-constant">Brush</span><span class="ruby-operator">::</span><span class="ruby-constant">FileUploadTag</span>.<span class="ruby-identifier">new</span>, <span class="ruby-operator">*</span><span class="ruby-identifier">args</span>, <span class="ruby-operator">&</span><span class="ruby-identifier">block</span>)
|
379
|
-
<span class="ruby-keyword kw">end</span>
|
380
|
-
</pre>
|
381
|
-
</div>
|
382
|
-
</div>
|
383
|
-
</div>
|
291
|
+
<td class="context-item-desc"></td>
|
292
|
+
</tr>
|
384
293
|
|
385
|
-
|
386
|
-
|
294
|
+
<tr class="top-aligned-row context-row">
|
295
|
+
<td class="context-item-name">h3</td>
|
387
296
|
|
388
|
-
|
389
|
-
|
390
|
-
<
|
391
|
-
|
392
|
-
|
393
|
-
|
394
|
-
|
395
|
-
|
396
|
-
|
397
|
-
|
398
|
-
<
|
399
|
-
|
400
|
-
|
401
|
-
|
402
|
-
|
403
|
-
|
404
|
-
|
405
|
-
|
297
|
+
<td class="context-item-value"> [GenericTagBrush] </td>
|
298
|
+
|
299
|
+
<td class="context-item-desc"></td>
|
300
|
+
</tr>
|
301
|
+
|
302
|
+
<tr class="top-aligned-row context-row">
|
303
|
+
<td class="context-item-name">h4</td>
|
304
|
+
|
305
|
+
<td class="context-item-value"> [GenericTagBrush] </td>
|
306
|
+
|
307
|
+
<td class="context-item-desc"></td>
|
308
|
+
</tr>
|
309
|
+
|
310
|
+
<tr class="top-aligned-row context-row">
|
311
|
+
<td class="context-item-name">h5</td>
|
312
|
+
|
313
|
+
<td class="context-item-value"> [GenericTagBrush] </td>
|
314
|
+
|
315
|
+
<td class="context-item-desc"></td>
|
316
|
+
</tr>
|
317
|
+
|
318
|
+
<tr class="top-aligned-row context-row">
|
319
|
+
<td class="context-item-name">head</td>
|
320
|
+
|
321
|
+
<td class="context-item-value"> [GenericTagBrush] </td>
|
322
|
+
|
323
|
+
<td class="context-item-desc"></td>
|
324
|
+
</tr>
|
325
|
+
|
326
|
+
<tr class="top-aligned-row context-row">
|
327
|
+
<td class="context-item-name">hidden_input</td>
|
328
|
+
|
329
|
+
<td class="context-item-value"> [Brush] </td>
|
330
|
+
|
331
|
+
<td class="context-item-desc"></td>
|
332
|
+
</tr>
|
333
|
+
|
334
|
+
<tr class="top-aligned-row context-row">
|
335
|
+
<td class="context-item-name">hr</td>
|
336
|
+
|
337
|
+
<td class="context-item-value"> [GenericSingleTagBrush] </td>
|
338
|
+
|
339
|
+
<td class="context-item-desc"></td>
|
340
|
+
</tr>
|
341
|
+
|
342
|
+
<tr class="top-aligned-row context-row">
|
343
|
+
<td class="context-item-name">html</td>
|
344
|
+
|
345
|
+
<td class="context-item-value"> [GenericTagBrush] </td>
|
346
|
+
|
347
|
+
<td class="context-item-desc"></td>
|
348
|
+
</tr>
|
349
|
+
|
350
|
+
<tr class="top-aligned-row context-row">
|
351
|
+
<td class="context-item-name">image</td>
|
352
|
+
|
353
|
+
<td class="context-item-value"> [Brush] </td>
|
354
|
+
|
355
|
+
<td class="context-item-desc"></td>
|
356
|
+
</tr>
|
357
|
+
|
358
|
+
<tr class="top-aligned-row context-row">
|
359
|
+
<td class="context-item-name">image_button</td>
|
360
|
+
|
361
|
+
<td class="context-item-value"> [Brush] </td>
|
362
|
+
|
363
|
+
<td class="context-item-desc"></td>
|
364
|
+
</tr>
|
365
|
+
|
366
|
+
<tr class="top-aligned-row context-row">
|
367
|
+
<td class="context-item-name">input</td>
|
368
|
+
|
369
|
+
<td class="context-item-value"> [Brush] </td>
|
370
|
+
|
371
|
+
<td class="context-item-desc"></td>
|
372
|
+
</tr>
|
373
|
+
|
374
|
+
<tr class="top-aligned-row context-row">
|
375
|
+
<td class="context-item-name">javascript</td>
|
376
|
+
|
377
|
+
<td class="context-item-value"> [Brush] </td>
|
378
|
+
|
379
|
+
<td class="context-item-desc"></td>
|
380
|
+
</tr>
|
381
|
+
|
382
|
+
<tr class="top-aligned-row context-row">
|
383
|
+
<td class="context-item-name">label</td>
|
384
|
+
|
385
|
+
<td class="context-item-value"> [GenericTagBrush] </td>
|
386
|
+
|
387
|
+
<td class="context-item-desc"></td>
|
388
|
+
</tr>
|
389
|
+
|
390
|
+
<tr class="top-aligned-row context-row">
|
391
|
+
<td class="context-item-name">li</td>
|
392
|
+
|
393
|
+
<td class="context-item-value"> [GenericTagBrush] </td>
|
394
|
+
|
395
|
+
<td class="context-item-desc"></td>
|
396
|
+
</tr>
|
397
|
+
|
398
|
+
<tr class="top-aligned-row context-row">
|
399
|
+
<td class="context-item-name">link</td>
|
400
|
+
|
401
|
+
<td class="context-item-value"> [GenericSingleTagBrush] </td>
|
402
|
+
|
403
|
+
<td class="context-item-desc"></td>
|
404
|
+
</tr>
|
405
|
+
|
406
|
+
<tr class="top-aligned-row context-row">
|
407
|
+
<td class="context-item-name">ol</td>
|
408
|
+
|
409
|
+
<td class="context-item-value"> [GenericTagBrush] </td>
|
410
|
+
|
411
|
+
<td class="context-item-desc"></td>
|
412
|
+
</tr>
|
413
|
+
|
414
|
+
<tr class="top-aligned-row context-row">
|
415
|
+
<td class="context-item-name">option</td>
|
416
|
+
|
417
|
+
<td class="context-item-value"> [Brush] </td>
|
418
|
+
|
419
|
+
<td class="context-item-desc"></td>
|
420
|
+
</tr>
|
421
|
+
|
422
|
+
<tr class="top-aligned-row context-row">
|
423
|
+
<td class="context-item-name">page</td>
|
424
|
+
|
425
|
+
<td class="context-item-value"> [Brush] </td>
|
426
|
+
|
427
|
+
<td class="context-item-desc"></td>
|
428
|
+
</tr>
|
429
|
+
|
430
|
+
<tr class="top-aligned-row context-row">
|
431
|
+
<td class="context-item-name">paragraph</td>
|
432
|
+
|
433
|
+
<td class="context-item-value"> [Brush] </td>
|
434
|
+
|
435
|
+
<td class="context-item-desc"></td>
|
436
|
+
</tr>
|
437
|
+
|
438
|
+
<tr class="top-aligned-row context-row">
|
439
|
+
<td class="context-item-name">password_input</td>
|
440
|
+
|
441
|
+
<td class="context-item-value"> [Brush] </td>
|
442
|
+
|
443
|
+
<td class="context-item-desc"></td>
|
444
|
+
</tr>
|
445
|
+
|
446
|
+
<tr class="top-aligned-row context-row">
|
447
|
+
<td class="context-item-name">pre</td>
|
448
|
+
|
449
|
+
<td class="context-item-value"> [GenericTagBrush] </td>
|
450
|
+
|
451
|
+
<td class="context-item-desc"></td>
|
452
|
+
</tr>
|
453
|
+
|
454
|
+
<tr class="top-aligned-row context-row">
|
455
|
+
<td class="context-item-name">radio_button</td>
|
456
|
+
|
457
|
+
<td class="context-item-value"> [Brush] </td>
|
458
|
+
|
459
|
+
<td class="context-item-desc"></td>
|
460
|
+
</tr>
|
461
|
+
|
462
|
+
<tr class="top-aligned-row context-row">
|
463
|
+
<td class="context-item-name">span</td>
|
464
|
+
|
465
|
+
<td class="context-item-value"> [GenericTagBrush] </td>
|
466
|
+
|
467
|
+
<td class="context-item-desc"></td>
|
468
|
+
</tr>
|
469
|
+
|
470
|
+
<tr class="top-aligned-row context-row">
|
471
|
+
<td class="context-item-name">style</td>
|
472
|
+
|
473
|
+
<td class="context-item-value"> [GenericTagBrush] </td>
|
474
|
+
|
475
|
+
<td class="context-item-desc"></td>
|
476
|
+
</tr>
|
477
|
+
|
478
|
+
<tr class="top-aligned-row context-row">
|
479
|
+
<td class="context-item-name">submit_button</td>
|
480
|
+
|
481
|
+
<td class="context-item-value"> [Brush] </td>
|
482
|
+
|
483
|
+
<td class="context-item-desc"></td>
|
484
|
+
</tr>
|
485
|
+
|
486
|
+
<tr class="top-aligned-row context-row">
|
487
|
+
<td class="context-item-name">table</td>
|
488
|
+
|
489
|
+
<td class="context-item-value"> [Brush] </td>
|
490
|
+
|
491
|
+
<td class="context-item-desc"></td>
|
492
|
+
</tr>
|
493
|
+
|
494
|
+
<tr class="top-aligned-row context-row">
|
495
|
+
<td class="context-item-name">table_data</td>
|
496
|
+
|
497
|
+
<td class="context-item-value"> [Brush] </td>
|
498
|
+
|
499
|
+
<td class="context-item-desc"></td>
|
500
|
+
</tr>
|
501
|
+
|
502
|
+
<tr class="top-aligned-row context-row">
|
503
|
+
<td class="context-item-name">table_header</td>
|
504
|
+
|
505
|
+
<td class="context-item-value"> [Brush] </td>
|
506
|
+
|
507
|
+
<td class="context-item-desc"></td>
|
508
|
+
</tr>
|
509
|
+
|
510
|
+
<tr class="top-aligned-row context-row">
|
511
|
+
<td class="context-item-name">table_row</td>
|
512
|
+
|
513
|
+
<td class="context-item-value"> [Brush] </td>
|
514
|
+
|
515
|
+
<td class="context-item-desc"></td>
|
516
|
+
</tr>
|
517
|
+
|
518
|
+
<tr class="top-aligned-row context-row">
|
519
|
+
<td class="context-item-name">text_area</td>
|
520
|
+
|
521
|
+
<td class="context-item-value"> [Brush] </td>
|
522
|
+
|
523
|
+
<td class="context-item-desc"></td>
|
524
|
+
</tr>
|
525
|
+
|
526
|
+
<tr class="top-aligned-row context-row">
|
527
|
+
<td class="context-item-name">text_input</td>
|
528
|
+
|
529
|
+
<td class="context-item-value"> [Brush] </td>
|
530
|
+
|
531
|
+
<td class="context-item-desc"></td>
|
532
|
+
</tr>
|
533
|
+
|
534
|
+
<tr class="top-aligned-row context-row">
|
535
|
+
<td class="context-item-name">title</td>
|
536
|
+
|
537
|
+
<td class="context-item-value"> [GenericTagBrush] </td>
|
538
|
+
|
539
|
+
<td class="context-item-desc"></td>
|
540
|
+
</tr>
|
541
|
+
|
542
|
+
<tr class="top-aligned-row context-row">
|
543
|
+
<td class="context-item-name">ul</td>
|
544
|
+
|
545
|
+
<td class="context-item-value"> [GenericTagBrush] </td>
|
546
|
+
|
547
|
+
<td class="context-item-desc"></td>
|
548
|
+
</tr>
|
549
|
+
|
550
|
+
</table>
|
406
551
|
</div>
|
552
|
+
</div>
|
407
553
|
|
408
|
-
|
409
|
-
|
554
|
+
|
555
|
+
<!-- if method_list -->
|
556
|
+
|
557
|
+
<div id="methods">
|
558
|
+
|
559
|
+
<h3 class="section-bar">Public Class methods</h3>
|
560
|
+
|
561
|
+
|
562
|
+
<div id="method-M000071" class="method-detail">
|
563
|
+
<a name="M000071"></a>
|
410
564
|
|
411
565
|
<div class="method-heading">
|
412
|
-
|
413
|
-
<
|
566
|
+
|
567
|
+
<a href="#M000071" class="method-signature">
|
568
|
+
|
569
|
+
<span class="method-name">brush_tag</span><span class="method-args">(attr, klass, *args_to_new)</span>
|
570
|
+
|
414
571
|
</a>
|
572
|
+
|
415
573
|
</div>
|
416
|
-
|
574
|
+
|
417
575
|
<div class="method-description">
|
576
|
+
|
418
577
|
<p><a class="source-toggle" href="#"
|
419
|
-
onclick="toggleCode('
|
420
|
-
<div class="method-source-code" id="
|
578
|
+
onclick="toggleCode('M000071-source');return false;">[Source]</a></p>
|
579
|
+
<div class="method-source-code" id="M000071-source">
|
421
580
|
<pre>
|
422
|
-
<span class="ruby-comment cmt"># File lib/wee/
|
423
|
-
|
424
|
-
|
425
|
-
|
581
|
+
<span class="ruby-comment cmt"># File lib/wee/html_canvas.rb, line 27</span>
|
582
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">brush_tag</span>(<span class="ruby-identifier">attr</span>, <span class="ruby-identifier">klass</span>, <span class="ruby-operator">*</span><span class="ruby-identifier">args_to_new</span>)
|
583
|
+
<span class="ruby-identifier">args_to_new</span> = <span class="ruby-identifier">args_to_new</span>.<span class="ruby-identifier">map</span> {<span class="ruby-operator">|</span><span class="ruby-identifier">a</span><span class="ruby-operator">|</span> <span class="ruby-identifier">a</span>.<span class="ruby-identifier">inspect</span>}.<span class="ruby-identifier">join</span>(<span class="ruby-value str">", "</span>)
|
584
|
+
<span class="ruby-keyword kw">if</span> <span class="ruby-identifier">klass</span>.<span class="ruby-identifier">instance_method</span>(<span class="ruby-identifier">:with</span>).<span class="ruby-identifier">arity</span> <span class="ruby-operator">!=</span> <span class="ruby-value">0</span>
|
585
|
+
<span class="ruby-identifier">class_eval</span> <span class="ruby-node">%{
|
586
|
+
def #{attr}(*args, &block)
|
587
|
+
handle(#{klass}.new(#{args_to_new}), *args, &block)
|
588
|
+
end
|
589
|
+
}</span>
|
590
|
+
<span class="ruby-keyword kw">elsif</span> <span class="ruby-identifier">klass</span>.<span class="ruby-identifier">nesting?</span>
|
591
|
+
<span class="ruby-identifier">class_eval</span> <span class="ruby-node">%{
|
592
|
+
def #{attr}(&block)
|
593
|
+
handle2(#{klass}.new(#{args_to_new}), &block)
|
594
|
+
end
|
595
|
+
}</span>
|
596
|
+
<span class="ruby-keyword kw">else</span>
|
597
|
+
<span class="ruby-identifier">class_eval</span> <span class="ruby-node">%{
|
598
|
+
def #{attr}
|
599
|
+
handle3(#{klass}.new(#{args_to_new}))
|
600
|
+
end
|
601
|
+
}</span>
|
602
|
+
<span class="ruby-keyword kw">end</span>
|
603
|
+
<span class="ruby-keyword kw">end</span>
|
426
604
|
</pre>
|
427
605
|
</div>
|
606
|
+
|
428
607
|
</div>
|
429
608
|
</div>
|
430
609
|
|
431
|
-
|
432
|
-
|
610
|
+
|
611
|
+
<div id="method-M000073" class="method-detail">
|
612
|
+
<a name="M000073"></a>
|
433
613
|
|
434
614
|
<div class="method-heading">
|
435
|
-
|
436
|
-
<
|
615
|
+
|
616
|
+
<a href="#M000073" class="method-signature">
|
617
|
+
|
618
|
+
<span class="method-name">generic_single_tag</span><span class="method-args">(*attrs)</span>
|
619
|
+
|
437
620
|
</a>
|
621
|
+
|
438
622
|
</div>
|
439
|
-
|
623
|
+
|
440
624
|
<div class="method-description">
|
625
|
+
|
441
626
|
<p><a class="source-toggle" href="#"
|
442
|
-
onclick="toggleCode('
|
443
|
-
<div class="method-source-code" id="
|
627
|
+
onclick="toggleCode('M000073-source');return false;">[Source]</a></p>
|
628
|
+
<div class="method-source-code" id="M000073-source">
|
444
629
|
<pre>
|
445
|
-
<span class="ruby-comment cmt"># File lib/wee/
|
446
|
-
|
447
|
-
|
448
|
-
|
630
|
+
<span class="ruby-comment cmt"># File lib/wee/html_canvas.rb, line 54</span>
|
631
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">generic_single_tag</span>(<span class="ruby-operator">*</span><span class="ruby-identifier">attrs</span>)
|
632
|
+
<span class="ruby-identifier">attrs</span>.<span class="ruby-identifier">each</span> {<span class="ruby-operator">|</span><span class="ruby-identifier">attr</span><span class="ruby-operator">|</span> <span class="ruby-identifier">brush_tag</span> <span class="ruby-identifier">attr</span>, <span class="ruby-constant">Brush</span><span class="ruby-operator">::</span><span class="ruby-constant">GenericSingleTagBrush</span>, <span class="ruby-identifier">attr</span> }
|
633
|
+
<span class="ruby-keyword kw">end</span>
|
449
634
|
</pre>
|
450
635
|
</div>
|
636
|
+
|
451
637
|
</div>
|
452
638
|
</div>
|
453
639
|
|
454
|
-
|
455
|
-
|
640
|
+
|
641
|
+
<div id="method-M000072" class="method-detail">
|
642
|
+
<a name="M000072"></a>
|
456
643
|
|
457
644
|
<div class="method-heading">
|
458
|
-
|
459
|
-
<
|
645
|
+
|
646
|
+
<a href="#M000072" class="method-signature">
|
647
|
+
|
648
|
+
<span class="method-name">generic_tag</span><span class="method-args">(*attrs)</span>
|
649
|
+
|
460
650
|
</a>
|
651
|
+
|
461
652
|
</div>
|
462
|
-
|
653
|
+
|
463
654
|
<div class="method-description">
|
655
|
+
|
464
656
|
<p><a class="source-toggle" href="#"
|
465
|
-
onclick="toggleCode('
|
466
|
-
<div class="method-source-code" id="
|
657
|
+
onclick="toggleCode('M000072-source');return false;">[Source]</a></p>
|
658
|
+
<div class="method-source-code" id="M000072-source">
|
467
659
|
<pre>
|
468
|
-
<span class="ruby-comment cmt"># File lib/wee/
|
469
|
-
|
470
|
-
|
471
|
-
|
660
|
+
<span class="ruby-comment cmt"># File lib/wee/html_canvas.rb, line 50</span>
|
661
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">generic_tag</span>(<span class="ruby-operator">*</span><span class="ruby-identifier">attrs</span>)
|
662
|
+
<span class="ruby-identifier">attrs</span>.<span class="ruby-identifier">each</span> {<span class="ruby-operator">|</span><span class="ruby-identifier">attr</span><span class="ruby-operator">|</span> <span class="ruby-identifier">brush_tag</span> <span class="ruby-identifier">attr</span>, <span class="ruby-constant">Brush</span><span class="ruby-operator">::</span><span class="ruby-constant">GenericTagBrush</span>, <span class="ruby-identifier">attr</span> }
|
663
|
+
<span class="ruby-keyword kw">end</span>
|
472
664
|
</pre>
|
473
665
|
</div>
|
666
|
+
|
474
667
|
</div>
|
475
668
|
</div>
|
476
669
|
|
477
|
-
|
478
|
-
|
670
|
+
|
671
|
+
<div id="method-M000068" class="method-detail">
|
672
|
+
<a name="M000068"></a>
|
479
673
|
|
480
674
|
<div class="method-heading">
|
481
|
-
|
482
|
-
<
|
675
|
+
|
676
|
+
<a href="#M000068" class="method-signature">
|
677
|
+
|
678
|
+
<span class="method-name">new</span><span class="method-args">(*args)</span>
|
679
|
+
|
483
680
|
</a>
|
681
|
+
|
484
682
|
</div>
|
485
|
-
|
683
|
+
|
486
684
|
<div class="method-description">
|
685
|
+
|
487
686
|
<p><a class="source-toggle" href="#"
|
488
|
-
onclick="toggleCode('
|
489
|
-
<div class="method-source-code" id="
|
687
|
+
onclick="toggleCode('M000068-source');return false;">[Source]</a></p>
|
688
|
+
<div class="method-source-code" id="M000068-source">
|
490
689
|
<pre>
|
491
|
-
<span class="ruby-comment cmt"># File lib/wee/
|
492
|
-
|
493
|
-
|
494
|
-
|
690
|
+
<span class="ruby-comment cmt"># File lib/wee/html_canvas.rb, line 7</span>
|
691
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-operator">*</span><span class="ruby-identifier">args</span>)
|
692
|
+
<span class="ruby-keyword kw">super</span>
|
693
|
+
<span class="ruby-ivar">@current_brush</span> = <span class="ruby-keyword kw">nil</span>
|
694
|
+
<span class="ruby-keyword kw">end</span>
|
495
695
|
</pre>
|
496
696
|
</div>
|
697
|
+
|
497
698
|
</div>
|
498
699
|
</div>
|
499
700
|
|
500
|
-
|
501
|
-
|
701
|
+
|
702
|
+
<h3 class="section-bar">Public Instance methods</h3>
|
703
|
+
|
704
|
+
|
705
|
+
<div id="method-M000077" class="method-detail">
|
706
|
+
<a name="M000077"></a>
|
502
707
|
|
503
708
|
<div class="method-heading">
|
504
|
-
|
505
|
-
<span class="method-name"
|
506
|
-
|
709
|
+
|
710
|
+
<span class="method-name"><<</span><span class="method-args">(str)</span>
|
711
|
+
|
507
712
|
</div>
|
508
|
-
|
713
|
+
|
509
714
|
<div class="method-description">
|
510
|
-
|
511
|
-
|
512
|
-
|
513
|
-
|
514
|
-
|
515
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">link_css</span>(<span class="ruby-identifier">url</span>)
|
516
|
-
<span class="ruby-identifier">link</span>.<span class="ruby-identifier">type</span>(<span class="ruby-value str">'text/css'</span>).<span class="ruby-identifier">rel</span>(<span class="ruby-value str">'stylesheet'</span>).<span class="ruby-identifier">href</span>(<span class="ruby-identifier">url</span>)
|
517
|
-
<span class="ruby-keyword kw">end</span>
|
518
|
-
</pre>
|
519
|
-
</div>
|
715
|
+
|
716
|
+
<p>
|
717
|
+
Alias for <a href="HtmlCanvas.html#M000076">text</a>
|
718
|
+
</p>
|
719
|
+
|
520
720
|
</div>
|
521
721
|
</div>
|
522
722
|
|
523
|
-
|
524
|
-
|
723
|
+
|
724
|
+
<div id="method-M000088" class="method-detail">
|
725
|
+
<a name="M000088"></a>
|
525
726
|
|
526
727
|
<div class="method-heading">
|
527
|
-
|
528
|
-
<
|
728
|
+
|
729
|
+
<a href="#M000088" class="method-signature">
|
730
|
+
|
731
|
+
<span class="method-name">build_url</span><span class="method-args">(*args)</span>
|
732
|
+
|
529
733
|
</a>
|
734
|
+
|
530
735
|
</div>
|
531
|
-
|
736
|
+
|
532
737
|
<div class="method-description">
|
738
|
+
|
533
739
|
<p><a class="source-toggle" href="#"
|
534
|
-
onclick="toggleCode('
|
535
|
-
<div class="method-source-code" id="
|
740
|
+
onclick="toggleCode('M000088-source');return false;">[Source]</a></p>
|
741
|
+
<div class="method-source-code" id="M000088-source">
|
536
742
|
<pre>
|
537
|
-
<span class="ruby-comment cmt"># File lib/wee/
|
538
|
-
|
539
|
-
|
540
|
-
|
743
|
+
<span class="ruby-comment cmt"># File lib/wee/html_canvas.rb, line 195</span>
|
744
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">build_url</span>(<span class="ruby-operator">*</span><span class="ruby-identifier">args</span>)
|
745
|
+
<span class="ruby-ivar">@request</span>.<span class="ruby-identifier">build_url</span>(<span class="ruby-operator">*</span><span class="ruby-identifier">args</span>)
|
746
|
+
<span class="ruby-keyword kw">end</span>
|
541
747
|
</pre>
|
542
748
|
</div>
|
749
|
+
|
543
750
|
</div>
|
544
751
|
</div>
|
545
752
|
|
546
|
-
|
547
|
-
|
753
|
+
|
754
|
+
<div id="method-M000069" class="method-detail">
|
755
|
+
<a name="M000069"></a>
|
548
756
|
|
549
757
|
<div class="method-heading">
|
550
|
-
|
551
|
-
<
|
758
|
+
|
759
|
+
<a href="#M000069" class="method-signature">
|
760
|
+
|
761
|
+
<span class="method-name">close</span><span class="method-args">()</span>
|
762
|
+
|
552
763
|
</a>
|
764
|
+
|
553
765
|
</div>
|
554
|
-
|
766
|
+
|
555
767
|
<div class="method-description">
|
768
|
+
|
556
769
|
<p><a class="source-toggle" href="#"
|
557
|
-
onclick="toggleCode('
|
558
|
-
<div class="method-source-code" id="
|
770
|
+
onclick="toggleCode('M000069-source');return false;">[Source]</a></p>
|
771
|
+
<div class="method-source-code" id="M000069-source">
|
559
772
|
<pre>
|
560
|
-
<span class="ruby-comment cmt"># File lib/wee/
|
561
|
-
|
562
|
-
|
563
|
-
|
773
|
+
<span class="ruby-comment cmt"># File lib/wee/html_canvas.rb, line 12</span>
|
774
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">close</span>
|
775
|
+
<span class="ruby-ivar">@current_brush</span>.<span class="ruby-identifier">close</span> <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@current_brush</span>
|
776
|
+
<span class="ruby-ivar">@current_brush</span> = <span class="ruby-keyword kw">nil</span>
|
777
|
+
<span class="ruby-keyword kw">end</span>
|
564
778
|
</pre>
|
565
779
|
</div>
|
780
|
+
|
566
781
|
</div>
|
567
782
|
</div>
|
568
783
|
|
569
|
-
|
570
|
-
|
784
|
+
|
785
|
+
<div id="method-M000079" class="method-detail">
|
786
|
+
<a name="M000079"></a>
|
571
787
|
|
572
788
|
<div class="method-heading">
|
573
|
-
|
574
|
-
<
|
789
|
+
|
790
|
+
<a href="#M000079" class="method-signature">
|
791
|
+
|
792
|
+
<span class="method-name">css</span><span class="method-args">(str)</span>
|
793
|
+
|
575
794
|
</a>
|
795
|
+
|
576
796
|
</div>
|
577
|
-
|
797
|
+
|
578
798
|
<div class="method-description">
|
799
|
+
|
579
800
|
<p><a class="source-toggle" href="#"
|
580
|
-
onclick="toggleCode('
|
581
|
-
<div class="method-source-code" id="
|
801
|
+
onclick="toggleCode('M000079-source');return false;">[Source]</a></p>
|
802
|
+
<div class="method-source-code" id="M000079-source">
|
582
803
|
<pre>
|
583
|
-
<span class="ruby-comment cmt"># File lib/wee/
|
584
|
-
|
585
|
-
|
586
|
-
|
804
|
+
<span class="ruby-comment cmt"># File lib/wee/html_canvas.rb, line 114</span>
|
805
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">css</span>(<span class="ruby-identifier">str</span>)
|
806
|
+
<span class="ruby-ivar">@current_brush</span>.<span class="ruby-identifier">close</span> <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@current_brush</span>
|
807
|
+
<span class="ruby-ivar">@current_brush</span> = <span class="ruby-keyword kw">nil</span>
|
808
|
+
<span class="ruby-ivar">@document</span>.<span class="ruby-identifier">start_tag</span>(<span class="ruby-identifier">:style</span>, <span class="ruby-value str">'type'</span> =<span class="ruby-operator">></span> <span class="ruby-value str">'text/css'</span>)
|
809
|
+
<span class="ruby-ivar">@document</span>.<span class="ruby-identifier">write</span>(<span class="ruby-value str">"<!--\n"</span>)
|
810
|
+
<span class="ruby-ivar">@document</span>.<span class="ruby-identifier">text</span>(<span class="ruby-identifier">str</span>)
|
811
|
+
<span class="ruby-ivar">@document</span>.<span class="ruby-identifier">write</span>(<span class="ruby-value str">"-->\n"</span>)
|
812
|
+
<span class="ruby-ivar">@document</span>.<span class="ruby-identifier">end_tag</span>(<span class="ruby-identifier">:style</span>)
|
813
|
+
<span class="ruby-keyword kw">end</span>
|
587
814
|
</pre>
|
588
815
|
</div>
|
816
|
+
|
589
817
|
</div>
|
590
818
|
</div>
|
591
819
|
|
592
|
-
|
593
|
-
|
820
|
+
|
821
|
+
<div id="method-M000081" class="method-detail">
|
822
|
+
<a name="M000081"></a>
|
594
823
|
|
595
824
|
<div class="method-heading">
|
596
|
-
|
597
|
-
<
|
825
|
+
|
826
|
+
<a href="#M000081" class="method-signature">
|
827
|
+
|
828
|
+
<span class="method-name">divert</span><span class="method-args">(tag, txt=nil, &block)</span>
|
829
|
+
|
598
830
|
</a>
|
831
|
+
|
599
832
|
</div>
|
600
|
-
|
833
|
+
|
601
834
|
<div class="method-description">
|
835
|
+
|
836
|
+
<p>
|
837
|
+
Define a divert location or change into an existing divert location (and
|
838
|
+
append <tt>txt</tt> or the contents of <tt>block</tt>).
|
839
|
+
</p>
|
840
|
+
|
602
841
|
<p><a class="source-toggle" href="#"
|
603
|
-
onclick="toggleCode('
|
604
|
-
<div class="method-source-code" id="
|
842
|
+
onclick="toggleCode('M000081-source');return false;">[Source]</a></p>
|
843
|
+
<div class="method-source-code" id="M000081-source">
|
605
844
|
<pre>
|
606
|
-
<span class="ruby-comment cmt"># File lib/wee/
|
607
|
-
|
608
|
-
|
609
|
-
|
845
|
+
<span class="ruby-comment cmt"># File lib/wee/html_canvas.rb, line 148</span>
|
846
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">divert</span>(<span class="ruby-identifier">tag</span>, <span class="ruby-identifier">txt</span>=<span class="ruby-keyword kw">nil</span>, <span class="ruby-operator">&</span><span class="ruby-identifier">block</span>)
|
847
|
+
<span class="ruby-ivar">@document</span>.<span class="ruby-identifier">divert</span>(<span class="ruby-identifier">tag</span>, <span class="ruby-identifier">txt</span>, <span class="ruby-operator">&</span><span class="ruby-identifier">block</span>)
|
848
|
+
<span class="ruby-keyword kw">end</span>
|
610
849
|
</pre>
|
611
850
|
</div>
|
851
|
+
|
612
852
|
</div>
|
613
853
|
</div>
|
614
854
|
|
615
|
-
|
616
|
-
|
855
|
+
|
856
|
+
<div id="method-M000078" class="method-detail">
|
857
|
+
<a name="M000078"></a>
|
617
858
|
|
618
859
|
<div class="method-heading">
|
619
|
-
|
620
|
-
<
|
860
|
+
|
861
|
+
<a href="#M000078" class="method-signature">
|
862
|
+
|
863
|
+
<span class="method-name">encode_text</span><span class="method-args">(str)</span>
|
864
|
+
|
621
865
|
</a>
|
866
|
+
|
622
867
|
</div>
|
623
|
-
|
868
|
+
|
624
869
|
<div class="method-description">
|
870
|
+
|
625
871
|
<p><a class="source-toggle" href="#"
|
626
|
-
onclick="toggleCode('
|
627
|
-
<div class="method-source-code" id="
|
872
|
+
onclick="toggleCode('M000078-source');return false;">[Source]</a></p>
|
873
|
+
<div class="method-source-code" id="M000078-source">
|
628
874
|
<pre>
|
629
|
-
<span class="ruby-comment cmt"># File lib/wee/
|
630
|
-
|
631
|
-
|
632
|
-
|
875
|
+
<span class="ruby-comment cmt"># File lib/wee/html_canvas.rb, line 107</span>
|
876
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">encode_text</span>(<span class="ruby-identifier">str</span>)
|
877
|
+
<span class="ruby-ivar">@current_brush</span>.<span class="ruby-identifier">close</span> <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@current_brush</span>
|
878
|
+
<span class="ruby-ivar">@current_brush</span> = <span class="ruby-keyword kw">nil</span>
|
879
|
+
<span class="ruby-ivar">@document</span>.<span class="ruby-identifier">encode_text</span>(<span class="ruby-identifier">str</span>)
|
880
|
+
<span class="ruby-keyword kw">nil</span>
|
881
|
+
<span class="ruby-keyword kw">end</span>
|
633
882
|
</pre>
|
634
883
|
</div>
|
884
|
+
|
635
885
|
</div>
|
636
886
|
</div>
|
637
887
|
|
638
|
-
|
639
|
-
|
888
|
+
|
889
|
+
<div id="method-M000084" class="method-detail">
|
890
|
+
<a name="M000084"></a>
|
640
891
|
|
641
892
|
<div class="method-heading">
|
642
|
-
|
643
|
-
<
|
893
|
+
|
894
|
+
<a href="#M000084" class="method-signature">
|
895
|
+
|
896
|
+
<span class="method-name">link_css</span><span class="method-args">(url)</span>
|
897
|
+
|
644
898
|
</a>
|
899
|
+
|
645
900
|
</div>
|
646
|
-
|
901
|
+
|
647
902
|
<div class="method-description">
|
903
|
+
|
648
904
|
<p><a class="source-toggle" href="#"
|
649
|
-
onclick="toggleCode('
|
650
|
-
<div class="method-source-code" id="
|
905
|
+
onclick="toggleCode('M000084-source');return false;">[Source]</a></p>
|
906
|
+
<div class="method-source-code" id="M000084-source">
|
651
907
|
<pre>
|
652
|
-
<span class="ruby-comment cmt"># File lib/wee/
|
653
|
-
|
654
|
-
|
655
|
-
<span class="ruby-
|
656
|
-
<span class="ruby-keyword kw">nil</span>
|
657
|
-
<span class="ruby-keyword kw">end</span>
|
908
|
+
<span class="ruby-comment cmt"># File lib/wee/html_canvas.rb, line 175</span>
|
909
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">link_css</span>(<span class="ruby-identifier">url</span>)
|
910
|
+
<span class="ruby-identifier">link</span>.<span class="ruby-identifier">type</span>(<span class="ruby-constant">HTML_TYPE_CSS</span>).<span class="ruby-identifier">rel</span>(<span class="ruby-constant">HTML_REL_STYLESHEET</span>).<span class="ruby-identifier">href</span>(<span class="ruby-identifier">url</span>)
|
911
|
+
<span class="ruby-keyword kw">end</span>
|
658
912
|
</pre>
|
659
913
|
</div>
|
914
|
+
|
660
915
|
</div>
|
661
916
|
</div>
|
662
917
|
|
663
|
-
|
664
|
-
|
918
|
+
|
919
|
+
<div id="method-M000080" class="method-detail">
|
920
|
+
<a name="M000080"></a>
|
665
921
|
|
666
922
|
<div class="method-heading">
|
667
|
-
|
668
|
-
<
|
923
|
+
|
924
|
+
<a href="#M000080" class="method-signature">
|
925
|
+
|
926
|
+
<span class="method-name">multiline_text</span><span class="method-args">(str, encode=true)</span>
|
927
|
+
|
669
928
|
</a>
|
929
|
+
|
670
930
|
</div>
|
671
|
-
|
931
|
+
|
672
932
|
<div class="method-description">
|
933
|
+
|
934
|
+
<p>
|
935
|
+
converts n into <br/>
|
936
|
+
</p>
|
937
|
+
|
673
938
|
<p><a class="source-toggle" href="#"
|
674
|
-
onclick="toggleCode('
|
675
|
-
<div class="method-source-code" id="
|
939
|
+
onclick="toggleCode('M000080-source');return false;">[Source]</a></p>
|
940
|
+
<div class="method-source-code" id="M000080-source">
|
676
941
|
<pre>
|
677
|
-
<span class="ruby-comment cmt"># File lib/wee/
|
678
|
-
|
679
|
-
|
680
|
-
|
942
|
+
<span class="ruby-comment cmt"># File lib/wee/html_canvas.rb, line 127</span>
|
943
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">multiline_text</span>(<span class="ruby-identifier">str</span>, <span class="ruby-identifier">encode</span>=<span class="ruby-keyword kw">true</span>)
|
944
|
+
<span class="ruby-ivar">@current_brush</span>.<span class="ruby-identifier">close</span> <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@current_brush</span>
|
945
|
+
<span class="ruby-ivar">@current_brush</span> = <span class="ruby-keyword kw">nil</span>
|
946
|
+
|
947
|
+
<span class="ruby-identifier">first</span> = <span class="ruby-keyword kw">true</span>
|
948
|
+
<span class="ruby-identifier">str</span>.<span class="ruby-identifier">each_line</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">line</span><span class="ruby-operator">|</span>
|
949
|
+
<span class="ruby-ivar">@document</span>.<span class="ruby-identifier">single_tag</span>(<span class="ruby-identifier">:br</span>) <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">first</span>
|
950
|
+
<span class="ruby-identifier">first</span> = <span class="ruby-keyword kw">false</span>
|
951
|
+
|
952
|
+
<span class="ruby-keyword kw">if</span> <span class="ruby-identifier">encode</span>
|
953
|
+
<span class="ruby-ivar">@document</span>.<span class="ruby-identifier">encode_text</span>(<span class="ruby-identifier">line</span>)
|
954
|
+
<span class="ruby-keyword kw">else</span>
|
955
|
+
<span class="ruby-ivar">@document</span>.<span class="ruby-identifier">text</span>(<span class="ruby-identifier">line</span>)
|
956
|
+
<span class="ruby-keyword kw">end</span>
|
957
|
+
<span class="ruby-keyword kw">end</span>
|
958
|
+
<span class="ruby-keyword kw">end</span>
|
681
959
|
</pre>
|
682
960
|
</div>
|
961
|
+
|
683
962
|
</div>
|
684
963
|
</div>
|
685
964
|
|
686
|
-
|
687
|
-
|
965
|
+
|
966
|
+
<div id="method-M000070" class="method-detail">
|
967
|
+
<a name="M000070"></a>
|
688
968
|
|
689
969
|
<div class="method-heading">
|
690
|
-
|
691
|
-
<
|
970
|
+
|
971
|
+
<a href="#M000070" class="method-signature">
|
972
|
+
|
973
|
+
<span class="method-name">nest</span><span class="method-args">() {|| ...}</span>
|
974
|
+
|
692
975
|
</a>
|
976
|
+
|
693
977
|
</div>
|
694
|
-
|
978
|
+
|
695
979
|
<div class="method-description">
|
980
|
+
|
696
981
|
<p><a class="source-toggle" href="#"
|
697
|
-
onclick="toggleCode('
|
698
|
-
<div class="method-source-code" id="
|
982
|
+
onclick="toggleCode('M000070-source');return false;">[Source]</a></p>
|
983
|
+
<div class="method-source-code" id="M000070-source">
|
699
984
|
<pre>
|
700
|
-
<span class="ruby-comment cmt"># File lib/wee/
|
701
|
-
|
702
|
-
|
703
|
-
|
985
|
+
<span class="ruby-comment cmt"># File lib/wee/html_canvas.rb, line 17</span>
|
986
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">nest</span>
|
987
|
+
<span class="ruby-identifier">old_brush</span> = <span class="ruby-ivar">@current_brush</span>
|
988
|
+
<span class="ruby-comment cmt"># we don't want that Brush#close is calledas #nest</span>
|
989
|
+
<span class="ruby-comment cmt"># is called from #with -> this avoids an infinite loop</span>
|
990
|
+
<span class="ruby-ivar">@current_brush</span> = <span class="ruby-keyword kw">nil</span>
|
991
|
+
<span class="ruby-keyword kw">yield</span>
|
992
|
+
<span class="ruby-ivar">@current_brush</span>.<span class="ruby-identifier">close</span> <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@current_brush</span>
|
993
|
+
<span class="ruby-ivar">@current_brush</span> = <span class="ruby-identifier">old_brush</span>
|
994
|
+
<span class="ruby-keyword kw">end</span>
|
704
995
|
</pre>
|
705
996
|
</div>
|
997
|
+
|
706
998
|
</div>
|
707
999
|
</div>
|
708
1000
|
|
709
|
-
|
710
|
-
|
1001
|
+
|
1002
|
+
<div id="method-M000085" class="method-detail">
|
1003
|
+
<a name="M000085"></a>
|
711
1004
|
|
712
1005
|
<div class="method-heading">
|
713
|
-
|
714
|
-
<
|
1006
|
+
|
1007
|
+
<a href="#M000085" class="method-signature">
|
1008
|
+
|
1009
|
+
<span class="method-name">new_radio_group</span><span class="method-args">()</span>
|
1010
|
+
|
715
1011
|
</a>
|
1012
|
+
|
716
1013
|
</div>
|
717
|
-
|
1014
|
+
|
718
1015
|
<div class="method-description">
|
1016
|
+
|
719
1017
|
<p><a class="source-toggle" href="#"
|
720
|
-
onclick="toggleCode('
|
721
|
-
<div class="method-source-code" id="
|
1018
|
+
onclick="toggleCode('M000085-source');return false;">[Source]</a></p>
|
1019
|
+
<div class="method-source-code" id="M000085-source">
|
722
1020
|
<pre>
|
723
|
-
<span class="ruby-comment cmt"># File lib/wee/
|
724
|
-
|
725
|
-
|
726
|
-
|
1021
|
+
<span class="ruby-comment cmt"># File lib/wee/html_canvas.rb, line 179</span>
|
1022
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">new_radio_group</span>
|
1023
|
+
<span class="ruby-constant">Wee</span><span class="ruby-operator">::</span><span class="ruby-constant">Brush</span><span class="ruby-operator">::</span><span class="ruby-constant">RadioButtonTag</span><span class="ruby-operator">::</span><span class="ruby-constant">RadioGroup</span>.<span class="ruby-identifier">new</span>(<span class="ruby-keyword kw">self</span>)
|
1024
|
+
<span class="ruby-keyword kw">end</span>
|
727
1025
|
</pre>
|
728
1026
|
</div>
|
1027
|
+
|
729
1028
|
</div>
|
730
1029
|
</div>
|
731
1030
|
|
732
|
-
|
733
|
-
|
1031
|
+
|
1032
|
+
<div id="method-M000083" class="method-detail">
|
1033
|
+
<a name="M000083"></a>
|
734
1034
|
|
735
1035
|
<div class="method-heading">
|
736
|
-
|
737
|
-
<
|
1036
|
+
|
1037
|
+
<a href="#M000083" class="method-signature">
|
1038
|
+
|
1039
|
+
<span class="method-name">once</span><span class="method-args">(tag) {|if block_given?| ...}</span>
|
1040
|
+
|
738
1041
|
</a>
|
1042
|
+
|
739
1043
|
</div>
|
740
|
-
|
1044
|
+
|
741
1045
|
<div class="method-description">
|
1046
|
+
|
1047
|
+
<p>
|
1048
|
+
Render specific markup only once. For example style and/or javascript of a
|
1049
|
+
component which has many instances.
|
1050
|
+
</p>
|
1051
|
+
|
742
1052
|
<p><a class="source-toggle" href="#"
|
743
|
-
onclick="toggleCode('
|
744
|
-
<div class="method-source-code" id="
|
1053
|
+
onclick="toggleCode('M000083-source');return false;">[Source]</a></p>
|
1054
|
+
<div class="method-source-code" id="M000083-source">
|
745
1055
|
<pre>
|
746
|
-
<span class="ruby-comment cmt"># File lib/wee/
|
747
|
-
|
748
|
-
|
749
|
-
|
1056
|
+
<span class="ruby-comment cmt"># File lib/wee/html_canvas.rb, line 166</span>
|
1057
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">once</span>(<span class="ruby-identifier">tag</span>)
|
1058
|
+
<span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@document</span>.<span class="ruby-identifier">set</span>.<span class="ruby-identifier">has_key?</span>(<span class="ruby-identifier">tag</span>)
|
1059
|
+
<span class="ruby-ivar">@document</span>.<span class="ruby-identifier">set</span>[<span class="ruby-identifier">tag</span>] = <span class="ruby-keyword kw">true</span>
|
1060
|
+
<span class="ruby-keyword kw">yield</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">block_given?</span>
|
1061
|
+
<span class="ruby-keyword kw">end</span>
|
750
1062
|
</pre>
|
751
1063
|
</div>
|
1064
|
+
|
752
1065
|
</div>
|
753
1066
|
</div>
|
754
1067
|
|
755
|
-
|
756
|
-
|
1068
|
+
|
1069
|
+
<div id="method-M000089" class="method-detail">
|
1070
|
+
<a name="M000089"></a>
|
757
1071
|
|
758
1072
|
<div class="method-heading">
|
759
|
-
|
760
|
-
<
|
1073
|
+
|
1074
|
+
<a href="#M000089" class="method-signature">
|
1075
|
+
|
1076
|
+
<span class="method-name">register_callback</span><span class="method-args">(type, callback)</span>
|
1077
|
+
|
761
1078
|
</a>
|
1079
|
+
|
762
1080
|
</div>
|
763
|
-
|
1081
|
+
|
764
1082
|
<div class="method-description">
|
1083
|
+
|
765
1084
|
<p><a class="source-toggle" href="#"
|
766
|
-
onclick="toggleCode('
|
767
|
-
<div class="method-source-code" id="
|
1085
|
+
onclick="toggleCode('M000089-source');return false;">[Source]</a></p>
|
1086
|
+
<div class="method-source-code" id="M000089-source">
|
768
1087
|
<pre>
|
769
|
-
<span class="ruby-comment cmt"># File lib/wee/
|
770
|
-
|
771
|
-
|
772
|
-
|
1088
|
+
<span class="ruby-comment cmt"># File lib/wee/html_canvas.rb, line 199</span>
|
1089
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">register_callback</span>(<span class="ruby-identifier">type</span>, <span class="ruby-identifier">callback</span>)
|
1090
|
+
<span class="ruby-identifier">cbs</span> = <span class="ruby-ivar">@callbacks</span>
|
1091
|
+
<span class="ruby-keyword kw">if</span> <span class="ruby-identifier">cbs</span>.<span class="ruby-identifier">respond_to?</span>(<span class="ruby-node">"#{type}_callbacks"</span>)
|
1092
|
+
<span class="ruby-identifier">cbs</span>.<span class="ruby-identifier">send</span>(<span class="ruby-node">"#{type}_callbacks"</span>).<span class="ruby-identifier">register</span>(<span class="ruby-ivar">@current_component</span>, <span class="ruby-identifier">callback</span>)
|
1093
|
+
<span class="ruby-keyword kw">else</span>
|
1094
|
+
<span class="ruby-identifier">raise</span>
|
1095
|
+
<span class="ruby-keyword kw">end</span>
|
1096
|
+
<span class="ruby-keyword kw">end</span>
|
773
1097
|
</pre>
|
774
1098
|
</div>
|
1099
|
+
|
775
1100
|
</div>
|
776
1101
|
</div>
|
777
1102
|
|
778
|
-
|
779
|
-
|
1103
|
+
|
1104
|
+
<div id="method-M000074" class="method-detail">
|
1105
|
+
<a name="M000074"></a>
|
780
1106
|
|
781
1107
|
<div class="method-heading">
|
782
|
-
|
783
|
-
<
|
1108
|
+
|
1109
|
+
<a href="#M000074" class="method-signature">
|
1110
|
+
|
1111
|
+
<span class="method-name">select_list</span><span class="method-args">(items, &block)</span>
|
1112
|
+
|
784
1113
|
</a>
|
1114
|
+
|
785
1115
|
</div>
|
786
|
-
|
1116
|
+
|
787
1117
|
<div class="method-description">
|
1118
|
+
|
788
1119
|
<p><a class="source-toggle" href="#"
|
789
|
-
onclick="toggleCode('
|
790
|
-
<div class="method-source-code" id="
|
1120
|
+
onclick="toggleCode('M000074-source');return false;">[Source]</a></p>
|
1121
|
+
<div class="method-source-code" id="M000074-source">
|
791
1122
|
<pre>
|
792
|
-
<span class="ruby-comment cmt"># File lib/wee/
|
793
|
-
|
794
|
-
|
795
|
-
|
1123
|
+
<span class="ruby-comment cmt"># File lib/wee/html_canvas.rb, line 88</span>
|
1124
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">select_list</span>(<span class="ruby-identifier">items</span>, <span class="ruby-operator">&</span><span class="ruby-identifier">block</span>)
|
1125
|
+
<span class="ruby-identifier">handle2</span>(<span class="ruby-constant">Brush</span><span class="ruby-operator">::</span><span class="ruby-constant">SelectListTag</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">items</span>), <span class="ruby-operator">&</span><span class="ruby-identifier">block</span>)
|
1126
|
+
<span class="ruby-keyword kw">end</span>
|
796
1127
|
</pre>
|
797
1128
|
</div>
|
1129
|
+
|
798
1130
|
</div>
|
799
1131
|
</div>
|
800
1132
|
|
801
|
-
|
802
|
-
|
1133
|
+
|
1134
|
+
<div id="method-M000075" class="method-detail">
|
1135
|
+
<a name="M000075"></a>
|
803
1136
|
|
804
1137
|
<div class="method-heading">
|
805
|
-
|
806
|
-
<
|
1138
|
+
|
1139
|
+
<a href="#M000075" class="method-signature">
|
1140
|
+
|
1141
|
+
<span class="method-name">space</span><span class="method-args">(n=1)</span>
|
1142
|
+
|
807
1143
|
</a>
|
1144
|
+
|
808
1145
|
</div>
|
809
|
-
|
1146
|
+
|
810
1147
|
<div class="method-description">
|
1148
|
+
|
811
1149
|
<p><a class="source-toggle" href="#"
|
812
|
-
onclick="toggleCode('
|
813
|
-
<div class="method-source-code" id="
|
1150
|
+
onclick="toggleCode('M000075-source');return false;">[Source]</a></p>
|
1151
|
+
<div class="method-source-code" id="M000075-source">
|
814
1152
|
<pre>
|
815
|
-
<span class="ruby-comment cmt"># File lib/wee/
|
816
|
-
|
817
|
-
|
818
|
-
|
1153
|
+
<span class="ruby-comment cmt"># File lib/wee/html_canvas.rb, line 94</span>
|
1154
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">space</span>(<span class="ruby-identifier">n</span>=<span class="ruby-value">1</span>)
|
1155
|
+
<span class="ruby-identifier">text</span>(<span class="ruby-constant">HTML_NBSP</span><span class="ruby-operator">*</span><span class="ruby-identifier">n</span>)
|
1156
|
+
<span class="ruby-keyword kw">end</span>
|
819
1157
|
</pre>
|
820
1158
|
</div>
|
1159
|
+
|
821
1160
|
</div>
|
822
1161
|
</div>
|
823
1162
|
|
824
|
-
|
825
|
-
|
1163
|
+
|
1164
|
+
<div id="method-M000076" class="method-detail">
|
1165
|
+
<a name="M000076"></a>
|
826
1166
|
|
827
1167
|
<div class="method-heading">
|
828
|
-
|
829
|
-
<
|
1168
|
+
|
1169
|
+
<a href="#M000076" class="method-signature">
|
1170
|
+
|
1171
|
+
<span class="method-name">text</span><span class="method-args">(str)</span>
|
1172
|
+
|
830
1173
|
</a>
|
1174
|
+
|
831
1175
|
</div>
|
832
|
-
|
1176
|
+
|
833
1177
|
<div class="method-description">
|
1178
|
+
|
834
1179
|
<p><a class="source-toggle" href="#"
|
835
|
-
onclick="toggleCode('
|
836
|
-
<div class="method-source-code" id="
|
1180
|
+
onclick="toggleCode('M000076-source');return false;">[Source]</a></p>
|
1181
|
+
<div class="method-source-code" id="M000076-source">
|
837
1182
|
<pre>
|
838
|
-
<span class="ruby-comment cmt"># File lib/wee/
|
839
|
-
|
840
|
-
|
841
|
-
|
842
|
-
|
843
|
-
|
844
|
-
<span class="ruby-identifier">src</span> = <span class="ruby-identifier">compiler</span>.<span class="ruby-identifier">compile</span>(<span class="ruby-constant">File</span>.<span class="ruby-identifier">read</span>(<span class="ruby-identifier">filename</span>))
|
845
|
-
<span class="ruby-keyword kw">if</span> <span class="ruby-identifier">$DEBUG</span>
|
846
|
-
<span class="ruby-identifier">puts</span> <span class="ruby-value str">"-------------------------"</span>
|
847
|
-
<span class="ruby-identifier">puts</span> <span class="ruby-identifier">src</span>
|
848
|
-
<span class="ruby-identifier">puts</span> <span class="ruby-value str">"-------------------------"</span>
|
1183
|
+
<span class="ruby-comment cmt"># File lib/wee/html_canvas.rb, line 98</span>
|
1184
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">text</span>(<span class="ruby-identifier">str</span>)
|
1185
|
+
<span class="ruby-ivar">@current_brush</span>.<span class="ruby-identifier">close</span> <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@current_brush</span>
|
1186
|
+
<span class="ruby-ivar">@current_brush</span> = <span class="ruby-keyword kw">nil</span>
|
1187
|
+
<span class="ruby-ivar">@document</span>.<span class="ruby-identifier">text</span>(<span class="ruby-identifier">str</span>)
|
1188
|
+
<span class="ruby-keyword kw">nil</span>
|
849
1189
|
<span class="ruby-keyword kw">end</span>
|
850
|
-
<span class="ruby-ivar">@current_component</span>.<span class="ruby-identifier">instance_eval</span>(<span class="ruby-identifier">src</span>, <span class="ruby-value str">'(erb)'</span>, <span class="ruby-value">1</span>)
|
851
|
-
<span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">nil</span>
|
852
|
-
<span class="ruby-keyword kw">end</span>
|
853
1190
|
</pre>
|
854
1191
|
</div>
|
1192
|
+
|
855
1193
|
</div>
|
856
1194
|
</div>
|
857
1195
|
|
858
|
-
|
859
|
-
|
1196
|
+
|
1197
|
+
<div id="method-M000082" class="method-detail">
|
1198
|
+
<a name="M000082"></a>
|
860
1199
|
|
861
1200
|
<div class="method-heading">
|
862
|
-
|
863
|
-
<
|
1201
|
+
|
1202
|
+
<a href="#M000082" class="method-signature">
|
1203
|
+
|
1204
|
+
<span class="method-name">update</span><span class="method-args">(*components)</span>
|
1205
|
+
|
864
1206
|
</a>
|
1207
|
+
|
865
1208
|
</div>
|
866
|
-
|
1209
|
+
|
867
1210
|
<div class="method-description">
|
1211
|
+
|
1212
|
+
<p>
|
1213
|
+
To update components in an AJAX request.
|
1214
|
+
</p>
|
1215
|
+
|
868
1216
|
<p><a class="source-toggle" href="#"
|
869
|
-
onclick="toggleCode('
|
870
|
-
<div class="method-source-code" id="
|
1217
|
+
onclick="toggleCode('M000082-source');return false;">[Source]</a></p>
|
1218
|
+
<div class="method-source-code" id="M000082-source">
|
871
1219
|
<pre>
|
872
|
-
<span class="ruby-comment cmt"># File lib/wee/
|
873
|
-
|
874
|
-
|
875
|
-
|
1220
|
+
<span class="ruby-comment cmt"># File lib/wee/html_canvas.rb, line 155</span>
|
1221
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">update</span>(<span class="ruby-operator">*</span><span class="ruby-identifier">components</span>)
|
1222
|
+
<span class="ruby-identifier">components</span>.<span class="ruby-identifier">each</span> {<span class="ruby-operator">|</span><span class="ruby-identifier">c</span><span class="ruby-operator">|</span>
|
1223
|
+
<span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">callbacks</span>.<span class="ruby-identifier">unregister</span>(<span class="ruby-identifier">c</span>)
|
1224
|
+
<span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">render_decoration</span>(<span class="ruby-identifier">c</span>)
|
1225
|
+
}
|
1226
|
+
<span class="ruby-keyword kw">end</span>
|
876
1227
|
</pre>
|
877
1228
|
</div>
|
1229
|
+
|
878
1230
|
</div>
|
879
1231
|
</div>
|
880
1232
|
|
881
|
-
|
882
|
-
|
1233
|
+
|
1234
|
+
<div id="method-M000086" class="method-detail">
|
1235
|
+
<a name="M000086"></a>
|
883
1236
|
|
884
1237
|
<div class="method-heading">
|
885
|
-
|
886
|
-
<
|
1238
|
+
|
1239
|
+
<a href="#M000086" class="method-signature">
|
1240
|
+
|
1241
|
+
<span class="method-name">url_for_callback</span><span class="method-args">(callback, type=:action, hash=nil)</span>
|
1242
|
+
|
887
1243
|
</a>
|
1244
|
+
|
888
1245
|
</div>
|
889
|
-
|
1246
|
+
|
890
1247
|
<div class="method-description">
|
1248
|
+
|
891
1249
|
<p><a class="source-toggle" href="#"
|
892
|
-
onclick="toggleCode('
|
893
|
-
<div class="method-source-code" id="
|
1250
|
+
onclick="toggleCode('M000086-source');return false;">[Source]</a></p>
|
1251
|
+
<div class="method-source-code" id="M000086-source">
|
894
1252
|
<pre>
|
895
|
-
<span class="ruby-comment cmt"># File lib/wee/
|
896
|
-
|
897
|
-
|
898
|
-
|
1253
|
+
<span class="ruby-comment cmt"># File lib/wee/html_canvas.rb, line 183</span>
|
1254
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">url_for_callback</span>(<span class="ruby-identifier">callback</span>, <span class="ruby-identifier">type</span>=<span class="ruby-identifier">:action</span>, <span class="ruby-identifier">hash</span>=<span class="ruby-keyword kw">nil</span>)
|
1255
|
+
<span class="ruby-identifier">url_for_callback_id</span>(<span class="ruby-identifier">register_callback</span>(<span class="ruby-identifier">type</span>, <span class="ruby-identifier">callback</span>), <span class="ruby-identifier">hash</span>)
|
1256
|
+
<span class="ruby-keyword kw">end</span>
|
899
1257
|
</pre>
|
900
1258
|
</div>
|
1259
|
+
|
901
1260
|
</div>
|
902
1261
|
</div>
|
903
1262
|
|
904
|
-
|
905
|
-
|
1263
|
+
|
1264
|
+
<div id="method-M000087" class="method-detail">
|
1265
|
+
<a name="M000087"></a>
|
906
1266
|
|
907
1267
|
<div class="method-heading">
|
908
|
-
|
909
|
-
<
|
1268
|
+
|
1269
|
+
<a href="#M000087" class="method-signature">
|
1270
|
+
|
1271
|
+
<span class="method-name">url_for_callback_id</span><span class="method-args">(callback_id, hash=nil)</span>
|
1272
|
+
|
910
1273
|
</a>
|
1274
|
+
|
911
1275
|
</div>
|
912
|
-
|
1276
|
+
|
913
1277
|
<div class="method-description">
|
1278
|
+
|
914
1279
|
<p><a class="source-toggle" href="#"
|
915
|
-
onclick="toggleCode('
|
916
|
-
<div class="method-source-code" id="
|
1280
|
+
onclick="toggleCode('M000087-source');return false;">[Source]</a></p>
|
1281
|
+
<div class="method-source-code" id="M000087-source">
|
917
1282
|
<pre>
|
918
|
-
<span class="ruby-comment cmt"># File lib/wee/
|
919
|
-
|
920
|
-
|
921
|
-
|
1283
|
+
<span class="ruby-comment cmt"># File lib/wee/html_canvas.rb, line 187</span>
|
1284
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">url_for_callback_id</span>(<span class="ruby-identifier">callback_id</span>, <span class="ruby-identifier">hash</span>=<span class="ruby-keyword kw">nil</span>)
|
1285
|
+
<span class="ruby-keyword kw">if</span> <span class="ruby-identifier">hash</span>
|
1286
|
+
<span class="ruby-identifier">build_url</span>(<span class="ruby-identifier">hash</span>.<span class="ruby-identifier">update</span>(<span class="ruby-identifier">:callback_id</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">callback_id</span>))
|
1287
|
+
<span class="ruby-keyword kw">else</span>
|
1288
|
+
<span class="ruby-identifier">build_url</span>(<span class="ruby-identifier">:callback_id</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">callback_id</span>)
|
1289
|
+
<span class="ruby-keyword kw">end</span>
|
1290
|
+
<span class="ruby-keyword kw">end</span>
|
922
1291
|
</pre>
|
923
1292
|
</div>
|
1293
|
+
|
924
1294
|
</div>
|
925
1295
|
</div>
|
926
1296
|
|
927
|
-
|
928
|
-
|
1297
|
+
|
1298
|
+
<h3 class="section-bar">Protected Instance methods</h3>
|
1299
|
+
|
1300
|
+
|
1301
|
+
<div id="method-M000091" class="method-detail">
|
1302
|
+
<a name="M000091"></a>
|
929
1303
|
|
930
1304
|
<div class="method-heading">
|
931
|
-
|
932
|
-
<
|
1305
|
+
|
1306
|
+
<a href="#M000091" class="method-signature">
|
1307
|
+
|
1308
|
+
<span class="method-name">handle</span><span class="method-args">(brush, *args, &block)</span>
|
1309
|
+
|
933
1310
|
</a>
|
1311
|
+
|
934
1312
|
</div>
|
935
|
-
|
1313
|
+
|
936
1314
|
<div class="method-description">
|
1315
|
+
|
937
1316
|
<p><a class="source-toggle" href="#"
|
938
|
-
onclick="toggleCode('
|
939
|
-
<div class="method-source-code" id="
|
1317
|
+
onclick="toggleCode('M000091-source');return false;">[Source]</a></p>
|
1318
|
+
<div class="method-source-code" id="M000091-source">
|
940
1319
|
<pre>
|
941
|
-
<span class="ruby-comment cmt"># File lib/wee/
|
942
|
-
|
943
|
-
|
944
|
-
|
1320
|
+
<span class="ruby-comment cmt"># File lib/wee/html_canvas.rb, line 219</span>
|
1321
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">handle</span>(<span class="ruby-identifier">brush</span>, <span class="ruby-operator">*</span><span class="ruby-identifier">args</span>, <span class="ruby-operator">&</span><span class="ruby-identifier">block</span>)
|
1322
|
+
<span class="ruby-keyword kw">if</span> <span class="ruby-identifier">block</span> <span class="ruby-keyword kw">or</span> <span class="ruby-keyword kw">not</span> <span class="ruby-identifier">args</span>.<span class="ruby-identifier">empty?</span>
|
1323
|
+
<span class="ruby-identifier">set_brush</span>(<span class="ruby-identifier">brush</span>)
|
1324
|
+
<span class="ruby-identifier">brush</span>.<span class="ruby-identifier">with</span>(<span class="ruby-operator">*</span><span class="ruby-identifier">args</span>, <span class="ruby-operator">&</span><span class="ruby-identifier">block</span>)
|
1325
|
+
<span class="ruby-keyword kw">else</span>
|
1326
|
+
<span class="ruby-identifier">set_brush</span>(<span class="ruby-identifier">brush</span>)
|
1327
|
+
<span class="ruby-keyword kw">end</span>
|
1328
|
+
<span class="ruby-keyword kw">end</span>
|
945
1329
|
</pre>
|
946
1330
|
</div>
|
1331
|
+
|
947
1332
|
</div>
|
948
1333
|
</div>
|
949
1334
|
|
950
|
-
|
951
|
-
|
1335
|
+
|
1336
|
+
<div id="method-M000092" class="method-detail">
|
1337
|
+
<a name="M000092"></a>
|
952
1338
|
|
953
1339
|
<div class="method-heading">
|
954
|
-
|
955
|
-
<
|
1340
|
+
|
1341
|
+
<a href="#M000092" class="method-signature">
|
1342
|
+
|
1343
|
+
<span class="method-name">handle2</span><span class="method-args">(brush, &block)</span>
|
1344
|
+
|
956
1345
|
</a>
|
1346
|
+
|
957
1347
|
</div>
|
958
|
-
|
1348
|
+
|
959
1349
|
<div class="method-description">
|
1350
|
+
|
960
1351
|
<p><a class="source-toggle" href="#"
|
961
|
-
onclick="toggleCode('
|
962
|
-
<div class="method-source-code" id="
|
1352
|
+
onclick="toggleCode('M000092-source');return false;">[Source]</a></p>
|
1353
|
+
<div class="method-source-code" id="M000092-source">
|
963
1354
|
<pre>
|
964
|
-
<span class="ruby-comment cmt"># File lib/wee/
|
965
|
-
|
966
|
-
|
967
|
-
|
968
|
-
|
969
|
-
|
1355
|
+
<span class="ruby-comment cmt"># File lib/wee/html_canvas.rb, line 228</span>
|
1356
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">handle2</span>(<span class="ruby-identifier">brush</span>, <span class="ruby-operator">&</span><span class="ruby-identifier">block</span>)
|
1357
|
+
<span class="ruby-keyword kw">if</span> <span class="ruby-identifier">block</span>
|
1358
|
+
<span class="ruby-identifier">set_brush</span>(<span class="ruby-identifier">brush</span>)
|
1359
|
+
<span class="ruby-identifier">brush</span>.<span class="ruby-identifier">with</span>(<span class="ruby-operator">&</span><span class="ruby-identifier">block</span>)
|
1360
|
+
<span class="ruby-keyword kw">else</span>
|
1361
|
+
<span class="ruby-identifier">set_brush</span>(<span class="ruby-identifier">brush</span>)
|
1362
|
+
<span class="ruby-keyword kw">end</span>
|
1363
|
+
<span class="ruby-keyword kw">end</span>
|
970
1364
|
</pre>
|
971
1365
|
</div>
|
1366
|
+
|
972
1367
|
</div>
|
973
1368
|
</div>
|
974
1369
|
|
975
|
-
|
976
|
-
|
1370
|
+
|
1371
|
+
<div id="method-M000093" class="method-detail">
|
1372
|
+
<a name="M000093"></a>
|
977
1373
|
|
978
1374
|
<div class="method-heading">
|
979
|
-
|
980
|
-
<span class="method-name">
|
981
|
-
|
1375
|
+
|
1376
|
+
<span class="method-name">handle3</span><span class="method-args">(brush)</span>
|
1377
|
+
|
982
1378
|
</div>
|
983
|
-
|
1379
|
+
|
984
1380
|
<div class="method-description">
|
985
|
-
|
986
|
-
|
987
|
-
|
988
|
-
|
989
|
-
|
990
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">url_for_named_callback</span>(<span class="ruby-identifier">name</span>, <span class="ruby-identifier">callback</span>)
|
991
|
-
<span class="ruby-identifier">url_for_callback_id</span>(<span class="ruby-identifier">register_named_callback</span>(<span class="ruby-identifier">name</span>, <span class="ruby-identifier">:action</span>, <span class="ruby-identifier">callback</span>))
|
992
|
-
<span class="ruby-keyword kw">end</span>
|
993
|
-
</pre>
|
994
|
-
</div>
|
1381
|
+
|
1382
|
+
<p>
|
1383
|
+
Alias for <a href="HtmlCanvas.html#M000090">set_brush</a>
|
1384
|
+
</p>
|
1385
|
+
|
995
1386
|
</div>
|
996
1387
|
</div>
|
997
1388
|
|
998
|
-
<h3 class="section-bar">Private Instance methods</h3>
|
999
1389
|
|
1000
|
-
<div id="method-
|
1001
|
-
<a name="
|
1390
|
+
<div id="method-M000090" class="method-detail">
|
1391
|
+
<a name="M000090"></a>
|
1002
1392
|
|
1003
1393
|
<div class="method-heading">
|
1004
|
-
|
1005
|
-
<
|
1394
|
+
|
1395
|
+
<a href="#M000090" class="method-signature">
|
1396
|
+
|
1397
|
+
<span class="method-name">set_brush</span><span class="method-args">(brush)</span>
|
1398
|
+
|
1006
1399
|
</a>
|
1400
|
+
|
1007
1401
|
</div>
|
1008
|
-
|
1402
|
+
|
1009
1403
|
<div class="method-description">
|
1404
|
+
|
1010
1405
|
<p><a class="source-toggle" href="#"
|
1011
|
-
onclick="toggleCode('
|
1012
|
-
<div class="method-source-code" id="
|
1406
|
+
onclick="toggleCode('M000090-source');return false;">[Source]</a></p>
|
1407
|
+
<div class="method-source-code" id="M000090-source">
|
1013
1408
|
<pre>
|
1014
|
-
<span class="ruby-comment cmt"># File lib/wee/
|
1015
|
-
|
1016
|
-
|
1017
|
-
|
1018
|
-
<span class="ruby-
|
1019
|
-
|
1020
|
-
|
1409
|
+
<span class="ruby-comment cmt"># File lib/wee/html_canvas.rb, line 210</span>
|
1410
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">set_brush</span>(<span class="ruby-identifier">brush</span>)
|
1411
|
+
<span class="ruby-identifier">brush</span>.<span class="ruby-identifier">setup</span>(<span class="ruby-keyword kw">self</span>, <span class="ruby-ivar">@document</span>)
|
1412
|
+
|
1413
|
+
<span class="ruby-ivar">@current_brush</span>.<span class="ruby-identifier">close</span> <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@current_brush</span>
|
1414
|
+
<span class="ruby-ivar">@current_brush</span> = <span class="ruby-identifier">brush</span>
|
1415
|
+
|
1416
|
+
<span class="ruby-keyword kw">return</span> <span class="ruby-identifier">brush</span>
|
1021
1417
|
<span class="ruby-keyword kw">end</span>
|
1022
|
-
<span class="ruby-keyword kw">end</span>
|
1023
1418
|
</pre>
|
1024
1419
|
</div>
|
1420
|
+
|
1025
1421
|
</div>
|
1026
1422
|
</div>
|
1027
1423
|
|
1028
1424
|
|
1425
|
+
|
1029
1426
|
</div>
|
1030
1427
|
|
1031
1428
|
|
1032
|
-
</div>
|
1033
1429
|
|
1034
1430
|
|
1431
|
+
</div>
|
1432
|
+
|
1035
1433
|
<div id="validator-badges">
|
1036
1434
|
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
1037
1435
|
</div>
|
1038
1436
|
|
1039
1437
|
</body>
|
1040
|
-
</html>
|
1438
|
+
</html>
|