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,126 +0,0 @@
|
|
1
|
-
<?xml version="1.0" encoding="iso-8859-1"?>
|
2
|
-
<!DOCTYPE html
|
3
|
-
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
4
|
-
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
5
|
-
|
6
|
-
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
7
|
-
<head>
|
8
|
-
<title>Class: OgApplication</title>
|
9
|
-
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
10
|
-
<meta http-equiv="Content-Script-Type" content="text/javascript" />
|
11
|
-
<link rel="stylesheet" href=".././rdoc-style.css" type="text/css" media="screen" />
|
12
|
-
<script type="text/javascript">
|
13
|
-
// <![CDATA[
|
14
|
-
|
15
|
-
function popupCode( url ) {
|
16
|
-
window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
|
17
|
-
}
|
18
|
-
|
19
|
-
function toggleCode( id ) {
|
20
|
-
if ( document.getElementById )
|
21
|
-
elem = document.getElementById( id );
|
22
|
-
else if ( document.all )
|
23
|
-
elem = eval( "document.all." + id );
|
24
|
-
else
|
25
|
-
return false;
|
26
|
-
|
27
|
-
elemStyle = elem.style;
|
28
|
-
|
29
|
-
if ( elemStyle.display != "block" ) {
|
30
|
-
elemStyle.display = "block"
|
31
|
-
} else {
|
32
|
-
elemStyle.display = "none"
|
33
|
-
}
|
34
|
-
|
35
|
-
return true;
|
36
|
-
}
|
37
|
-
|
38
|
-
// Make codeblocks hidden by default
|
39
|
-
document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
|
40
|
-
|
41
|
-
// ]]>
|
42
|
-
</script>
|
43
|
-
|
44
|
-
</head>
|
45
|
-
<body>
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
<div id="classHeader">
|
50
|
-
<table class="header-table">
|
51
|
-
<tr class="top-aligned-row">
|
52
|
-
<td><strong>Class</strong></td>
|
53
|
-
<td class="class-name-in-header">OgApplication</td>
|
54
|
-
</tr>
|
55
|
-
<tr class="top-aligned-row">
|
56
|
-
<td><strong>In:</strong></td>
|
57
|
-
<td>
|
58
|
-
<a href="../files/lib/wee/databases/og/application_rb.html">
|
59
|
-
lib/wee/databases/og/application.rb
|
60
|
-
</a>
|
61
|
-
<br />
|
62
|
-
</td>
|
63
|
-
</tr>
|
64
|
-
|
65
|
-
<tr class="top-aligned-row">
|
66
|
-
<td><strong>Parent:</strong></td>
|
67
|
-
<td>
|
68
|
-
<a href="Wee/Application.html">
|
69
|
-
Wee::Application
|
70
|
-
</a>
|
71
|
-
</td>
|
72
|
-
</tr>
|
73
|
-
</table>
|
74
|
-
</div>
|
75
|
-
<!-- banner header -->
|
76
|
-
|
77
|
-
<div id="bodyContent">
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
<div id="contextContent">
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
</div>
|
86
|
-
|
87
|
-
|
88
|
-
</div>
|
89
|
-
|
90
|
-
|
91
|
-
<!-- if includes -->
|
92
|
-
|
93
|
-
<div id="section">
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
<div id="attribute-list">
|
100
|
-
<h3 class="section-bar">Attributes</h3>
|
101
|
-
|
102
|
-
<div class="name-list">
|
103
|
-
<table>
|
104
|
-
<tr class="top-aligned-row context-row">
|
105
|
-
<td class="context-item-name">db</td>
|
106
|
-
<td class="context-item-value"> [RW] </td>
|
107
|
-
<td class="context-item-desc"></td>
|
108
|
-
</tr>
|
109
|
-
</table>
|
110
|
-
</div>
|
111
|
-
</div>
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
<!-- if method_list -->
|
116
|
-
|
117
|
-
|
118
|
-
</div>
|
119
|
-
|
120
|
-
|
121
|
-
<div id="validator-badges">
|
122
|
-
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
123
|
-
</div>
|
124
|
-
|
125
|
-
</body>
|
126
|
-
</html>
|
@@ -1,827 +0,0 @@
|
|
1
|
-
<?xml version="1.0" encoding="iso-8859-1"?>
|
2
|
-
<!DOCTYPE html
|
3
|
-
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
4
|
-
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
5
|
-
|
6
|
-
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
7
|
-
<head>
|
8
|
-
<title>Class: OgScaffolder</title>
|
9
|
-
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
10
|
-
<meta http-equiv="Content-Script-Type" content="text/javascript" />
|
11
|
-
<link rel="stylesheet" href=".././rdoc-style.css" type="text/css" media="screen" />
|
12
|
-
<script type="text/javascript">
|
13
|
-
// <![CDATA[
|
14
|
-
|
15
|
-
function popupCode( url ) {
|
16
|
-
window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
|
17
|
-
}
|
18
|
-
|
19
|
-
function toggleCode( id ) {
|
20
|
-
if ( document.getElementById )
|
21
|
-
elem = document.getElementById( id );
|
22
|
-
else if ( document.all )
|
23
|
-
elem = eval( "document.all." + id );
|
24
|
-
else
|
25
|
-
return false;
|
26
|
-
|
27
|
-
elemStyle = elem.style;
|
28
|
-
|
29
|
-
if ( elemStyle.display != "block" ) {
|
30
|
-
elemStyle.display = "block"
|
31
|
-
} else {
|
32
|
-
elemStyle.display = "none"
|
33
|
-
}
|
34
|
-
|
35
|
-
return true;
|
36
|
-
}
|
37
|
-
|
38
|
-
// Make codeblocks hidden by default
|
39
|
-
document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
|
40
|
-
|
41
|
-
// ]]>
|
42
|
-
</script>
|
43
|
-
|
44
|
-
</head>
|
45
|
-
<body>
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
<div id="classHeader">
|
50
|
-
<table class="header-table">
|
51
|
-
<tr class="top-aligned-row">
|
52
|
-
<td><strong>Class</strong></td>
|
53
|
-
<td class="class-name-in-header">OgScaffolder</td>
|
54
|
-
</tr>
|
55
|
-
<tr class="top-aligned-row">
|
56
|
-
<td><strong>In:</strong></td>
|
57
|
-
<td>
|
58
|
-
<a href="../files/lib/wee/databases/og/old_scaffolder_rb.html">
|
59
|
-
lib/wee/databases/og/old_scaffolder.rb
|
60
|
-
</a>
|
61
|
-
<br />
|
62
|
-
<a href="../files/lib/wee/databases/og/scaffolder_rb.html">
|
63
|
-
lib/wee/databases/og/scaffolder.rb
|
64
|
-
</a>
|
65
|
-
<br />
|
66
|
-
</td>
|
67
|
-
</tr>
|
68
|
-
|
69
|
-
<tr class="top-aligned-row">
|
70
|
-
<td><strong>Parent:</strong></td>
|
71
|
-
<td>
|
72
|
-
<a href="Wee/Component.html">
|
73
|
-
Wee::Component
|
74
|
-
</a>
|
75
|
-
</td>
|
76
|
-
</tr>
|
77
|
-
</table>
|
78
|
-
</div>
|
79
|
-
<!-- banner header -->
|
80
|
-
|
81
|
-
<div id="bodyContent">
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
<div id="contextContent">
|
86
|
-
|
87
|
-
<div id="description">
|
88
|
-
<p>
|
89
|
-
This is a Rails-like scaffolder for use with Og (<a
|
90
|
-
href="http://navel.gr/nitro">navel.gr/nitro</a>) domain objects.
|
91
|
-
</p>
|
92
|
-
|
93
|
-
</div>
|
94
|
-
|
95
|
-
|
96
|
-
</div>
|
97
|
-
|
98
|
-
<div id="method-list">
|
99
|
-
<h3 class="section-bar">Methods</h3>
|
100
|
-
|
101
|
-
<div class="name-list">
|
102
|
-
<a href="#M000054">add</a>
|
103
|
-
<a href="#M000040">cancel</a>
|
104
|
-
<a href="#M000037">confirm_delete</a>
|
105
|
-
<a href="#M000056">confirm_destroy</a>
|
106
|
-
<a href="#M000042">create</a>
|
107
|
-
<a href="#M000036">delete</a>
|
108
|
-
<a href="#M000055">destroy</a>
|
109
|
-
<a href="#M000057">domain_objects</a>
|
110
|
-
<a href="#M000038">edit</a>
|
111
|
-
<a href="#M000053">edit</a>
|
112
|
-
<a href="#M000058">editor_class</a>
|
113
|
-
<a href="#M000059">editor_for</a>
|
114
|
-
<a href="#M000044">new</a>
|
115
|
-
<a href="#M000035">new</a>
|
116
|
-
<a href="#M000041">refresh</a>
|
117
|
-
<a href="#M000045">render</a>
|
118
|
-
<a href="#M000043">render</a>
|
119
|
-
<a href="#M000051">render_action</a>
|
120
|
-
<a href="#M000047">render_action_header</a>
|
121
|
-
<a href="#M000049">render_body</a>
|
122
|
-
<a href="#M000046">render_header</a>
|
123
|
-
<a href="#M000050">render_object</a>
|
124
|
-
<a href="#M000052">render_property</a>
|
125
|
-
<a href="#M000048">render_property_header</a>
|
126
|
-
<a href="#M000039">save</a>
|
127
|
-
</div>
|
128
|
-
</div>
|
129
|
-
|
130
|
-
</div>
|
131
|
-
|
132
|
-
|
133
|
-
<!-- if includes -->
|
134
|
-
|
135
|
-
<div id="section">
|
136
|
-
|
137
|
-
<div id="class-list">
|
138
|
-
<h3 class="section-bar">Classes and Modules</h3>
|
139
|
-
|
140
|
-
Class <a href="OgScaffolder/Editor.html" class="link">OgScaffolder::Editor</a><br />
|
141
|
-
|
142
|
-
</div>
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
<!-- if method_list -->
|
151
|
-
<div id="methods">
|
152
|
-
<h3 class="section-bar">Public Class methods</h3>
|
153
|
-
|
154
|
-
<div id="method-M000044" class="method-detail">
|
155
|
-
<a name="M000044"></a>
|
156
|
-
|
157
|
-
<div class="method-heading">
|
158
|
-
<a href="#M000044" class="method-signature">
|
159
|
-
<span class="method-name">new</span><span class="method-args">(domain_class)</span>
|
160
|
-
</a>
|
161
|
-
</div>
|
162
|
-
|
163
|
-
<div class="method-description">
|
164
|
-
<p><a class="source-toggle" href="#"
|
165
|
-
onclick="toggleCode('M000044-source');return false;">[Source]</a></p>
|
166
|
-
<div class="method-source-code" id="M000044-source">
|
167
|
-
<pre>
|
168
|
-
<span class="ruby-comment cmt"># File lib/wee/databases/og/scaffolder.rb, line 5</span>
|
169
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">domain_class</span>)
|
170
|
-
<span class="ruby-keyword kw">super</span>()
|
171
|
-
<span class="ruby-ivar">@domain_class</span> = <span class="ruby-identifier">domain_class</span>
|
172
|
-
<span class="ruby-ivar">@props</span> = <span class="ruby-ivar">@domain_class</span>.<span class="ruby-identifier">__props</span>.<span class="ruby-identifier">reject</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">name</span> <span class="ruby-operator">==</span> <span class="ruby-value str">'oid'</span>}
|
173
|
-
<span class="ruby-keyword kw">end</span>
|
174
|
-
</pre>
|
175
|
-
</div>
|
176
|
-
</div>
|
177
|
-
</div>
|
178
|
-
|
179
|
-
<div id="method-M000035" class="method-detail">
|
180
|
-
<a name="M000035"></a>
|
181
|
-
|
182
|
-
<div class="method-heading">
|
183
|
-
<a href="#M000035" class="method-signature">
|
184
|
-
<span class="method-name">new</span><span class="method-args">(domain_class)</span>
|
185
|
-
</a>
|
186
|
-
</div>
|
187
|
-
|
188
|
-
<div class="method-description">
|
189
|
-
<p><a class="source-toggle" href="#"
|
190
|
-
onclick="toggleCode('M000035-source');return false;">[Source]</a></p>
|
191
|
-
<div class="method-source-code" id="M000035-source">
|
192
|
-
<pre>
|
193
|
-
<span class="ruby-comment cmt"># File lib/wee/databases/og/old_scaffolder.rb, line 3</span>
|
194
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">domain_class</span>)
|
195
|
-
<span class="ruby-keyword kw">super</span>()
|
196
|
-
<span class="ruby-ivar">@domain_class</span> = <span class="ruby-identifier">domain_class</span>
|
197
|
-
<span class="ruby-ivar">@attributes</span> = <span class="ruby-identifier">domain_class</span>.<span class="ruby-identifier">__props</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">name</span>}.<span class="ruby-identifier">reject</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-operator">==</span> <span class="ruby-value str">'oid'</span>}
|
198
|
-
<span class="ruby-keyword kw">end</span>
|
199
|
-
</pre>
|
200
|
-
</div>
|
201
|
-
</div>
|
202
|
-
</div>
|
203
|
-
|
204
|
-
<h3 class="section-bar">Public Instance methods</h3>
|
205
|
-
|
206
|
-
<div id="method-M000054" class="method-detail">
|
207
|
-
<a name="M000054"></a>
|
208
|
-
|
209
|
-
<div class="method-heading">
|
210
|
-
<a href="#M000054" class="method-signature">
|
211
|
-
<span class="method-name">add</span><span class="method-args">()</span>
|
212
|
-
</a>
|
213
|
-
</div>
|
214
|
-
|
215
|
-
<div class="method-description">
|
216
|
-
<p><a class="source-toggle" href="#"
|
217
|
-
onclick="toggleCode('M000054-source');return false;">[Source]</a></p>
|
218
|
-
<div class="method-source-code" id="M000054-source">
|
219
|
-
<pre>
|
220
|
-
<span class="ruby-comment cmt"># File lib/wee/databases/og/scaffolder.rb, line 69</span>
|
221
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">add</span>
|
222
|
-
<span class="ruby-identifier">call</span> <span class="ruby-identifier">editor_for</span>(<span class="ruby-ivar">@domain_class</span>.<span class="ruby-identifier">new</span>)
|
223
|
-
<span class="ruby-keyword kw">end</span>
|
224
|
-
</pre>
|
225
|
-
</div>
|
226
|
-
</div>
|
227
|
-
</div>
|
228
|
-
|
229
|
-
<div id="method-M000040" class="method-detail">
|
230
|
-
<a name="M000040"></a>
|
231
|
-
|
232
|
-
<div class="method-heading">
|
233
|
-
<a href="#M000040" class="method-signature">
|
234
|
-
<span class="method-name">cancel</span><span class="method-args">()</span>
|
235
|
-
</a>
|
236
|
-
</div>
|
237
|
-
|
238
|
-
<div class="method-description">
|
239
|
-
<p><a class="source-toggle" href="#"
|
240
|
-
onclick="toggleCode('M000040-source');return false;">[Source]</a></p>
|
241
|
-
<div class="method-source-code" id="M000040-source">
|
242
|
-
<pre>
|
243
|
-
<span class="ruby-comment cmt"># File lib/wee/databases/og/old_scaffolder.rb, line 29</span>
|
244
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">cancel</span>
|
245
|
-
<span class="ruby-ivar">@objs</span>.<span class="ruby-identifier">delete</span>(<span class="ruby-ivar">@edit</span>) <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@edit</span> <span class="ruby-keyword kw">and</span> <span class="ruby-ivar">@edit</span>.<span class="ruby-identifier">oid</span>.<span class="ruby-identifier">nil?</span>
|
246
|
-
<span class="ruby-ivar">@edit</span> = <span class="ruby-keyword kw">nil</span>
|
247
|
-
<span class="ruby-keyword kw">end</span>
|
248
|
-
</pre>
|
249
|
-
</div>
|
250
|
-
</div>
|
251
|
-
</div>
|
252
|
-
|
253
|
-
<div id="method-M000037" class="method-detail">
|
254
|
-
<a name="M000037"></a>
|
255
|
-
|
256
|
-
<div class="method-heading">
|
257
|
-
<a href="#M000037" class="method-signature">
|
258
|
-
<span class="method-name">confirm_delete</span><span class="method-args">(confirmed, obj)</span>
|
259
|
-
</a>
|
260
|
-
</div>
|
261
|
-
|
262
|
-
<div class="method-description">
|
263
|
-
<p><a class="source-toggle" href="#"
|
264
|
-
onclick="toggleCode('M000037-source');return false;">[Source]</a></p>
|
265
|
-
<div class="method-source-code" id="M000037-source">
|
266
|
-
<pre>
|
267
|
-
<span class="ruby-comment cmt"># File lib/wee/databases/og/old_scaffolder.rb, line 13</span>
|
268
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">confirm_delete</span>(<span class="ruby-identifier">confirmed</span>, <span class="ruby-identifier">obj</span>)
|
269
|
-
<span class="ruby-keyword kw">if</span> <span class="ruby-identifier">confirmed</span>
|
270
|
-
<span class="ruby-ivar">@objs</span>.<span class="ruby-identifier">delete</span>(<span class="ruby-identifier">obj</span>)
|
271
|
-
<span class="ruby-identifier">obj</span>.<span class="ruby-identifier">delete!</span>
|
272
|
-
<span class="ruby-keyword kw">end</span>
|
273
|
-
<span class="ruby-keyword kw">end</span>
|
274
|
-
</pre>
|
275
|
-
</div>
|
276
|
-
</div>
|
277
|
-
</div>
|
278
|
-
|
279
|
-
<div id="method-M000056" class="method-detail">
|
280
|
-
<a name="M000056"></a>
|
281
|
-
|
282
|
-
<div class="method-heading">
|
283
|
-
<a href="#M000056" class="method-signature">
|
284
|
-
<span class="method-name">confirm_destroy</span><span class="method-args">(obj, confirmed)</span>
|
285
|
-
</a>
|
286
|
-
</div>
|
287
|
-
|
288
|
-
<div class="method-description">
|
289
|
-
<p><a class="source-toggle" href="#"
|
290
|
-
onclick="toggleCode('M000056-source');return false;">[Source]</a></p>
|
291
|
-
<div class="method-source-code" id="M000056-source">
|
292
|
-
<pre>
|
293
|
-
<span class="ruby-comment cmt"># File lib/wee/databases/og/scaffolder.rb, line 78</span>
|
294
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">confirm_destroy</span>(<span class="ruby-identifier">obj</span>, <span class="ruby-identifier">confirmed</span>)
|
295
|
-
<span class="ruby-identifier">obj</span>.<span class="ruby-identifier">delete!</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">confirmed</span>
|
296
|
-
<span class="ruby-keyword kw">end</span>
|
297
|
-
</pre>
|
298
|
-
</div>
|
299
|
-
</div>
|
300
|
-
</div>
|
301
|
-
|
302
|
-
<div id="method-M000042" class="method-detail">
|
303
|
-
<a name="M000042"></a>
|
304
|
-
|
305
|
-
<div class="method-heading">
|
306
|
-
<a href="#M000042" class="method-signature">
|
307
|
-
<span class="method-name">create</span><span class="method-args">()</span>
|
308
|
-
</a>
|
309
|
-
</div>
|
310
|
-
|
311
|
-
<div class="method-description">
|
312
|
-
<p><a class="source-toggle" href="#"
|
313
|
-
onclick="toggleCode('M000042-source');return false;">[Source]</a></p>
|
314
|
-
<div class="method-source-code" id="M000042-source">
|
315
|
-
<pre>
|
316
|
-
<span class="ruby-comment cmt"># File lib/wee/databases/og/old_scaffolder.rb, line 38</span>
|
317
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">create</span>
|
318
|
-
<span class="ruby-ivar">@objs</span> <span class="ruby-operator"><<</span> (<span class="ruby-ivar">@edit</span> = <span class="ruby-ivar">@domain_class</span>.<span class="ruby-identifier">new</span>)
|
319
|
-
<span class="ruby-keyword kw">end</span>
|
320
|
-
</pre>
|
321
|
-
</div>
|
322
|
-
</div>
|
323
|
-
</div>
|
324
|
-
|
325
|
-
<div id="method-M000036" class="method-detail">
|
326
|
-
<a name="M000036"></a>
|
327
|
-
|
328
|
-
<div class="method-heading">
|
329
|
-
<a href="#M000036" class="method-signature">
|
330
|
-
<span class="method-name">delete</span><span class="method-args">(obj)</span>
|
331
|
-
</a>
|
332
|
-
</div>
|
333
|
-
|
334
|
-
<div class="method-description">
|
335
|
-
<p><a class="source-toggle" href="#"
|
336
|
-
onclick="toggleCode('M000036-source');return false;">[Source]</a></p>
|
337
|
-
<div class="method-source-code" id="M000036-source">
|
338
|
-
<pre>
|
339
|
-
<span class="ruby-comment cmt"># File lib/wee/databases/og/old_scaffolder.rb, line 9</span>
|
340
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">delete</span>(<span class="ruby-identifier">obj</span>)
|
341
|
-
<span class="ruby-identifier">call</span> <span class="ruby-constant">Wee</span><span class="ruby-operator">::</span><span class="ruby-constant">MessageBox</span>.<span class="ruby-identifier">new</span>(<span class="ruby-value str">'Really delete?'</span>), <span class="ruby-identifier">:confirm_delete</span>, <span class="ruby-identifier">obj</span>
|
342
|
-
<span class="ruby-keyword kw">end</span>
|
343
|
-
</pre>
|
344
|
-
</div>
|
345
|
-
</div>
|
346
|
-
</div>
|
347
|
-
|
348
|
-
<div id="method-M000055" class="method-detail">
|
349
|
-
<a name="M000055"></a>
|
350
|
-
|
351
|
-
<div class="method-heading">
|
352
|
-
<a href="#M000055" class="method-signature">
|
353
|
-
<span class="method-name">destroy</span><span class="method-args">(obj)</span>
|
354
|
-
</a>
|
355
|
-
</div>
|
356
|
-
|
357
|
-
<div class="method-description">
|
358
|
-
<p><a class="source-toggle" href="#"
|
359
|
-
onclick="toggleCode('M000055-source');return false;">[Source]</a></p>
|
360
|
-
<div class="method-source-code" id="M000055-source">
|
361
|
-
<pre>
|
362
|
-
<span class="ruby-comment cmt"># File lib/wee/databases/og/scaffolder.rb, line 73</span>
|
363
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">destroy</span>(<span class="ruby-identifier">obj</span>)
|
364
|
-
<span class="ruby-identifier">call</span> <span class="ruby-constant">Wee</span><span class="ruby-operator">::</span><span class="ruby-constant">MessageBox</span>.<span class="ruby-identifier">new</span>(<span class="ruby-value str">'Do you really want to destroy the object?'</span>),
|
365
|
-
<span class="ruby-identifier">:confirm_destroy</span>, <span class="ruby-identifier">obj</span>
|
366
|
-
<span class="ruby-keyword kw">end</span>
|
367
|
-
</pre>
|
368
|
-
</div>
|
369
|
-
</div>
|
370
|
-
</div>
|
371
|
-
|
372
|
-
<div id="method-M000057" class="method-detail">
|
373
|
-
<a name="M000057"></a>
|
374
|
-
|
375
|
-
<div class="method-heading">
|
376
|
-
<a href="#M000057" class="method-signature">
|
377
|
-
<span class="method-name">domain_objects</span><span class="method-args">()</span>
|
378
|
-
</a>
|
379
|
-
</div>
|
380
|
-
|
381
|
-
<div class="method-description">
|
382
|
-
<p><a class="source-toggle" href="#"
|
383
|
-
onclick="toggleCode('M000057-source');return false;">[Source]</a></p>
|
384
|
-
<div class="method-source-code" id="M000057-source">
|
385
|
-
<pre>
|
386
|
-
<span class="ruby-comment cmt"># File lib/wee/databases/og/scaffolder.rb, line 82</span>
|
387
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">domain_objects</span>
|
388
|
-
<span class="ruby-ivar">@domain_class</span>.<span class="ruby-identifier">all</span> <span class="ruby-operator">||</span> []
|
389
|
-
<span class="ruby-keyword kw">end</span>
|
390
|
-
</pre>
|
391
|
-
</div>
|
392
|
-
</div>
|
393
|
-
</div>
|
394
|
-
|
395
|
-
<div id="method-M000038" class="method-detail">
|
396
|
-
<a name="M000038"></a>
|
397
|
-
|
398
|
-
<div class="method-heading">
|
399
|
-
<a href="#M000038" class="method-signature">
|
400
|
-
<span class="method-name">edit</span><span class="method-args">(obj)</span>
|
401
|
-
</a>
|
402
|
-
</div>
|
403
|
-
|
404
|
-
<div class="method-description">
|
405
|
-
<p><a class="source-toggle" href="#"
|
406
|
-
onclick="toggleCode('M000038-source');return false;">[Source]</a></p>
|
407
|
-
<div class="method-source-code" id="M000038-source">
|
408
|
-
<pre>
|
409
|
-
<span class="ruby-comment cmt"># File lib/wee/databases/og/old_scaffolder.rb, line 20</span>
|
410
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">edit</span>(<span class="ruby-identifier">obj</span>)
|
411
|
-
<span class="ruby-ivar">@edit</span> = <span class="ruby-identifier">obj</span>
|
412
|
-
<span class="ruby-keyword kw">end</span>
|
413
|
-
</pre>
|
414
|
-
</div>
|
415
|
-
</div>
|
416
|
-
</div>
|
417
|
-
|
418
|
-
<div id="method-M000053" class="method-detail">
|
419
|
-
<a name="M000053"></a>
|
420
|
-
|
421
|
-
<div class="method-heading">
|
422
|
-
<a href="#M000053" class="method-signature">
|
423
|
-
<span class="method-name">edit</span><span class="method-args">(obj)</span>
|
424
|
-
</a>
|
425
|
-
</div>
|
426
|
-
|
427
|
-
<div class="method-description">
|
428
|
-
<p><a class="source-toggle" href="#"
|
429
|
-
onclick="toggleCode('M000053-source');return false;">[Source]</a></p>
|
430
|
-
<div class="method-source-code" id="M000053-source">
|
431
|
-
<pre>
|
432
|
-
<span class="ruby-comment cmt"># File lib/wee/databases/og/scaffolder.rb, line 65</span>
|
433
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">edit</span>(<span class="ruby-identifier">obj</span>)
|
434
|
-
<span class="ruby-identifier">call</span> <span class="ruby-identifier">editor_for</span>(<span class="ruby-identifier">obj</span>)
|
435
|
-
<span class="ruby-keyword kw">end</span>
|
436
|
-
</pre>
|
437
|
-
</div>
|
438
|
-
</div>
|
439
|
-
</div>
|
440
|
-
|
441
|
-
<div id="method-M000058" class="method-detail">
|
442
|
-
<a name="M000058"></a>
|
443
|
-
|
444
|
-
<div class="method-heading">
|
445
|
-
<a href="#M000058" class="method-signature">
|
446
|
-
<span class="method-name">editor_class</span><span class="method-args">()</span>
|
447
|
-
</a>
|
448
|
-
</div>
|
449
|
-
|
450
|
-
<div class="method-description">
|
451
|
-
<p><a class="source-toggle" href="#"
|
452
|
-
onclick="toggleCode('M000058-source');return false;">[Source]</a></p>
|
453
|
-
<div class="method-source-code" id="M000058-source">
|
454
|
-
<pre>
|
455
|
-
<span class="ruby-comment cmt"># File lib/wee/databases/og/scaffolder.rb, line 86</span>
|
456
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">editor_class</span>
|
457
|
-
<span class="ruby-constant">Editor</span>
|
458
|
-
<span class="ruby-keyword kw">end</span>
|
459
|
-
</pre>
|
460
|
-
</div>
|
461
|
-
</div>
|
462
|
-
</div>
|
463
|
-
|
464
|
-
<div id="method-M000059" class="method-detail">
|
465
|
-
<a name="M000059"></a>
|
466
|
-
|
467
|
-
<div class="method-heading">
|
468
|
-
<a href="#M000059" class="method-signature">
|
469
|
-
<span class="method-name">editor_for</span><span class="method-args">(obj)</span>
|
470
|
-
</a>
|
471
|
-
</div>
|
472
|
-
|
473
|
-
<div class="method-description">
|
474
|
-
<p><a class="source-toggle" href="#"
|
475
|
-
onclick="toggleCode('M000059-source');return false;">[Source]</a></p>
|
476
|
-
<div class="method-source-code" id="M000059-source">
|
477
|
-
<pre>
|
478
|
-
<span class="ruby-comment cmt"># File lib/wee/databases/og/scaffolder.rb, line 90</span>
|
479
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">editor_for</span>(<span class="ruby-identifier">obj</span>)
|
480
|
-
<span class="ruby-identifier">editor_class</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">obj</span>).<span class="ruby-identifier">add_decoration</span>(<span class="ruby-constant">Wee</span><span class="ruby-operator">::</span><span class="ruby-constant">FormDecoration</span>.<span class="ruby-identifier">new</span>)
|
481
|
-
<span class="ruby-keyword kw">end</span>
|
482
|
-
</pre>
|
483
|
-
</div>
|
484
|
-
</div>
|
485
|
-
</div>
|
486
|
-
|
487
|
-
<div id="method-M000041" class="method-detail">
|
488
|
-
<a name="M000041"></a>
|
489
|
-
|
490
|
-
<div class="method-heading">
|
491
|
-
<a href="#M000041" class="method-signature">
|
492
|
-
<span class="method-name">refresh</span><span class="method-args">()</span>
|
493
|
-
</a>
|
494
|
-
</div>
|
495
|
-
|
496
|
-
<div class="method-description">
|
497
|
-
<p><a class="source-toggle" href="#"
|
498
|
-
onclick="toggleCode('M000041-source');return false;">[Source]</a></p>
|
499
|
-
<div class="method-source-code" id="M000041-source">
|
500
|
-
<pre>
|
501
|
-
<span class="ruby-comment cmt"># File lib/wee/databases/og/old_scaffolder.rb, line 34</span>
|
502
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">refresh</span>
|
503
|
-
<span class="ruby-ivar">@objs</span> = <span class="ruby-ivar">@domain_class</span>.<span class="ruby-identifier">all</span> <span class="ruby-operator">||</span> []
|
504
|
-
<span class="ruby-keyword kw">end</span>
|
505
|
-
</pre>
|
506
|
-
</div>
|
507
|
-
</div>
|
508
|
-
</div>
|
509
|
-
|
510
|
-
<div id="method-M000045" class="method-detail">
|
511
|
-
<a name="M000045"></a>
|
512
|
-
|
513
|
-
<div class="method-heading">
|
514
|
-
<a href="#M000045" class="method-signature">
|
515
|
-
<span class="method-name">render</span><span class="method-args">()</span>
|
516
|
-
</a>
|
517
|
-
</div>
|
518
|
-
|
519
|
-
<div class="method-description">
|
520
|
-
<p><a class="source-toggle" href="#"
|
521
|
-
onclick="toggleCode('M000045-source');return false;">[Source]</a></p>
|
522
|
-
<div class="method-source-code" id="M000045-source">
|
523
|
-
<pre>
|
524
|
-
<span class="ruby-comment cmt"># File lib/wee/databases/og/scaffolder.rb, line 11</span>
|
525
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">render</span>
|
526
|
-
<span class="ruby-identifier">r</span>.<span class="ruby-identifier">h1</span> <span class="ruby-node">"List #{ @domain_class }"</span>
|
527
|
-
<span class="ruby-identifier">r</span>.<span class="ruby-identifier">paragraph</span>
|
528
|
-
<span class="ruby-identifier">r</span>.<span class="ruby-identifier">table</span>.<span class="ruby-identifier">border</span>(<span class="ruby-value">1</span>).<span class="ruby-identifier">with</span> {
|
529
|
-
<span class="ruby-identifier">render_header</span>
|
530
|
-
<span class="ruby-identifier">render_body</span>
|
531
|
-
}
|
532
|
-
<span class="ruby-identifier">r</span>.<span class="ruby-identifier">paragraph</span>
|
533
|
-
<span class="ruby-identifier">r</span>.<span class="ruby-identifier">anchor</span>.<span class="ruby-identifier">callback</span>(<span class="ruby-identifier">:add</span>).<span class="ruby-identifier">with</span>(<span class="ruby-node">"Add new #{ @domain_class }"</span>)
|
534
|
-
<span class="ruby-keyword kw">end</span>
|
535
|
-
</pre>
|
536
|
-
</div>
|
537
|
-
</div>
|
538
|
-
</div>
|
539
|
-
|
540
|
-
<div id="method-M000043" class="method-detail">
|
541
|
-
<a name="M000043"></a>
|
542
|
-
|
543
|
-
<div class="method-heading">
|
544
|
-
<a href="#M000043" class="method-signature">
|
545
|
-
<span class="method-name">render</span><span class="method-args">()</span>
|
546
|
-
</a>
|
547
|
-
</div>
|
548
|
-
|
549
|
-
<div class="method-description">
|
550
|
-
<p><a class="source-toggle" href="#"
|
551
|
-
onclick="toggleCode('M000043-source');return false;">[Source]</a></p>
|
552
|
-
<div class="method-source-code" id="M000043-source">
|
553
|
-
<pre>
|
554
|
-
<span class="ruby-comment cmt"># File lib/wee/databases/og/old_scaffolder.rb, line 42</span>
|
555
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">render</span>
|
556
|
-
<span class="ruby-identifier">refresh</span> <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@objs</span>.<span class="ruby-identifier">nil?</span>
|
557
|
-
|
558
|
-
<span class="ruby-identifier">r</span>.<span class="ruby-identifier">h1</span> <span class="ruby-node">"#{ @domain_class } List"</span>
|
559
|
-
<span class="ruby-identifier">r</span>.<span class="ruby-identifier">anchor</span>.<span class="ruby-identifier">callback</span> { <span class="ruby-identifier">refresh</span> }.<span class="ruby-identifier">with</span>(<span class="ruby-value str">"Refresh"</span>)
|
560
|
-
|
561
|
-
<span class="ruby-identifier">r</span>.<span class="ruby-identifier">form</span> <span class="ruby-keyword kw">do</span>
|
562
|
-
<span class="ruby-identifier">r</span>.<span class="ruby-identifier">table</span>.<span class="ruby-identifier">border</span>(<span class="ruby-value">1</span>).<span class="ruby-identifier">with</span> {
|
563
|
-
|
564
|
-
<span class="ruby-identifier">r</span>.<span class="ruby-identifier">table_row</span>.<span class="ruby-identifier">with</span> {
|
565
|
-
<span class="ruby-ivar">@attributes</span>.<span class="ruby-identifier">each</span> {<span class="ruby-operator">|</span><span class="ruby-identifier">a</span><span class="ruby-operator">|</span>
|
566
|
-
<span class="ruby-identifier">r</span>.<span class="ruby-identifier">table_header</span>.<span class="ruby-identifier">with</span> {
|
567
|
-
<span class="ruby-identifier">r</span>.<span class="ruby-identifier">bold</span>(<span class="ruby-identifier">a</span>.<span class="ruby-identifier">capitalize</span>)
|
568
|
-
}
|
569
|
-
}
|
570
|
-
<span class="ruby-identifier">r</span>.<span class="ruby-identifier">table_header</span>.<span class="ruby-identifier">with</span>(<span class="ruby-value str">" "</span>)
|
571
|
-
}
|
572
|
-
|
573
|
-
<span class="ruby-ivar">@objs</span>.<span class="ruby-identifier">each</span> {<span class="ruby-operator">|</span><span class="ruby-identifier">o</span><span class="ruby-operator">|</span>
|
574
|
-
<span class="ruby-identifier">r</span>.<span class="ruby-identifier">table_row</span>.<span class="ruby-identifier">with</span> <span class="ruby-keyword kw">do</span>
|
575
|
-
<span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@edit</span> <span class="ruby-operator">==</span> <span class="ruby-identifier">o</span>
|
576
|
-
|
577
|
-
<span class="ruby-ivar">@attributes</span>.<span class="ruby-identifier">each</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">attr</span><span class="ruby-operator">|</span>
|
578
|
-
<span class="ruby-identifier">r</span>.<span class="ruby-identifier">table_data</span>.<span class="ruby-identifier">with</span> { <span class="ruby-identifier">r</span>.<span class="ruby-identifier">text_input</span>.<span class="ruby-identifier">callback</span> {<span class="ruby-operator">|</span><span class="ruby-identifier">v</span><span class="ruby-operator">|</span> <span class="ruby-identifier">o</span>.<span class="ruby-identifier">send</span>(<span class="ruby-identifier">attr</span><span class="ruby-operator">+</span><span class="ruby-value str">"="</span>,<span class="ruby-identifier">v</span>) }.<span class="ruby-identifier">value</span>(<span class="ruby-identifier">o</span>.<span class="ruby-identifier">send</span>(<span class="ruby-identifier">attr</span>)) }
|
579
|
-
}
|
580
|
-
|
581
|
-
<span class="ruby-identifier">r</span>.<span class="ruby-identifier">table_data</span>.<span class="ruby-identifier">with</span> {
|
582
|
-
<span class="ruby-identifier">r</span>.<span class="ruby-identifier">submit_button</span>.<span class="ruby-identifier">callback</span> { <span class="ruby-identifier">save</span>(<span class="ruby-identifier">o</span>) }.<span class="ruby-identifier">value</span>(<span class="ruby-value str">"Save"</span>)
|
583
|
-
<span class="ruby-identifier">r</span>.<span class="ruby-identifier">space</span>
|
584
|
-
<span class="ruby-identifier">r</span>.<span class="ruby-identifier">submit_button</span>.<span class="ruby-identifier">callback</span> { <span class="ruby-identifier">cancel</span>() }.<span class="ruby-identifier">value</span>(<span class="ruby-value str">"Cancel"</span>)
|
585
|
-
<span class="ruby-identifier">r</span>.<span class="ruby-identifier">space</span>
|
586
|
-
<span class="ruby-identifier">r</span>.<span class="ruby-identifier">anchor</span>.<span class="ruby-identifier">callback</span> { <span class="ruby-identifier">delete</span>(<span class="ruby-identifier">o</span>) }.<span class="ruby-identifier">with</span>(<span class="ruby-value str">"Delete"</span>)
|
587
|
-
}
|
588
|
-
|
589
|
-
<span class="ruby-keyword kw">else</span>
|
590
|
-
|
591
|
-
<span class="ruby-ivar">@attributes</span>.<span class="ruby-identifier">each</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">attr</span><span class="ruby-operator">|</span>
|
592
|
-
<span class="ruby-identifier">r</span>.<span class="ruby-identifier">table_data</span>(<span class="ruby-identifier">o</span>.<span class="ruby-identifier">send</span>(<span class="ruby-identifier">attr</span>))
|
593
|
-
}
|
594
|
-
|
595
|
-
<span class="ruby-identifier">r</span>.<span class="ruby-identifier">table_data</span>.<span class="ruby-identifier">with</span> {
|
596
|
-
<span class="ruby-identifier">r</span>.<span class="ruby-identifier">anchor</span>.<span class="ruby-identifier">callback</span> { <span class="ruby-identifier">edit</span>(<span class="ruby-identifier">o</span>) }.<span class="ruby-identifier">with</span>(<span class="ruby-value str">"Edit"</span>)
|
597
|
-
<span class="ruby-identifier">r</span>.<span class="ruby-identifier">space</span>
|
598
|
-
<span class="ruby-identifier">r</span>.<span class="ruby-identifier">anchor</span>.<span class="ruby-identifier">callback</span> { <span class="ruby-identifier">delete</span>(<span class="ruby-identifier">o</span>) }.<span class="ruby-identifier">with</span>(<span class="ruby-value str">"Delete"</span>)
|
599
|
-
}
|
600
|
-
|
601
|
-
<span class="ruby-keyword kw">end</span>
|
602
|
-
<span class="ruby-keyword kw">end</span>
|
603
|
-
}
|
604
|
-
}
|
605
|
-
<span class="ruby-keyword kw">end</span>
|
606
|
-
|
607
|
-
<span class="ruby-identifier">r</span>.<span class="ruby-identifier">anchor</span>.<span class="ruby-identifier">callback</span> { <span class="ruby-identifier">create</span>() }.<span class="ruby-identifier">with</span>(<span class="ruby-node">"Add new #{ @domain_class }"</span>)
|
608
|
-
|
609
|
-
<span class="ruby-keyword kw">end</span>
|
610
|
-
</pre>
|
611
|
-
</div>
|
612
|
-
</div>
|
613
|
-
</div>
|
614
|
-
|
615
|
-
<div id="method-M000051" class="method-detail">
|
616
|
-
<a name="M000051"></a>
|
617
|
-
|
618
|
-
<div class="method-heading">
|
619
|
-
<a href="#M000051" class="method-signature">
|
620
|
-
<span class="method-name">render_action</span><span class="method-args">(obj)</span>
|
621
|
-
</a>
|
622
|
-
</div>
|
623
|
-
|
624
|
-
<div class="method-description">
|
625
|
-
<p><a class="source-toggle" href="#"
|
626
|
-
onclick="toggleCode('M000051-source');return false;">[Source]</a></p>
|
627
|
-
<div class="method-source-code" id="M000051-source">
|
628
|
-
<pre>
|
629
|
-
<span class="ruby-comment cmt"># File lib/wee/databases/og/scaffolder.rb, line 53</span>
|
630
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">render_action</span>(<span class="ruby-identifier">obj</span>)
|
631
|
-
<span class="ruby-identifier">r</span>.<span class="ruby-identifier">table_data</span>.<span class="ruby-identifier">with</span> {
|
632
|
-
<span class="ruby-identifier">r</span>.<span class="ruby-identifier">anchor</span>.<span class="ruby-identifier">callback</span>(<span class="ruby-identifier">:edit</span>, <span class="ruby-identifier">obj</span>).<span class="ruby-identifier">with</span>(<span class="ruby-value str">"Edit"</span>)
|
633
|
-
<span class="ruby-identifier">r</span>.<span class="ruby-identifier">space</span>
|
634
|
-
<span class="ruby-identifier">r</span>.<span class="ruby-identifier">anchor</span>.<span class="ruby-identifier">callback</span>(<span class="ruby-identifier">:destroy</span>, <span class="ruby-identifier">obj</span>).<span class="ruby-identifier">with</span>(<span class="ruby-value str">"Destroy"</span>)
|
635
|
-
}
|
636
|
-
<span class="ruby-keyword kw">end</span>
|
637
|
-
</pre>
|
638
|
-
</div>
|
639
|
-
</div>
|
640
|
-
</div>
|
641
|
-
|
642
|
-
<div id="method-M000047" class="method-detail">
|
643
|
-
<a name="M000047"></a>
|
644
|
-
|
645
|
-
<div class="method-heading">
|
646
|
-
<a href="#M000047" class="method-signature">
|
647
|
-
<span class="method-name">render_action_header</span><span class="method-args">()</span>
|
648
|
-
</a>
|
649
|
-
</div>
|
650
|
-
|
651
|
-
<div class="method-description">
|
652
|
-
<p><a class="source-toggle" href="#"
|
653
|
-
onclick="toggleCode('M000047-source');return false;">[Source]</a></p>
|
654
|
-
<div class="method-source-code" id="M000047-source">
|
655
|
-
<pre>
|
656
|
-
<span class="ruby-comment cmt"># File lib/wee/databases/og/scaffolder.rb, line 31</span>
|
657
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">render_action_header</span>
|
658
|
-
<span class="ruby-identifier">r</span>.<span class="ruby-identifier">paragraph</span>
|
659
|
-
<span class="ruby-identifier">r</span>.<span class="ruby-identifier">table_header</span>.<span class="ruby-identifier">with</span> { <span class="ruby-identifier">r</span>.<span class="ruby-identifier">space</span>(<span class="ruby-value">2</span>) } <span class="ruby-comment cmt"># the action column</span>
|
660
|
-
<span class="ruby-keyword kw">end</span>
|
661
|
-
</pre>
|
662
|
-
</div>
|
663
|
-
</div>
|
664
|
-
</div>
|
665
|
-
|
666
|
-
<div id="method-M000049" class="method-detail">
|
667
|
-
<a name="M000049"></a>
|
668
|
-
|
669
|
-
<div class="method-heading">
|
670
|
-
<a href="#M000049" class="method-signature">
|
671
|
-
<span class="method-name">render_body</span><span class="method-args">()</span>
|
672
|
-
</a>
|
673
|
-
</div>
|
674
|
-
|
675
|
-
<div class="method-description">
|
676
|
-
<p><a class="source-toggle" href="#"
|
677
|
-
onclick="toggleCode('M000049-source');return false;">[Source]</a></p>
|
678
|
-
<div class="method-source-code" id="M000049-source">
|
679
|
-
<pre>
|
680
|
-
<span class="ruby-comment cmt"># File lib/wee/databases/og/scaffolder.rb, line 42</span>
|
681
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">render_body</span>
|
682
|
-
<span class="ruby-identifier">domain_objects</span>.<span class="ruby-identifier">each</span> {<span class="ruby-operator">|</span><span class="ruby-identifier">obj</span><span class="ruby-operator">|</span> <span class="ruby-identifier">render_object</span>(<span class="ruby-identifier">obj</span>) }
|
683
|
-
<span class="ruby-keyword kw">end</span>
|
684
|
-
</pre>
|
685
|
-
</div>
|
686
|
-
</div>
|
687
|
-
</div>
|
688
|
-
|
689
|
-
<div id="method-M000046" class="method-detail">
|
690
|
-
<a name="M000046"></a>
|
691
|
-
|
692
|
-
<div class="method-heading">
|
693
|
-
<a href="#M000046" class="method-signature">
|
694
|
-
<span class="method-name">render_header</span><span class="method-args">()</span>
|
695
|
-
</a>
|
696
|
-
</div>
|
697
|
-
|
698
|
-
<div class="method-description">
|
699
|
-
<p><a class="source-toggle" href="#"
|
700
|
-
onclick="toggleCode('M000046-source');return false;">[Source]</a></p>
|
701
|
-
<div class="method-source-code" id="M000046-source">
|
702
|
-
<pre>
|
703
|
-
<span class="ruby-comment cmt"># File lib/wee/databases/og/scaffolder.rb, line 22</span>
|
704
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">render_header</span>
|
705
|
-
<span class="ruby-identifier">r</span>.<span class="ruby-identifier">table_row</span>.<span class="ruby-identifier">with</span> {
|
706
|
-
<span class="ruby-ivar">@props</span>.<span class="ruby-identifier">each</span> {<span class="ruby-operator">|</span><span class="ruby-identifier">prop</span><span class="ruby-operator">|</span>
|
707
|
-
<span class="ruby-identifier">render_property_header</span>(<span class="ruby-identifier">prop</span>)
|
708
|
-
}
|
709
|
-
<span class="ruby-identifier">render_action_header</span>
|
710
|
-
}
|
711
|
-
<span class="ruby-keyword kw">end</span>
|
712
|
-
</pre>
|
713
|
-
</div>
|
714
|
-
</div>
|
715
|
-
</div>
|
716
|
-
|
717
|
-
<div id="method-M000050" class="method-detail">
|
718
|
-
<a name="M000050"></a>
|
719
|
-
|
720
|
-
<div class="method-heading">
|
721
|
-
<a href="#M000050" class="method-signature">
|
722
|
-
<span class="method-name">render_object</span><span class="method-args">(obj)</span>
|
723
|
-
</a>
|
724
|
-
</div>
|
725
|
-
|
726
|
-
<div class="method-description">
|
727
|
-
<p><a class="source-toggle" href="#"
|
728
|
-
onclick="toggleCode('M000050-source');return false;">[Source]</a></p>
|
729
|
-
<div class="method-source-code" id="M000050-source">
|
730
|
-
<pre>
|
731
|
-
<span class="ruby-comment cmt"># File lib/wee/databases/og/scaffolder.rb, line 46</span>
|
732
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">render_object</span>(<span class="ruby-identifier">obj</span>)
|
733
|
-
<span class="ruby-identifier">r</span>.<span class="ruby-identifier">table_row</span> {
|
734
|
-
<span class="ruby-ivar">@props</span>.<span class="ruby-identifier">each</span> {<span class="ruby-operator">|</span><span class="ruby-identifier">prop</span><span class="ruby-operator">|</span> <span class="ruby-identifier">render_property</span>(<span class="ruby-identifier">obj</span>, <span class="ruby-identifier">prop</span>) }
|
735
|
-
<span class="ruby-identifier">render_action</span>(<span class="ruby-identifier">obj</span>)
|
736
|
-
}
|
737
|
-
<span class="ruby-keyword kw">end</span>
|
738
|
-
</pre>
|
739
|
-
</div>
|
740
|
-
</div>
|
741
|
-
</div>
|
742
|
-
|
743
|
-
<div id="method-M000052" class="method-detail">
|
744
|
-
<a name="M000052"></a>
|
745
|
-
|
746
|
-
<div class="method-heading">
|
747
|
-
<a href="#M000052" class="method-signature">
|
748
|
-
<span class="method-name">render_property</span><span class="method-args">(obj, prop)</span>
|
749
|
-
</a>
|
750
|
-
</div>
|
751
|
-
|
752
|
-
<div class="method-description">
|
753
|
-
<p><a class="source-toggle" href="#"
|
754
|
-
onclick="toggleCode('M000052-source');return false;">[Source]</a></p>
|
755
|
-
<div class="method-source-code" id="M000052-source">
|
756
|
-
<pre>
|
757
|
-
<span class="ruby-comment cmt"># File lib/wee/databases/og/scaffolder.rb, line 61</span>
|
758
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">render_property</span>(<span class="ruby-identifier">obj</span>, <span class="ruby-identifier">prop</span>)
|
759
|
-
<span class="ruby-identifier">r</span>.<span class="ruby-identifier">table_data</span>(<span class="ruby-identifier">obj</span>.<span class="ruby-identifier">send</span>(<span class="ruby-identifier">prop</span>.<span class="ruby-identifier">name</span>).<span class="ruby-identifier">to_s</span>)
|
760
|
-
<span class="ruby-keyword kw">end</span>
|
761
|
-
</pre>
|
762
|
-
</div>
|
763
|
-
</div>
|
764
|
-
</div>
|
765
|
-
|
766
|
-
<div id="method-M000048" class="method-detail">
|
767
|
-
<a name="M000048"></a>
|
768
|
-
|
769
|
-
<div class="method-heading">
|
770
|
-
<a href="#M000048" class="method-signature">
|
771
|
-
<span class="method-name">render_property_header</span><span class="method-args">(prop)</span>
|
772
|
-
</a>
|
773
|
-
</div>
|
774
|
-
|
775
|
-
<div class="method-description">
|
776
|
-
<p><a class="source-toggle" href="#"
|
777
|
-
onclick="toggleCode('M000048-source');return false;">[Source]</a></p>
|
778
|
-
<div class="method-source-code" id="M000048-source">
|
779
|
-
<pre>
|
780
|
-
<span class="ruby-comment cmt"># File lib/wee/databases/og/scaffolder.rb, line 36</span>
|
781
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">render_property_header</span>(<span class="ruby-identifier">prop</span>)
|
782
|
-
<span class="ruby-identifier">r</span>.<span class="ruby-identifier">table_header</span>.<span class="ruby-identifier">with</span> {
|
783
|
-
<span class="ruby-identifier">r</span>.<span class="ruby-identifier">bold</span>(<span class="ruby-identifier">prop</span>.<span class="ruby-identifier">name</span>.<span class="ruby-identifier">to_s</span>.<span class="ruby-identifier">capitalize</span>)
|
784
|
-
}
|
785
|
-
<span class="ruby-keyword kw">end</span>
|
786
|
-
</pre>
|
787
|
-
</div>
|
788
|
-
</div>
|
789
|
-
</div>
|
790
|
-
|
791
|
-
<div id="method-M000039" class="method-detail">
|
792
|
-
<a name="M000039"></a>
|
793
|
-
|
794
|
-
<div class="method-heading">
|
795
|
-
<a href="#M000039" class="method-signature">
|
796
|
-
<span class="method-name">save</span><span class="method-args">(obj)</span>
|
797
|
-
</a>
|
798
|
-
</div>
|
799
|
-
|
800
|
-
<div class="method-description">
|
801
|
-
<p><a class="source-toggle" href="#"
|
802
|
-
onclick="toggleCode('M000039-source');return false;">[Source]</a></p>
|
803
|
-
<div class="method-source-code" id="M000039-source">
|
804
|
-
<pre>
|
805
|
-
<span class="ruby-comment cmt"># File lib/wee/databases/og/old_scaffolder.rb, line 24</span>
|
806
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">save</span>(<span class="ruby-identifier">obj</span>)
|
807
|
-
<span class="ruby-identifier">obj</span>.<span class="ruby-identifier">save!</span>
|
808
|
-
<span class="ruby-ivar">@edit</span> = <span class="ruby-keyword kw">nil</span>
|
809
|
-
<span class="ruby-keyword kw">end</span>
|
810
|
-
</pre>
|
811
|
-
</div>
|
812
|
-
</div>
|
813
|
-
</div>
|
814
|
-
|
815
|
-
|
816
|
-
</div>
|
817
|
-
|
818
|
-
|
819
|
-
</div>
|
820
|
-
|
821
|
-
|
822
|
-
<div id="validator-badges">
|
823
|
-
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
824
|
-
</div>
|
825
|
-
|
826
|
-
</body>
|
827
|
-
</html>
|