wee 0.8.0 → 0.9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/ChangeLog +286 -0
- data/Features +185 -0
- data/doc/rdoc/classes/ActionView.html +107 -0
- data/doc/rdoc/classes/ActionView/Base.html +133 -0
- data/doc/rdoc/classes/Array.html +7 -59
- data/doc/rdoc/classes/Cache/StorageCache.html +38 -38
- data/doc/rdoc/classes/Cache/Strategy/CapacityBounded.html +30 -30
- data/doc/rdoc/classes/Cache/Strategy/LFU.html +24 -24
- data/doc/rdoc/classes/Cache/Strategy/LRU.html +24 -24
- data/doc/rdoc/classes/Cache/Strategy/Unbounded.html +24 -24
- data/doc/rdoc/classes/Enumerable.html +6 -6
- data/doc/rdoc/classes/Hash.html +120 -0
- data/doc/rdoc/classes/Main.html +58 -34
- data/doc/rdoc/classes/Object.html +12 -12
- data/doc/rdoc/classes/OgScaffolder.html +165 -166
- data/doc/rdoc/classes/OgScaffolder/Editor.html +112 -112
- data/doc/rdoc/classes/String.html +7 -59
- data/doc/rdoc/classes/Struct.html +14 -14
- data/doc/rdoc/classes/Wee.html +70 -6
- data/doc/rdoc/classes/Wee/AbstractSession.html +502 -0
- data/doc/rdoc/classes/Wee/AnswerDecoration.html +11 -11
- data/doc/rdoc/classes/Wee/Application.html +139 -84
- data/doc/rdoc/classes/Wee/Brush.html +21 -18
- data/doc/rdoc/classes/Wee/Brush/AnchorTag.html +90 -17
- data/doc/rdoc/classes/Wee/Brush/CheckboxTag.html +162 -0
- data/doc/rdoc/classes/Wee/Brush/FileUploadTag.html +7 -7
- data/doc/rdoc/classes/Wee/Brush/FormTag.html +41 -17
- data/doc/rdoc/classes/Wee/Brush/GenericEncodedTextBrush.html +12 -12
- data/doc/rdoc/classes/Wee/Brush/GenericSingleTagBrush.html +7 -7
- data/doc/rdoc/classes/Wee/Brush/GenericTagBrush.html +112 -86
- data/doc/rdoc/classes/Wee/Brush/GenericTextBrush.html +12 -12
- data/doc/rdoc/classes/Wee/Brush/HiddenInputTag.html +160 -0
- data/doc/rdoc/classes/Wee/Brush/ImageButtonTag.html +15 -15
- data/doc/rdoc/classes/Wee/Brush/ImageTag.html +21 -21
- data/doc/rdoc/classes/Wee/Brush/InputTag.html +14 -14
- data/doc/rdoc/classes/Wee/Brush/JavascriptTag.html +7 -7
- data/doc/rdoc/classes/Wee/Brush/Page.html +14 -14
- data/doc/rdoc/classes/Wee/Brush/RadioButtonTag.html +234 -0
- data/doc/rdoc/classes/Wee/Brush/RadioButtonTag/RadioGroup.html +207 -0
- data/doc/rdoc/classes/Wee/Brush/SelectListTag.html +124 -28
- data/doc/rdoc/classes/Wee/Brush/SelectListTag/SelectListCallback.html +7 -7
- data/doc/rdoc/classes/Wee/Brush/SelectOptionTag.html +7 -7
- data/doc/rdoc/classes/Wee/Brush/SubmitButtonTag.html +7 -7
- data/doc/rdoc/classes/Wee/Brush/TableDataTag.html +14 -14
- data/doc/rdoc/classes/Wee/Brush/TableHeaderTag.html +7 -7
- data/doc/rdoc/classes/Wee/Brush/TableRowTag.html +42 -42
- data/doc/rdoc/classes/Wee/Brush/TableTag.html +7 -7
- data/doc/rdoc/classes/Wee/Brush/TextAreaTag.html +48 -15
- data/doc/rdoc/classes/Wee/Brush/TextInputTag.html +7 -7
- data/doc/rdoc/classes/Wee/CallbackRegistry.html +38 -38
- data/doc/rdoc/classes/Wee/CallbackStream.html +18 -18
- data/doc/rdoc/classes/Wee/CanvasMixin.html +225 -0
- data/doc/rdoc/classes/Wee/Component.html +202 -201
- data/doc/rdoc/classes/Wee/Component/OnAnswer.html +7 -7
- data/doc/rdoc/classes/Wee/ComponentDispatcher.html +289 -0
- data/doc/rdoc/classes/Wee/ComponentRunner.html +321 -0
- data/doc/rdoc/classes/Wee/Context.html +63 -3
- data/doc/rdoc/classes/Wee/Decoration.html +45 -45
- data/doc/rdoc/classes/Wee/Delegate.html +30 -30
- data/doc/rdoc/classes/Wee/DupReplaceSnapshotMixin.html +164 -0
- data/doc/rdoc/classes/Wee/ErrorResponse.html +16 -16
- data/doc/rdoc/classes/Wee/Examples.html +114 -0
- data/doc/rdoc/classes/Wee/Examples/Calculator.html +319 -0
- data/doc/rdoc/classes/Wee/Examples/Counter.html +289 -0
- data/doc/rdoc/classes/Wee/Examples/EditableCounter.html +210 -0
- data/doc/rdoc/classes/Wee/Examples/Window.html +346 -0
- data/doc/rdoc/classes/Wee/FastCGIAdaptor.html +227 -0
- data/doc/rdoc/classes/Wee/FormDecoration.html +6 -6
- data/doc/rdoc/classes/Wee/GenericResponse.html +7 -7
- data/doc/rdoc/classes/Wee/HtmlCanvasRenderer.html +1230 -0
- data/doc/rdoc/classes/Wee/HtmlWriter.html +40 -40
- data/doc/rdoc/classes/Wee/IdGenerator.html +148 -0
- data/doc/rdoc/classes/Wee/LiteralMethodCallback.html +27 -14
- data/doc/rdoc/classes/Wee/LoginDecoration.html +261 -0
- data/doc/rdoc/classes/Wee/Md5IdGenerator.html +14 -14
- data/doc/rdoc/classes/Wee/MessageBox.html +14 -14
- data/doc/rdoc/classes/Wee/Nitro.html +114 -0
- data/doc/rdoc/classes/Wee/Nitro/ControllerClassMixin.html +192 -0
- data/doc/rdoc/classes/Wee/Nitro/ControllerMixin.html +345 -0
- data/doc/rdoc/classes/Wee/Nitro/FormTag.html +155 -0
- data/doc/rdoc/classes/Wee/Nitro/HtmlCanvasRenderer.html +178 -0
- data/doc/rdoc/classes/Wee/Page.html +4 -0
- data/doc/rdoc/classes/Wee/PageDecoration.html +18 -18
- data/doc/rdoc/classes/Wee/PagelessApplication.html +13 -11
- data/doc/rdoc/classes/Wee/PagelessComponentDriver.html +296 -0
- data/doc/rdoc/classes/Wee/PagelessRequest.html +52 -21
- data/doc/rdoc/classes/Wee/PagelessSession.html +130 -91
- data/doc/rdoc/classes/Wee/Pager.html +534 -0
- data/doc/rdoc/classes/Wee/Presenter.html +482 -298
- data/doc/rdoc/classes/Wee/Rails.html +114 -0
- data/doc/rdoc/classes/Wee/Rails/ControllerClassMixin.html +192 -0
- data/doc/rdoc/classes/Wee/Rails/ControllerMixin.html +342 -0
- data/doc/rdoc/classes/Wee/Rails/FormTag.html +155 -0
- data/doc/rdoc/classes/Wee/Rails/HtmlCanvasRenderer.html +177 -0
- data/doc/rdoc/classes/Wee/RedirectResponse.html +7 -7
- data/doc/rdoc/classes/Wee/RefreshResponse.html +7 -7
- data/doc/rdoc/classes/Wee/Renderer.html +208 -0
- data/doc/rdoc/classes/Wee/RenderingContext.html +175 -3
- data/doc/rdoc/classes/Wee/Request.html +197 -46
- data/doc/rdoc/classes/Wee/RequestHandler.html +31 -31
- data/doc/rdoc/classes/Wee/Response.html +44 -43
- data/doc/rdoc/classes/Wee/Session.html +296 -402
- data/doc/rdoc/classes/Wee/SimpleIdGenerator.html +14 -14
- data/doc/rdoc/classes/Wee/Snapshot.html +19 -19
- data/doc/rdoc/classes/Wee/Utils.html +22 -22
- data/doc/rdoc/classes/Wee/Utils/LRUCache.html +6 -6
- data/doc/rdoc/classes/Wee/ValueHolder.html +19 -19
- data/doc/rdoc/classes/Wee/WEBrickAdaptor.html +72 -46
- data/doc/rdoc/classes/Wee/WrapperDecoration.html +6 -6
- data/doc/rdoc/created.rid +1 -1
- data/doc/rdoc/files/INSTALL.html +1 -1
- data/doc/rdoc/files/README.html +8 -12
- data/doc/rdoc/files/lib/cache/cache_rb.html +1 -1
- data/doc/rdoc/files/lib/wee/abstractsession_rb.html +108 -0
- data/doc/rdoc/files/lib/wee/adaptors/fastcgi_rb.html +108 -0
- data/doc/rdoc/files/lib/wee/adaptors/nitro_rb.html +101 -0
- data/doc/rdoc/files/lib/wee/adaptors/rails_rb.html +101 -0
- data/doc/rdoc/files/lib/wee/adaptors/webrick_rb.html +1 -1
- data/doc/rdoc/files/lib/wee/application_rb.html +1 -1
- data/doc/rdoc/files/lib/wee/components/component_dispatcher_rb.html +108 -0
- data/doc/rdoc/files/lib/wee/components/form_decoration_rb.html +1 -1
- data/doc/rdoc/files/lib/wee/components/login_decoration_rb.html +101 -0
- data/doc/rdoc/files/lib/wee/components/messagebox_rb.html +1 -1
- data/doc/rdoc/files/lib/wee/components/page_decoration_rb.html +1 -1
- data/doc/rdoc/files/lib/wee/components/pager_rb.html +101 -0
- data/doc/rdoc/files/lib/wee/components/wrapper_decoration_rb.html +1 -1
- data/doc/rdoc/files/lib/wee/components_rb.html +4 -1
- data/doc/rdoc/files/lib/wee/continuation/core/component_rb.html +1 -1
- data/doc/rdoc/files/lib/wee/continuation/session_rb.html +1 -1
- data/doc/rdoc/files/lib/wee/continuation_rb.html +1 -1
- data/doc/rdoc/files/lib/wee/core/callback_rb.html +1 -1
- data/doc/rdoc/files/lib/wee/core/component_rb.html +1 -1
- data/doc/rdoc/files/lib/wee/core/componentrunner_rb.html +110 -0
- data/doc/rdoc/files/lib/wee/core/context_rb.html +101 -0
- data/doc/rdoc/files/lib/wee/core/decoration_rb.html +1 -1
- data/doc/rdoc/files/lib/wee/core/idgen_rb.html +101 -0
- data/doc/rdoc/files/lib/wee/core/page_rb.html +101 -0
- data/doc/rdoc/files/lib/wee/core/presenter_rb.html +1 -1
- data/doc/rdoc/files/lib/wee/core/renderer_rb.html +107 -0
- data/doc/rdoc/files/lib/wee/core/snapshot_rb.html +1 -1
- data/doc/rdoc/files/lib/wee/core/valueholder_rb.html +2 -2
- data/doc/rdoc/files/lib/wee/core_ext_rb.html +101 -0
- data/doc/rdoc/files/lib/wee/core_rb.html +7 -14
- data/doc/rdoc/files/lib/wee/databases/og/application_rb.html +1 -1
- data/doc/rdoc/files/lib/wee/databases/og/old_scaffolder_rb.html +1 -1
- data/doc/rdoc/files/lib/wee/databases/og/scaffolder_rb.html +1 -1
- data/doc/rdoc/files/lib/wee/databases/og/session_rb.html +1 -1
- data/doc/rdoc/files/lib/wee/databases/og_rb.html +1 -1
- data/doc/rdoc/files/lib/wee/examples/calculator_rb.html +107 -0
- data/doc/rdoc/files/lib/wee/examples/counter_rb.html +101 -0
- data/doc/rdoc/files/lib/wee/examples/editable_counter_rb.html +114 -0
- data/doc/rdoc/files/lib/wee/examples/window_rb.html +101 -0
- data/doc/rdoc/files/lib/wee/idgen/md5_rb.html +1 -1
- data/doc/rdoc/files/lib/wee/idgen/simple_rb.html +1 -1
- data/doc/rdoc/files/lib/wee/page_rb.html +1 -1
- data/doc/rdoc/files/lib/wee/pageless/application_rb.html +8 -1
- data/doc/rdoc/files/lib/wee/pageless/request_rb.html +1 -1
- data/doc/rdoc/files/lib/wee/pageless/session_rb.html +2 -1
- data/doc/rdoc/files/lib/wee/pageless_rb.html +1 -1
- data/doc/rdoc/files/lib/wee/renderer/html/brushes_rb.html +1 -1
- data/doc/rdoc/files/lib/wee/renderer/html/canvas_rb.html +1 -1
- data/doc/rdoc/files/lib/wee/renderer/html/writer_rb.html +1 -1
- data/doc/rdoc/files/lib/wee/request_rb.html +5 -4
- data/doc/rdoc/files/lib/wee/requesthandler_rb.html +1 -1
- data/doc/rdoc/files/lib/wee/response_rb.html +2 -1
- data/doc/rdoc/files/lib/wee/session_rb.html +2 -3
- data/doc/rdoc/files/lib/wee/skeleton/og/components/main_rb.html +1 -1
- data/doc/rdoc/files/lib/wee/skeleton/og/conf/db_rb.html +2 -2
- data/doc/rdoc/files/lib/wee/skeleton/og/models/recipe_rb.html +1 -1
- data/doc/rdoc/files/lib/wee/skeleton/og/run_rb.html +1 -1
- data/doc/rdoc/files/lib/wee/skeleton/simple/components/main_rb.html +1 -1
- data/doc/rdoc/files/lib/wee/skeleton/simple/run_rb.html +1 -1
- data/doc/rdoc/files/lib/wee/snapshot_ext_rb.html +1 -1
- data/doc/rdoc/files/lib/wee/template_rb.html +1 -1
- data/doc/rdoc/files/lib/wee/utils/autoreload_rb.html +1 -1
- data/doc/rdoc/files/lib/wee/utils/cache_rb.html +1 -1
- data/doc/rdoc/files/lib/wee/utils/helper_rb.html +1 -1
- data/doc/rdoc/files/lib/wee/utils_rb.html +1 -1
- data/doc/rdoc/files/lib/wee_rb.html +5 -3
- data/doc/rdoc/fr_class_index.html +34 -2
- data/doc/rdoc/fr_file_index.html +17 -1
- data/doc/rdoc/fr_method_index.html +464 -314
- data/examples/ajax/ajax.rb +1 -1
- data/examples/demo.rb +47 -0
- data/examples/{calendar.rb → demo/calendar.rb} +89 -97
- data/examples/{example.rb → demo/example.rb} +17 -97
- data/examples/dispatcher.rb +37 -0
- data/examples/draw.rb +14 -11
- data/examples/nitro/run.rb +42 -0
- data/examples/radio.rb +44 -0
- data/examples/test.rb +3 -27
- data/lib/wee.rb +15 -3
- data/lib/wee/adaptors/nitro.rb +154 -0
- data/lib/wee/adaptors/rails.rb +154 -0
- data/lib/wee/application.rb +22 -20
- data/lib/wee/components.rb +3 -0
- data/lib/wee/components/component_dispatcher.rb +46 -0
- data/lib/wee/components/login_decoration.rb +35 -0
- data/lib/wee/components/messagebox.rb +2 -2
- data/lib/wee/components/pager.rb +102 -0
- data/lib/wee/continuation/core/component.rb +13 -12
- data/lib/wee/continuation/session.rb +11 -19
- data/lib/wee/core.rb +8 -7
- data/lib/wee/core/component.rb +8 -28
- data/lib/wee/core/componentrunner.rb +73 -0
- data/lib/wee/core/context.rb +27 -0
- data/lib/wee/core/idgen.rb +5 -0
- data/lib/wee/core/page.rb +1 -0
- data/lib/wee/core/presenter.rb +10 -126
- data/lib/wee/core/renderer.rb +23 -0
- data/lib/wee/core_ext.rb +122 -0
- data/lib/wee/databases/og/scaffolder.rb +0 -1
- data/lib/wee/examples/calculator.rb +70 -0
- data/lib/wee/examples/counter.rb +33 -0
- data/lib/wee/examples/editable_counter.rb +31 -0
- data/{examples → lib/wee/examples}/window.rb +29 -23
- data/lib/wee/idgen/md5.rb +1 -1
- data/lib/wee/idgen/simple.rb +1 -1
- data/lib/wee/pageless/session.rb +2 -3
- data/lib/wee/renderer/html/brushes.rb +142 -22
- data/lib/wee/renderer/html/canvas.rb +57 -19
- data/lib/wee/response.rb +3 -2
- data/lib/wee/session.rb +10 -54
- data/lib/wee/skeleton/og/components/main.rb +5 -1
- data/lib/wee/skeleton/og/conf/db.rb +1 -1
- data/lib/wee/snapshot_ext.rb +4 -10
- data/lib/wee/template.rb +19 -5
- data/lib/wee/utils/helper.rb +2 -2
- metadata +90 -13
- data/examples/calculator.rb +0 -67
- data/lib/wee/context.rb +0 -2
|
@@ -65,8 +65,8 @@
|
|
|
65
65
|
<tr class="top-aligned-row">
|
|
66
66
|
<td><strong>Parent:</strong></td>
|
|
67
67
|
<td>
|
|
68
|
-
<a href="
|
|
69
|
-
|
|
68
|
+
<a href="IdGenerator.html">
|
|
69
|
+
Wee::IdGenerator
|
|
70
70
|
</a>
|
|
71
71
|
</td>
|
|
72
72
|
</tr>
|
|
@@ -88,8 +88,8 @@
|
|
|
88
88
|
<h3 class="section-bar">Methods</h3>
|
|
89
89
|
|
|
90
90
|
<div class="name-list">
|
|
91
|
-
<a href="#
|
|
92
|
-
<a href="#
|
|
91
|
+
<a href="#M000261">new</a>
|
|
92
|
+
<a href="#M000262">next</a>
|
|
93
93
|
</div>
|
|
94
94
|
</div>
|
|
95
95
|
|
|
@@ -111,19 +111,19 @@
|
|
|
111
111
|
<div id="methods">
|
|
112
112
|
<h3 class="section-bar">Public Class methods</h3>
|
|
113
113
|
|
|
114
|
-
<div id="method-
|
|
115
|
-
<a name="
|
|
114
|
+
<div id="method-M000261" class="method-detail">
|
|
115
|
+
<a name="M000261"></a>
|
|
116
116
|
|
|
117
117
|
<div class="method-heading">
|
|
118
|
-
<a href="#
|
|
118
|
+
<a href="#M000261" class="method-signature">
|
|
119
119
|
<span class="method-name">new</span><span class="method-args">(salt='wee')</span>
|
|
120
120
|
</a>
|
|
121
121
|
</div>
|
|
122
122
|
|
|
123
123
|
<div class="method-description">
|
|
124
124
|
<p><a class="source-toggle" href="#"
|
|
125
|
-
onclick="toggleCode('
|
|
126
|
-
<div class="method-source-code" id="
|
|
125
|
+
onclick="toggleCode('M000261-source');return false;">[Source]</a></p>
|
|
126
|
+
<div class="method-source-code" id="M000261-source">
|
|
127
127
|
<pre>
|
|
128
128
|
<span class="ruby-comment cmt"># File lib/wee/idgen/md5.rb, line 7</span>
|
|
129
129
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">salt</span>=<span class="ruby-value str">'wee'</span>)
|
|
@@ -136,19 +136,19 @@
|
|
|
136
136
|
|
|
137
137
|
<h3 class="section-bar">Public Instance methods</h3>
|
|
138
138
|
|
|
139
|
-
<div id="method-
|
|
140
|
-
<a name="
|
|
139
|
+
<div id="method-M000262" class="method-detail">
|
|
140
|
+
<a name="M000262"></a>
|
|
141
141
|
|
|
142
142
|
<div class="method-heading">
|
|
143
|
-
<a href="#
|
|
143
|
+
<a href="#M000262" class="method-signature">
|
|
144
144
|
<span class="method-name">next</span><span class="method-args">()</span>
|
|
145
145
|
</a>
|
|
146
146
|
</div>
|
|
147
147
|
|
|
148
148
|
<div class="method-description">
|
|
149
149
|
<p><a class="source-toggle" href="#"
|
|
150
|
-
onclick="toggleCode('
|
|
151
|
-
<div class="method-source-code" id="
|
|
150
|
+
onclick="toggleCode('M000262-source');return false;">[Source]</a></p>
|
|
151
|
+
<div class="method-source-code" id="M000262-source">
|
|
152
152
|
<pre>
|
|
153
153
|
<span class="ruby-comment cmt"># File lib/wee/idgen/md5.rb, line 11</span>
|
|
154
154
|
<span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">next</span>
|
|
@@ -88,8 +88,8 @@
|
|
|
88
88
|
<h3 class="section-bar">Methods</h3>
|
|
89
89
|
|
|
90
90
|
<div class="name-list">
|
|
91
|
-
<a href="#
|
|
92
|
-
<a href="#
|
|
91
|
+
<a href="#M000263">new</a>
|
|
92
|
+
<a href="#M000264">render</a>
|
|
93
93
|
</div>
|
|
94
94
|
</div>
|
|
95
95
|
|
|
@@ -111,19 +111,19 @@
|
|
|
111
111
|
<div id="methods">
|
|
112
112
|
<h3 class="section-bar">Public Class methods</h3>
|
|
113
113
|
|
|
114
|
-
<div id="method-
|
|
115
|
-
<a name="
|
|
114
|
+
<div id="method-M000263" class="method-detail">
|
|
115
|
+
<a name="M000263"></a>
|
|
116
116
|
|
|
117
117
|
<div class="method-heading">
|
|
118
|
-
<a href="#
|
|
118
|
+
<a href="#M000263" class="method-signature">
|
|
119
119
|
<span class="method-name">new</span><span class="method-args">(text)</span>
|
|
120
120
|
</a>
|
|
121
121
|
</div>
|
|
122
122
|
|
|
123
123
|
<div class="method-description">
|
|
124
124
|
<p><a class="source-toggle" href="#"
|
|
125
|
-
onclick="toggleCode('
|
|
126
|
-
<div class="method-source-code" id="
|
|
125
|
+
onclick="toggleCode('M000263-source');return false;">[Source]</a></p>
|
|
126
|
+
<div class="method-source-code" id="M000263-source">
|
|
127
127
|
<pre>
|
|
128
128
|
<span class="ruby-comment cmt"># File lib/wee/components/messagebox.rb, line 2</span>
|
|
129
129
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">text</span>)
|
|
@@ -137,27 +137,27 @@
|
|
|
137
137
|
|
|
138
138
|
<h3 class="section-bar">Public Instance methods</h3>
|
|
139
139
|
|
|
140
|
-
<div id="method-
|
|
141
|
-
<a name="
|
|
140
|
+
<div id="method-M000264" class="method-detail">
|
|
141
|
+
<a name="M000264"></a>
|
|
142
142
|
|
|
143
143
|
<div class="method-heading">
|
|
144
|
-
<a href="#
|
|
144
|
+
<a href="#M000264" class="method-signature">
|
|
145
145
|
<span class="method-name">render</span><span class="method-args">()</span>
|
|
146
146
|
</a>
|
|
147
147
|
</div>
|
|
148
148
|
|
|
149
149
|
<div class="method-description">
|
|
150
150
|
<p><a class="source-toggle" href="#"
|
|
151
|
-
onclick="toggleCode('
|
|
152
|
-
<div class="method-source-code" id="
|
|
151
|
+
onclick="toggleCode('M000264-source');return false;">[Source]</a></p>
|
|
152
|
+
<div class="method-source-code" id="M000264-source">
|
|
153
153
|
<pre>
|
|
154
154
|
<span class="ruby-comment cmt"># File lib/wee/components/messagebox.rb, line 7</span>
|
|
155
155
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">render</span>
|
|
156
156
|
<span class="ruby-identifier">r</span>.<span class="ruby-identifier">bold</span>(<span class="ruby-ivar">@text</span>)
|
|
157
157
|
<span class="ruby-identifier">r</span>.<span class="ruby-identifier">form</span> <span class="ruby-keyword kw">do</span>
|
|
158
|
-
<span class="ruby-identifier">r</span>.<span class="ruby-identifier">submit_button</span>.<span class="ruby-identifier">value</span>(<span class="ruby-value str">'OK'</span>).<span class="ruby-identifier">callback</span>
|
|
158
|
+
<span class="ruby-identifier">r</span>.<span class="ruby-identifier">submit_button</span>.<span class="ruby-identifier">value</span>(<span class="ruby-value str">'OK'</span>).<span class="ruby-identifier">callback</span>(<span class="ruby-identifier">:answer</span>, <span class="ruby-keyword kw">true</span>)
|
|
159
159
|
<span class="ruby-identifier">r</span>.<span class="ruby-identifier">space</span>
|
|
160
|
-
<span class="ruby-identifier">r</span>.<span class="ruby-identifier">submit_button</span>.<span class="ruby-identifier">value</span>(<span class="ruby-value str">'Cancel'</span>).<span class="ruby-identifier">callback</span>
|
|
160
|
+
<span class="ruby-identifier">r</span>.<span class="ruby-identifier">submit_button</span>.<span class="ruby-identifier">value</span>(<span class="ruby-value str">'Cancel'</span>).<span class="ruby-identifier">callback</span>(<span class="ruby-identifier">:answer</span>, <span class="ruby-keyword kw">false</span>)
|
|
161
161
|
<span class="ruby-keyword kw">end</span>
|
|
162
162
|
<span class="ruby-keyword kw">end</span>
|
|
163
163
|
</pre>
|
|
@@ -0,0 +1,114 @@
|
|
|
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>Module: Wee::Nitro</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>Module</strong></td>
|
|
53
|
+
<td class="class-name-in-header">Wee::Nitro</td>
|
|
54
|
+
</tr>
|
|
55
|
+
<tr class="top-aligned-row">
|
|
56
|
+
<td><strong>In:</strong></td>
|
|
57
|
+
<td>
|
|
58
|
+
<a href="../../files/lib/wee/adaptors/nitro_rb.html">
|
|
59
|
+
lib/wee/adaptors/nitro.rb
|
|
60
|
+
</a>
|
|
61
|
+
<br />
|
|
62
|
+
</td>
|
|
63
|
+
</tr>
|
|
64
|
+
|
|
65
|
+
</table>
|
|
66
|
+
</div>
|
|
67
|
+
<!-- banner header -->
|
|
68
|
+
|
|
69
|
+
<div id="bodyContent">
|
|
70
|
+
|
|
71
|
+
|
|
72
|
+
|
|
73
|
+
<div id="contextContent">
|
|
74
|
+
|
|
75
|
+
|
|
76
|
+
|
|
77
|
+
</div>
|
|
78
|
+
|
|
79
|
+
|
|
80
|
+
</div>
|
|
81
|
+
|
|
82
|
+
|
|
83
|
+
<!-- if includes -->
|
|
84
|
+
|
|
85
|
+
<div id="section">
|
|
86
|
+
|
|
87
|
+
<div id="class-list">
|
|
88
|
+
<h3 class="section-bar">Classes and Modules</h3>
|
|
89
|
+
|
|
90
|
+
Module <a href="Nitro/ControllerClassMixin.html" class="link">Wee::Nitro::ControllerClassMixin</a><br />
|
|
91
|
+
Module <a href="Nitro/ControllerMixin.html" class="link">Wee::Nitro::ControllerMixin</a><br />
|
|
92
|
+
Class <a href="Nitro/FormTag.html" class="link">Wee::Nitro::FormTag</a><br />
|
|
93
|
+
Class <a href="Nitro/HtmlCanvasRenderer.html" class="link">Wee::Nitro::HtmlCanvasRenderer</a><br />
|
|
94
|
+
|
|
95
|
+
</div>
|
|
96
|
+
|
|
97
|
+
|
|
98
|
+
|
|
99
|
+
|
|
100
|
+
|
|
101
|
+
|
|
102
|
+
|
|
103
|
+
<!-- if method_list -->
|
|
104
|
+
|
|
105
|
+
|
|
106
|
+
</div>
|
|
107
|
+
|
|
108
|
+
|
|
109
|
+
<div id="validator-badges">
|
|
110
|
+
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
|
111
|
+
</div>
|
|
112
|
+
|
|
113
|
+
</body>
|
|
114
|
+
</html>
|
|
@@ -0,0 +1,192 @@
|
|
|
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>Module: Wee::Nitro::ControllerClassMixin</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>Module</strong></td>
|
|
53
|
+
<td class="class-name-in-header">Wee::Nitro::ControllerClassMixin</td>
|
|
54
|
+
</tr>
|
|
55
|
+
<tr class="top-aligned-row">
|
|
56
|
+
<td><strong>In:</strong></td>
|
|
57
|
+
<td>
|
|
58
|
+
<a href="../../../files/lib/wee/adaptors/nitro_rb.html">
|
|
59
|
+
lib/wee/adaptors/nitro.rb
|
|
60
|
+
</a>
|
|
61
|
+
<br />
|
|
62
|
+
</td>
|
|
63
|
+
</tr>
|
|
64
|
+
|
|
65
|
+
</table>
|
|
66
|
+
</div>
|
|
67
|
+
<!-- banner header -->
|
|
68
|
+
|
|
69
|
+
<div id="bodyContent">
|
|
70
|
+
|
|
71
|
+
|
|
72
|
+
|
|
73
|
+
<div id="contextContent">
|
|
74
|
+
|
|
75
|
+
|
|
76
|
+
|
|
77
|
+
</div>
|
|
78
|
+
|
|
79
|
+
<div id="method-list">
|
|
80
|
+
<h3 class="section-bar">Methods</h3>
|
|
81
|
+
|
|
82
|
+
<div class="name-list">
|
|
83
|
+
<a href="#M000087">register_component</a>
|
|
84
|
+
<a href="#M000088">registered_components</a>
|
|
85
|
+
<a href="#M000089">scaffold_with_component</a>
|
|
86
|
+
</div>
|
|
87
|
+
</div>
|
|
88
|
+
|
|
89
|
+
</div>
|
|
90
|
+
|
|
91
|
+
|
|
92
|
+
<!-- if includes -->
|
|
93
|
+
|
|
94
|
+
<div id="section">
|
|
95
|
+
|
|
96
|
+
|
|
97
|
+
|
|
98
|
+
|
|
99
|
+
|
|
100
|
+
|
|
101
|
+
|
|
102
|
+
|
|
103
|
+
<!-- if method_list -->
|
|
104
|
+
<div id="methods">
|
|
105
|
+
<h3 class="section-bar">Public Instance methods</h3>
|
|
106
|
+
|
|
107
|
+
<div id="method-M000087" class="method-detail">
|
|
108
|
+
<a name="M000087"></a>
|
|
109
|
+
|
|
110
|
+
<div class="method-heading">
|
|
111
|
+
<a href="#M000087" class="method-signature">
|
|
112
|
+
<span class="method-name">register_component</span><span class="method-args">(name, &block)</span>
|
|
113
|
+
</a>
|
|
114
|
+
</div>
|
|
115
|
+
|
|
116
|
+
<div class="method-description">
|
|
117
|
+
<p><a class="source-toggle" href="#"
|
|
118
|
+
onclick="toggleCode('M000087-source');return false;">[Source]</a></p>
|
|
119
|
+
<div class="method-source-code" id="M000087-source">
|
|
120
|
+
<pre>
|
|
121
|
+
<span class="ruby-comment cmt"># File lib/wee/adaptors/nitro.rb, line 64</span>
|
|
122
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">register_component</span>(<span class="ruby-identifier">name</span>, <span class="ruby-operator">&</span><span class="ruby-identifier">block</span>)
|
|
123
|
+
<span class="ruby-identifier">registered_components</span>[<span class="ruby-identifier">name</span>] = <span class="ruby-identifier">block</span>
|
|
124
|
+
<span class="ruby-keyword kw">end</span>
|
|
125
|
+
</pre>
|
|
126
|
+
</div>
|
|
127
|
+
</div>
|
|
128
|
+
</div>
|
|
129
|
+
|
|
130
|
+
<div id="method-M000088" class="method-detail">
|
|
131
|
+
<a name="M000088"></a>
|
|
132
|
+
|
|
133
|
+
<div class="method-heading">
|
|
134
|
+
<a href="#M000088" class="method-signature">
|
|
135
|
+
<span class="method-name">registered_components</span><span class="method-args">()</span>
|
|
136
|
+
</a>
|
|
137
|
+
</div>
|
|
138
|
+
|
|
139
|
+
<div class="method-description">
|
|
140
|
+
<p><a class="source-toggle" href="#"
|
|
141
|
+
onclick="toggleCode('M000088-source');return false;">[Source]</a></p>
|
|
142
|
+
<div class="method-source-code" id="M000088-source">
|
|
143
|
+
<pre>
|
|
144
|
+
<span class="ruby-comment cmt"># File lib/wee/adaptors/nitro.rb, line 68</span>
|
|
145
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">registered_components</span>
|
|
146
|
+
<span class="ruby-ivar">@@registered_components</span> <span class="ruby-operator">||=</span> <span class="ruby-constant">Hash</span>.<span class="ruby-identifier">new</span>
|
|
147
|
+
<span class="ruby-keyword kw">end</span>
|
|
148
|
+
</pre>
|
|
149
|
+
</div>
|
|
150
|
+
</div>
|
|
151
|
+
</div>
|
|
152
|
+
|
|
153
|
+
<div id="method-M000089" class="method-detail">
|
|
154
|
+
<a name="M000089"></a>
|
|
155
|
+
|
|
156
|
+
<div class="method-heading">
|
|
157
|
+
<a href="#M000089" class="method-signature">
|
|
158
|
+
<span class="method-name">scaffold_with_component</span><span class="method-args">(name=nil, &block)</span>
|
|
159
|
+
</a>
|
|
160
|
+
</div>
|
|
161
|
+
|
|
162
|
+
<div class="method-description">
|
|
163
|
+
<p><a class="source-toggle" href="#"
|
|
164
|
+
onclick="toggleCode('M000089-source');return false;">[Source]</a></p>
|
|
165
|
+
<div class="method-source-code" id="M000089-source">
|
|
166
|
+
<pre>
|
|
167
|
+
<span class="ruby-comment cmt"># File lib/wee/adaptors/nitro.rb, line 72</span>
|
|
168
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">scaffold_with_component</span>(<span class="ruby-identifier">name</span>=<span class="ruby-keyword kw">nil</span>, <span class="ruby-operator">&</span><span class="ruby-identifier">block</span>)
|
|
169
|
+
<span class="ruby-identifier">name</span> <span class="ruby-operator">||=</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">name</span>
|
|
170
|
+
<span class="ruby-identifier">register_component</span>(<span class="ruby-identifier">name</span>, <span class="ruby-operator">&</span><span class="ruby-identifier">block</span>) <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">block</span>
|
|
171
|
+
<span class="ruby-identifier">send</span>(<span class="ruby-identifier">:define_method</span>, <span class="ruby-identifier">:index</span>) <span class="ruby-keyword kw">do</span>
|
|
172
|
+
<span class="ruby-identifier">show_component</span> <span class="ruby-identifier">name</span>
|
|
173
|
+
<span class="ruby-keyword kw">end</span>
|
|
174
|
+
<span class="ruby-keyword kw">end</span>
|
|
175
|
+
</pre>
|
|
176
|
+
</div>
|
|
177
|
+
</div>
|
|
178
|
+
</div>
|
|
179
|
+
|
|
180
|
+
|
|
181
|
+
</div>
|
|
182
|
+
|
|
183
|
+
|
|
184
|
+
</div>
|
|
185
|
+
|
|
186
|
+
|
|
187
|
+
<div id="validator-badges">
|
|
188
|
+
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
|
189
|
+
</div>
|
|
190
|
+
|
|
191
|
+
</body>
|
|
192
|
+
</html>
|
|
@@ -0,0 +1,345 @@
|
|
|
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>Module: Wee::Nitro::ControllerMixin</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>Module</strong></td>
|
|
53
|
+
<td class="class-name-in-header">Wee::Nitro::ControllerMixin</td>
|
|
54
|
+
</tr>
|
|
55
|
+
<tr class="top-aligned-row">
|
|
56
|
+
<td><strong>In:</strong></td>
|
|
57
|
+
<td>
|
|
58
|
+
<a href="../../../files/lib/wee/adaptors/nitro_rb.html">
|
|
59
|
+
lib/wee/adaptors/nitro.rb
|
|
60
|
+
</a>
|
|
61
|
+
<br />
|
|
62
|
+
</td>
|
|
63
|
+
</tr>
|
|
64
|
+
|
|
65
|
+
</table>
|
|
66
|
+
</div>
|
|
67
|
+
<!-- banner header -->
|
|
68
|
+
|
|
69
|
+
<div id="bodyContent">
|
|
70
|
+
|
|
71
|
+
|
|
72
|
+
|
|
73
|
+
<div id="contextContent">
|
|
74
|
+
|
|
75
|
+
|
|
76
|
+
|
|
77
|
+
</div>
|
|
78
|
+
|
|
79
|
+
<div id="method-list">
|
|
80
|
+
<h3 class="section-bar">Methods</h3>
|
|
81
|
+
|
|
82
|
+
<div class="name-list">
|
|
83
|
+
<a href="#M000084">_show_component</a>
|
|
84
|
+
<a href="#M000080">callback</a>
|
|
85
|
+
<a href="#M000086">components</a>
|
|
86
|
+
<a href="#M000082">drop_component</a>
|
|
87
|
+
<a href="#M000083">has_component?</a>
|
|
88
|
+
<a href="#M000079">included</a>
|
|
89
|
+
<a href="#M000081">make_component</a>
|
|
90
|
+
<a href="#M000085">show_component</a>
|
|
91
|
+
</div>
|
|
92
|
+
</div>
|
|
93
|
+
|
|
94
|
+
</div>
|
|
95
|
+
|
|
96
|
+
|
|
97
|
+
<!-- if includes -->
|
|
98
|
+
|
|
99
|
+
<div id="section">
|
|
100
|
+
|
|
101
|
+
|
|
102
|
+
|
|
103
|
+
|
|
104
|
+
|
|
105
|
+
|
|
106
|
+
|
|
107
|
+
|
|
108
|
+
<!-- if method_list -->
|
|
109
|
+
<div id="methods">
|
|
110
|
+
<h3 class="section-bar">Public Class methods</h3>
|
|
111
|
+
|
|
112
|
+
<div id="method-M000079" class="method-detail">
|
|
113
|
+
<a name="M000079"></a>
|
|
114
|
+
|
|
115
|
+
<div class="method-heading">
|
|
116
|
+
<a href="#M000079" class="method-signature">
|
|
117
|
+
<span class="method-name">included</span><span class="method-args">(klass)</span>
|
|
118
|
+
</a>
|
|
119
|
+
</div>
|
|
120
|
+
|
|
121
|
+
<div class="method-description">
|
|
122
|
+
<p><a class="source-toggle" href="#"
|
|
123
|
+
onclick="toggleCode('M000079-source');return false;">[Source]</a></p>
|
|
124
|
+
<div class="method-source-code" id="M000079-source">
|
|
125
|
+
<pre>
|
|
126
|
+
<span class="ruby-comment cmt"># File lib/wee/adaptors/nitro.rb, line 83</span>
|
|
127
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">included</span>(<span class="ruby-identifier">klass</span>)
|
|
128
|
+
<span class="ruby-identifier">klass</span>.<span class="ruby-identifier">extend</span>(<span class="ruby-constant">ControllerClassMixin</span>)
|
|
129
|
+
<span class="ruby-keyword kw">end</span>
|
|
130
|
+
</pre>
|
|
131
|
+
</div>
|
|
132
|
+
</div>
|
|
133
|
+
</div>
|
|
134
|
+
|
|
135
|
+
<h3 class="section-bar">Public Instance methods</h3>
|
|
136
|
+
|
|
137
|
+
<div id="method-M000080" class="method-detail">
|
|
138
|
+
<a name="M000080"></a>
|
|
139
|
+
|
|
140
|
+
<div class="method-heading">
|
|
141
|
+
<a href="#M000080" class="method-signature">
|
|
142
|
+
<span class="method-name">callback</span><span class="method-args">()</span>
|
|
143
|
+
</a>
|
|
144
|
+
</div>
|
|
145
|
+
|
|
146
|
+
<div class="method-description">
|
|
147
|
+
<p><a class="source-toggle" href="#"
|
|
148
|
+
onclick="toggleCode('M000080-source');return false;">[Source]</a></p>
|
|
149
|
+
<div class="method-source-code" id="M000080-source">
|
|
150
|
+
<pre>
|
|
151
|
+
<span class="ruby-comment cmt"># File lib/wee/adaptors/nitro.rb, line 89</span>
|
|
152
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">callback</span>
|
|
153
|
+
<span class="ruby-identifier">c</span> = <span class="ruby-identifier">components</span>[<span class="ruby-identifier">request</span>.<span class="ruby-identifier">params</span>[<span class="ruby-value str">'__c'</span>]]
|
|
154
|
+
<span class="ruby-identifier">raise</span> <span class="ruby-value str">"no component found"</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">c</span>.<span class="ruby-identifier">nil?</span>
|
|
155
|
+
<span class="ruby-identifier">callback_stream</span> = <span class="ruby-constant">Wee</span><span class="ruby-operator">::</span><span class="ruby-constant">CallbackStream</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">c</span>.<span class="ruby-identifier">callbacks</span>, <span class="ruby-identifier">request</span>.<span class="ruby-identifier">params</span>)
|
|
156
|
+
<span class="ruby-identifier">c</span>.<span class="ruby-identifier">process_callbacks</span>(<span class="ruby-identifier">callback_stream</span>)
|
|
157
|
+
|
|
158
|
+
<span class="ruby-identifier">controller</span> = <span class="ruby-identifier">request</span>.<span class="ruby-identifier">path</span>.<span class="ruby-identifier">split</span>(<span class="ruby-value str">'/'</span>).<span class="ruby-identifier">first</span>
|
|
159
|
+
<span class="ruby-identifier">action</span> = <span class="ruby-identifier">request</span>.<span class="ruby-identifier">params</span>[<span class="ruby-value str">'__a'</span>] <span class="ruby-operator">||</span> <span class="ruby-value str">'index'</span>
|
|
160
|
+
<span class="ruby-identifier">redirect</span> [<span class="ruby-identifier">controller</span>, <span class="ruby-identifier">action</span>].<span class="ruby-identifier">join</span>(<span class="ruby-value str">"/"</span>)
|
|
161
|
+
<span class="ruby-keyword kw">end</span>
|
|
162
|
+
</pre>
|
|
163
|
+
</div>
|
|
164
|
+
</div>
|
|
165
|
+
</div>
|
|
166
|
+
|
|
167
|
+
<h3 class="section-bar">Protected Instance methods</h3>
|
|
168
|
+
|
|
169
|
+
<div id="method-M000084" class="method-detail">
|
|
170
|
+
<a name="M000084"></a>
|
|
171
|
+
|
|
172
|
+
<div class="method-heading">
|
|
173
|
+
<a href="#M000084" class="method-signature">
|
|
174
|
+
<span class="method-name">_show_component</span><span class="method-args">(name, hash={}, out='')</span>
|
|
175
|
+
</a>
|
|
176
|
+
</div>
|
|
177
|
+
|
|
178
|
+
<div class="method-description">
|
|
179
|
+
<p><a class="source-toggle" href="#"
|
|
180
|
+
onclick="toggleCode('M000084-source');return false;">[Source]</a></p>
|
|
181
|
+
<div class="method-source-code" id="M000084-source">
|
|
182
|
+
<pre>
|
|
183
|
+
<span class="ruby-comment cmt"># File lib/wee/adaptors/nitro.rb, line 122</span>
|
|
184
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">_show_component</span>(<span class="ruby-identifier">name</span>, <span class="ruby-identifier">hash</span>={}, <span class="ruby-identifier">out</span>=<span class="ruby-value str">''</span>)
|
|
185
|
+
<span class="ruby-identifier">cb</span> = <span class="ruby-constant">Wee</span><span class="ruby-operator">::</span><span class="ruby-constant">CallbackRegistry</span>.<span class="ruby-identifier">new</span>(<span class="ruby-constant">Wee</span><span class="ruby-operator">::</span><span class="ruby-constant">SimpleIdGenerator</span>.<span class="ruby-identifier">new</span>)
|
|
186
|
+
<span class="ruby-identifier">ctx</span> = <span class="ruby-constant">Wee</span><span class="ruby-operator">::</span><span class="ruby-constant">Context</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">request</span>(), <span class="ruby-identifier">response</span>(), <span class="ruby-identifier">session</span>())
|
|
187
|
+
<span class="ruby-identifier">rctx</span> = <span class="ruby-constant">Wee</span><span class="ruby-operator">::</span><span class="ruby-constant">RenderingContext</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">ctx</span>, <span class="ruby-identifier">cb</span>, <span class="ruby-constant">Wee</span><span class="ruby-operator">::</span><span class="ruby-constant">HtmlWriter</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">out</span>))
|
|
188
|
+
<span class="ruby-identifier">rctx</span>.<span class="ruby-identifier">component_name</span> = <span class="ruby-identifier">name</span>
|
|
189
|
+
<span class="ruby-identifier">rctx</span>.<span class="ruby-identifier">controller</span> = <span class="ruby-keyword kw">self</span>
|
|
190
|
+
<span class="ruby-identifier">rctx</span>.<span class="ruby-identifier">redirect_action</span> = <span class="ruby-identifier">hash</span>[<span class="ruby-identifier">:redirect_action</span>]
|
|
191
|
+
|
|
192
|
+
<span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">c</span> = <span class="ruby-identifier">components</span>[<span class="ruby-identifier">name</span>]
|
|
193
|
+
<span class="ruby-keyword kw">if</span> <span class="ruby-identifier">block</span> = <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">class</span>.<span class="ruby-identifier">registered_components</span>[<span class="ruby-identifier">name</span>]
|
|
194
|
+
<span class="ruby-identifier">make_component</span> <span class="ruby-identifier">name</span>, <span class="ruby-identifier">block</span>.<span class="ruby-identifier">call</span>
|
|
195
|
+
<span class="ruby-identifier">c</span> = <span class="ruby-identifier">components</span>[<span class="ruby-identifier">name</span>]
|
|
196
|
+
<span class="ruby-keyword kw">end</span>
|
|
197
|
+
<span class="ruby-keyword kw">end</span>
|
|
198
|
+
|
|
199
|
+
<span class="ruby-identifier">raise</span> <span class="ruby-node">"component #{ name } not found"</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">c</span>.<span class="ruby-identifier">nil?</span>
|
|
200
|
+
|
|
201
|
+
<span class="ruby-identifier">c</span>.<span class="ruby-identifier">render</span>(<span class="ruby-identifier">rctx</span>)
|
|
202
|
+
<span class="ruby-identifier">c</span>.<span class="ruby-identifier">callbacks</span> = <span class="ruby-identifier">cb</span>
|
|
203
|
+
<span class="ruby-identifier">out</span>
|
|
204
|
+
<span class="ruby-keyword kw">end</span>
|
|
205
|
+
</pre>
|
|
206
|
+
</div>
|
|
207
|
+
</div>
|
|
208
|
+
</div>
|
|
209
|
+
|
|
210
|
+
<div id="method-M000086" class="method-detail">
|
|
211
|
+
<a name="M000086"></a>
|
|
212
|
+
|
|
213
|
+
<div class="method-heading">
|
|
214
|
+
<a href="#M000086" class="method-signature">
|
|
215
|
+
<span class="method-name">components</span><span class="method-args">()</span>
|
|
216
|
+
</a>
|
|
217
|
+
</div>
|
|
218
|
+
|
|
219
|
+
<div class="method-description">
|
|
220
|
+
<p><a class="source-toggle" href="#"
|
|
221
|
+
onclick="toggleCode('M000086-source');return false;">[Source]</a></p>
|
|
222
|
+
<div class="method-source-code" id="M000086-source">
|
|
223
|
+
<pre>
|
|
224
|
+
<span class="ruby-comment cmt"># File lib/wee/adaptors/nitro.rb, line 148</span>
|
|
225
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">components</span>
|
|
226
|
+
<span class="ruby-identifier">session</span>[<span class="ruby-identifier">:COMPONENTS</span>] <span class="ruby-operator">||=</span> <span class="ruby-constant">Hash</span>.<span class="ruby-identifier">new</span>
|
|
227
|
+
<span class="ruby-keyword kw">end</span>
|
|
228
|
+
</pre>
|
|
229
|
+
</div>
|
|
230
|
+
</div>
|
|
231
|
+
</div>
|
|
232
|
+
|
|
233
|
+
<div id="method-M000082" class="method-detail">
|
|
234
|
+
<a name="M000082"></a>
|
|
235
|
+
|
|
236
|
+
<div class="method-heading">
|
|
237
|
+
<a href="#M000082" class="method-signature">
|
|
238
|
+
<span class="method-name">drop_component</span><span class="method-args">(name)</span>
|
|
239
|
+
</a>
|
|
240
|
+
</div>
|
|
241
|
+
|
|
242
|
+
<div class="method-description">
|
|
243
|
+
<p><a class="source-toggle" href="#"
|
|
244
|
+
onclick="toggleCode('M000082-source');return false;">[Source]</a></p>
|
|
245
|
+
<div class="method-source-code" id="M000082-source">
|
|
246
|
+
<pre>
|
|
247
|
+
<span class="ruby-comment cmt"># File lib/wee/adaptors/nitro.rb, line 110</span>
|
|
248
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">drop_component</span>(<span class="ruby-identifier">name</span>)
|
|
249
|
+
<span class="ruby-keyword kw">if</span> <span class="ruby-identifier">components</span>.<span class="ruby-identifier">has_key?</span>(<span class="ruby-identifier">name</span>)
|
|
250
|
+
<span class="ruby-identifier">components</span>.<span class="ruby-identifier">delete</span>(<span class="ruby-identifier">name</span>)
|
|
251
|
+
<span class="ruby-keyword kw">else</span>
|
|
252
|
+
<span class="ruby-identifier">raise</span> <span class="ruby-node">"component #{ name } not found"</span>
|
|
253
|
+
<span class="ruby-keyword kw">end</span>
|
|
254
|
+
<span class="ruby-keyword kw">end</span>
|
|
255
|
+
</pre>
|
|
256
|
+
</div>
|
|
257
|
+
</div>
|
|
258
|
+
</div>
|
|
259
|
+
|
|
260
|
+
<div id="method-M000083" class="method-detail">
|
|
261
|
+
<a name="M000083"></a>
|
|
262
|
+
|
|
263
|
+
<div class="method-heading">
|
|
264
|
+
<a href="#M000083" class="method-signature">
|
|
265
|
+
<span class="method-name">has_component?</span><span class="method-args">(name)</span>
|
|
266
|
+
</a>
|
|
267
|
+
</div>
|
|
268
|
+
|
|
269
|
+
<div class="method-description">
|
|
270
|
+
<p><a class="source-toggle" href="#"
|
|
271
|
+
onclick="toggleCode('M000083-source');return false;">[Source]</a></p>
|
|
272
|
+
<div class="method-source-code" id="M000083-source">
|
|
273
|
+
<pre>
|
|
274
|
+
<span class="ruby-comment cmt"># File lib/wee/adaptors/nitro.rb, line 118</span>
|
|
275
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">has_component?</span>(<span class="ruby-identifier">name</span>)
|
|
276
|
+
<span class="ruby-identifier">components</span>.<span class="ruby-identifier">has_key?</span>(<span class="ruby-identifier">name</span>)
|
|
277
|
+
<span class="ruby-keyword kw">end</span>
|
|
278
|
+
</pre>
|
|
279
|
+
</div>
|
|
280
|
+
</div>
|
|
281
|
+
</div>
|
|
282
|
+
|
|
283
|
+
<div id="method-M000081" class="method-detail">
|
|
284
|
+
<a name="M000081"></a>
|
|
285
|
+
|
|
286
|
+
<div class="method-heading">
|
|
287
|
+
<a href="#M000081" class="method-signature">
|
|
288
|
+
<span class="method-name">make_component</span><span class="method-args">(name, obj)</span>
|
|
289
|
+
</a>
|
|
290
|
+
</div>
|
|
291
|
+
|
|
292
|
+
<div class="method-description">
|
|
293
|
+
<p><a class="source-toggle" href="#"
|
|
294
|
+
onclick="toggleCode('M000081-source');return false;">[Source]</a></p>
|
|
295
|
+
<div class="method-source-code" id="M000081-source">
|
|
296
|
+
<pre>
|
|
297
|
+
<span class="ruby-comment cmt"># File lib/wee/adaptors/nitro.rb, line 102</span>
|
|
298
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">make_component</span>(<span class="ruby-identifier">name</span>, <span class="ruby-identifier">obj</span>)
|
|
299
|
+
<span class="ruby-keyword kw">if</span> <span class="ruby-identifier">components</span>.<span class="ruby-identifier">has_key?</span>(<span class="ruby-identifier">name</span>)
|
|
300
|
+
<span class="ruby-identifier">raise</span> <span class="ruby-node">"disallowed to overwrite component #{ name }"</span>
|
|
301
|
+
<span class="ruby-keyword kw">else</span>
|
|
302
|
+
<span class="ruby-identifier">components</span>[<span class="ruby-identifier">name</span>] = <span class="ruby-constant">Wee</span><span class="ruby-operator">::</span><span class="ruby-constant">PagelessComponentDriver</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">obj</span>, <span class="ruby-constant">Wee</span><span class="ruby-operator">::</span><span class="ruby-constant">CallbackRegistry</span>.<span class="ruby-identifier">new</span>(<span class="ruby-constant">Wee</span><span class="ruby-operator">::</span><span class="ruby-constant">SimpleIdGenerator</span>.<span class="ruby-identifier">new</span>))
|
|
303
|
+
<span class="ruby-keyword kw">end</span>
|
|
304
|
+
<span class="ruby-keyword kw">end</span>
|
|
305
|
+
</pre>
|
|
306
|
+
</div>
|
|
307
|
+
</div>
|
|
308
|
+
</div>
|
|
309
|
+
|
|
310
|
+
<div id="method-M000085" class="method-detail">
|
|
311
|
+
<a name="M000085"></a>
|
|
312
|
+
|
|
313
|
+
<div class="method-heading">
|
|
314
|
+
<a href="#M000085" class="method-signature">
|
|
315
|
+
<span class="method-name">show_component</span><span class="method-args">(name, hash={})</span>
|
|
316
|
+
</a>
|
|
317
|
+
</div>
|
|
318
|
+
|
|
319
|
+
<div class="method-description">
|
|
320
|
+
<p><a class="source-toggle" href="#"
|
|
321
|
+
onclick="toggleCode('M000085-source');return false;">[Source]</a></p>
|
|
322
|
+
<div class="method-source-code" id="M000085-source">
|
|
323
|
+
<pre>
|
|
324
|
+
<span class="ruby-comment cmt"># File lib/wee/adaptors/nitro.rb, line 144</span>
|
|
325
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">show_component</span>(<span class="ruby-identifier">name</span>, <span class="ruby-identifier">hash</span>={})
|
|
326
|
+
<span class="ruby-identifier">_show_component</span>(<span class="ruby-identifier">name</span>, <span class="ruby-identifier">hash</span>, <span class="ruby-ivar">@out</span>)
|
|
327
|
+
<span class="ruby-keyword kw">end</span>
|
|
328
|
+
</pre>
|
|
329
|
+
</div>
|
|
330
|
+
</div>
|
|
331
|
+
</div>
|
|
332
|
+
|
|
333
|
+
|
|
334
|
+
</div>
|
|
335
|
+
|
|
336
|
+
|
|
337
|
+
</div>
|
|
338
|
+
|
|
339
|
+
|
|
340
|
+
<div id="validator-badges">
|
|
341
|
+
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
|
342
|
+
</div>
|
|
343
|
+
|
|
344
|
+
</body>
|
|
345
|
+
</html>
|