wee 0.8.0 → 0.9.0
Sign up to get free protection for your applications and to get access to all the features.
- 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
@@ -55,8 +55,16 @@
|
|
55
55
|
<tr class="top-aligned-row">
|
56
56
|
<td><strong>In:</strong></td>
|
57
57
|
<td>
|
58
|
-
<a href="../../files/lib/wee/context_rb.html">
|
59
|
-
lib/wee/context.rb
|
58
|
+
<a href="../../files/lib/wee/core/context_rb.html">
|
59
|
+
lib/wee/core/context.rb
|
60
|
+
</a>
|
61
|
+
<br />
|
62
|
+
<a href="../../files/lib/wee/adaptors/rails_rb.html">
|
63
|
+
lib/wee/adaptors/rails.rb
|
64
|
+
</a>
|
65
|
+
<br />
|
66
|
+
<a href="../../files/lib/wee/adaptors/nitro_rb.html">
|
67
|
+
lib/wee/adaptors/nitro.rb
|
60
68
|
</a>
|
61
69
|
<br />
|
62
70
|
</td>
|
@@ -65,7 +73,9 @@
|
|
65
73
|
<tr class="top-aligned-row">
|
66
74
|
<td><strong>Parent:</strong></td>
|
67
75
|
<td>
|
68
|
-
|
76
|
+
<a href="../Object.html">
|
77
|
+
Object
|
78
|
+
</a>
|
69
79
|
</td>
|
70
80
|
</tr>
|
71
81
|
</table>
|
@@ -82,6 +92,16 @@
|
|
82
92
|
|
83
93
|
</div>
|
84
94
|
|
95
|
+
<div id="method-list">
|
96
|
+
<h3 class="section-bar">Methods</h3>
|
97
|
+
|
98
|
+
<div class="name-list">
|
99
|
+
<a href="#M000164">new</a>
|
100
|
+
<a href="#M000165">request</a>
|
101
|
+
<a href="#M000166">response</a>
|
102
|
+
<a href="#M000167">session</a>
|
103
|
+
</div>
|
104
|
+
</div>
|
85
105
|
|
86
106
|
</div>
|
87
107
|
|
@@ -94,10 +114,162 @@
|
|
94
114
|
|
95
115
|
|
96
116
|
|
117
|
+
<div id="attribute-list">
|
118
|
+
<h3 class="section-bar">Attributes</h3>
|
119
|
+
|
120
|
+
<div class="name-list">
|
121
|
+
<table>
|
122
|
+
<tr class="top-aligned-row context-row">
|
123
|
+
<td class="context-item-name">callbacks</td>
|
124
|
+
<td class="context-item-value"> [RW] </td>
|
125
|
+
<td class="context-item-desc"></td>
|
126
|
+
</tr>
|
127
|
+
<tr class="top-aligned-row context-row">
|
128
|
+
<td class="context-item-name">component_name</td>
|
129
|
+
<td class="context-item-value"> [RW] </td>
|
130
|
+
<td class="context-item-desc"></td>
|
131
|
+
</tr>
|
132
|
+
<tr class="top-aligned-row context-row">
|
133
|
+
<td class="context-item-name">component_name</td>
|
134
|
+
<td class="context-item-value"> [RW] </td>
|
135
|
+
<td class="context-item-desc"></td>
|
136
|
+
</tr>
|
137
|
+
<tr class="top-aligned-row context-row">
|
138
|
+
<td class="context-item-name">context</td>
|
139
|
+
<td class="context-item-value"> [RW] </td>
|
140
|
+
<td class="context-item-desc"></td>
|
141
|
+
</tr>
|
142
|
+
<tr class="top-aligned-row context-row">
|
143
|
+
<td class="context-item-name">controller</td>
|
144
|
+
<td class="context-item-value"> [RW] </td>
|
145
|
+
<td class="context-item-desc"></td>
|
146
|
+
</tr>
|
147
|
+
<tr class="top-aligned-row context-row">
|
148
|
+
<td class="context-item-name">controller</td>
|
149
|
+
<td class="context-item-value"> [RW] </td>
|
150
|
+
<td class="context-item-desc"></td>
|
151
|
+
</tr>
|
152
|
+
<tr class="top-aligned-row context-row">
|
153
|
+
<td class="context-item-name">document</td>
|
154
|
+
<td class="context-item-value"> [RW] </td>
|
155
|
+
<td class="context-item-desc"></td>
|
156
|
+
</tr>
|
157
|
+
<tr class="top-aligned-row context-row">
|
158
|
+
<td class="context-item-name">redirect_action</td>
|
159
|
+
<td class="context-item-value"> [RW] </td>
|
160
|
+
<td class="context-item-desc"></td>
|
161
|
+
</tr>
|
162
|
+
<tr class="top-aligned-row context-row">
|
163
|
+
<td class="context-item-name">redirect_action</td>
|
164
|
+
<td class="context-item-value"> [RW] </td>
|
165
|
+
<td class="context-item-desc"></td>
|
166
|
+
</tr>
|
167
|
+
</table>
|
168
|
+
</div>
|
169
|
+
</div>
|
97
170
|
|
98
171
|
|
99
172
|
|
100
173
|
<!-- if method_list -->
|
174
|
+
<div id="methods">
|
175
|
+
<h3 class="section-bar">Public Class methods</h3>
|
176
|
+
|
177
|
+
<div id="method-M000164" class="method-detail">
|
178
|
+
<a name="M000164"></a>
|
179
|
+
|
180
|
+
<div class="method-heading">
|
181
|
+
<a href="#M000164" class="method-signature">
|
182
|
+
<span class="method-name">new</span><span class="method-args">(context=nil, callbacks=nil, document=nil)</span>
|
183
|
+
</a>
|
184
|
+
</div>
|
185
|
+
|
186
|
+
<div class="method-description">
|
187
|
+
<p><a class="source-toggle" href="#"
|
188
|
+
onclick="toggleCode('M000164-source');return false;">[Source]</a></p>
|
189
|
+
<div class="method-source-code" id="M000164-source">
|
190
|
+
<pre>
|
191
|
+
<span class="ruby-comment cmt"># File lib/wee/core/context.rb, line 12</span>
|
192
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">context</span>=<span class="ruby-keyword kw">nil</span>, <span class="ruby-identifier">callbacks</span>=<span class="ruby-keyword kw">nil</span>, <span class="ruby-identifier">document</span>=<span class="ruby-keyword kw">nil</span>)
|
193
|
+
<span class="ruby-ivar">@context</span>, <span class="ruby-ivar">@callbacks</span>, <span class="ruby-ivar">@document</span> = <span class="ruby-identifier">context</span>, <span class="ruby-identifier">callbacks</span>, <span class="ruby-identifier">document</span>
|
194
|
+
<span class="ruby-keyword kw">end</span>
|
195
|
+
</pre>
|
196
|
+
</div>
|
197
|
+
</div>
|
198
|
+
</div>
|
199
|
+
|
200
|
+
<h3 class="section-bar">Public Instance methods</h3>
|
201
|
+
|
202
|
+
<div id="method-M000165" class="method-detail">
|
203
|
+
<a name="M000165"></a>
|
204
|
+
|
205
|
+
<div class="method-heading">
|
206
|
+
<a href="#M000165" class="method-signature">
|
207
|
+
<span class="method-name">request</span><span class="method-args">()</span>
|
208
|
+
</a>
|
209
|
+
</div>
|
210
|
+
|
211
|
+
<div class="method-description">
|
212
|
+
<p><a class="source-toggle" href="#"
|
213
|
+
onclick="toggleCode('M000165-source');return false;">[Source]</a></p>
|
214
|
+
<div class="method-source-code" id="M000165-source">
|
215
|
+
<pre>
|
216
|
+
<span class="ruby-comment cmt"># File lib/wee/core/context.rb, line 16</span>
|
217
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">request</span>
|
218
|
+
<span class="ruby-ivar">@context</span>.<span class="ruby-identifier">request</span>
|
219
|
+
<span class="ruby-keyword kw">end</span>
|
220
|
+
</pre>
|
221
|
+
</div>
|
222
|
+
</div>
|
223
|
+
</div>
|
224
|
+
|
225
|
+
<div id="method-M000166" class="method-detail">
|
226
|
+
<a name="M000166"></a>
|
227
|
+
|
228
|
+
<div class="method-heading">
|
229
|
+
<a href="#M000166" class="method-signature">
|
230
|
+
<span class="method-name">response</span><span class="method-args">()</span>
|
231
|
+
</a>
|
232
|
+
</div>
|
233
|
+
|
234
|
+
<div class="method-description">
|
235
|
+
<p><a class="source-toggle" href="#"
|
236
|
+
onclick="toggleCode('M000166-source');return false;">[Source]</a></p>
|
237
|
+
<div class="method-source-code" id="M000166-source">
|
238
|
+
<pre>
|
239
|
+
<span class="ruby-comment cmt"># File lib/wee/core/context.rb, line 20</span>
|
240
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">response</span>
|
241
|
+
<span class="ruby-ivar">@context</span>.<span class="ruby-identifier">response</span>
|
242
|
+
<span class="ruby-keyword kw">end</span>
|
243
|
+
</pre>
|
244
|
+
</div>
|
245
|
+
</div>
|
246
|
+
</div>
|
247
|
+
|
248
|
+
<div id="method-M000167" class="method-detail">
|
249
|
+
<a name="M000167"></a>
|
250
|
+
|
251
|
+
<div class="method-heading">
|
252
|
+
<a href="#M000167" class="method-signature">
|
253
|
+
<span class="method-name">session</span><span class="method-args">()</span>
|
254
|
+
</a>
|
255
|
+
</div>
|
256
|
+
|
257
|
+
<div class="method-description">
|
258
|
+
<p><a class="source-toggle" href="#"
|
259
|
+
onclick="toggleCode('M000167-source');return false;">[Source]</a></p>
|
260
|
+
<div class="method-source-code" id="M000167-source">
|
261
|
+
<pre>
|
262
|
+
<span class="ruby-comment cmt"># File lib/wee/core/context.rb, line 24</span>
|
263
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">session</span>
|
264
|
+
<span class="ruby-ivar">@context</span>.<span class="ruby-identifier">session</span>
|
265
|
+
<span class="ruby-keyword kw">end</span>
|
266
|
+
</pre>
|
267
|
+
</div>
|
268
|
+
</div>
|
269
|
+
</div>
|
270
|
+
|
271
|
+
|
272
|
+
</div>
|
101
273
|
|
102
274
|
|
103
275
|
</div>
|
@@ -86,9 +86,10 @@ Represents a request.
|
|
86
86
|
</p>
|
87
87
|
<p>
|
88
88
|
NOTE that if there are fields named "xxx" and
|
89
|
-
"xxx.yyy", the value of fields[‘xxx’] is a
|
90
|
-
=> val of "xxx",
|
91
|
-
‘xxx.yyy’}. This is for the
|
89
|
+
"xxx.yyy", the value of fields[‘xxx’] is a <a
|
90
|
+
href="../Hash.html">Hash</a> {nil => val of "xxx",
|
91
|
+
‘yyy’ => val of ‘xxx.yyy’}. This is for the
|
92
|
+
image-button to work correctly.
|
92
93
|
</p>
|
93
94
|
|
94
95
|
</div>
|
@@ -100,11 +101,15 @@ NOTE that if there are fields named "xxx" and
|
|
100
101
|
<h3 class="section-bar">Methods</h3>
|
101
102
|
|
102
103
|
<div class="name-list">
|
103
|
-
<a href="#
|
104
|
-
<a href="#
|
105
|
-
<a href="#
|
106
|
-
<a href="#
|
107
|
-
<a href="#
|
104
|
+
<a href="#M000386">action?</a>
|
105
|
+
<a href="#M000385">application_path</a>
|
106
|
+
<a href="#M000388">build_url</a>
|
107
|
+
<a href="#M000390">make_request_path</a>
|
108
|
+
<a href="#M000384">new</a>
|
109
|
+
<a href="#M000389">pageless?</a>
|
110
|
+
<a href="#M000391">parse_fields</a>
|
111
|
+
<a href="#M000392">parse_path</a>
|
112
|
+
<a href="#M000387">render?</a>
|
108
113
|
</div>
|
109
114
|
</div>
|
110
115
|
|
@@ -124,7 +129,7 @@ NOTE that if there are fields named "xxx" and
|
|
124
129
|
<tr class="top-aligned-row context-row">
|
125
130
|
<td class="context-item-name">DELIM</td>
|
126
131
|
<td>=</td>
|
127
|
-
<td class="context-item-value">'
|
132
|
+
<td class="context-item-value">'/___/'</td>
|
128
133
|
</tr>
|
129
134
|
</table>
|
130
135
|
</div>
|
@@ -147,6 +152,14 @@ NOTE that if there are fields named "xxx" and
|
|
147
152
|
<td class="context-item-value"> [R] </td>
|
148
153
|
<td class="context-item-desc"></td>
|
149
154
|
</tr>
|
155
|
+
<tr class="top-aligned-row context-row">
|
156
|
+
<td class="context-item-name">info</td>
|
157
|
+
<td class="context-item-value"> [RW] </td>
|
158
|
+
<td class="context-item-desc">
|
159
|
+
The part of the URL that is user-defineable
|
160
|
+
|
161
|
+
</td>
|
162
|
+
</tr>
|
150
163
|
<tr class="top-aligned-row context-row">
|
151
164
|
<td class="context-item-name">page_id</td>
|
152
165
|
<td class="context-item-value"> [R] </td>
|
@@ -167,22 +180,23 @@ NOTE that if there are fields named "xxx" and
|
|
167
180
|
<div id="methods">
|
168
181
|
<h3 class="section-bar">Public Class methods</h3>
|
169
182
|
|
170
|
-
<div id="method-
|
171
|
-
<a name="
|
183
|
+
<div id="method-M000384" class="method-detail">
|
184
|
+
<a name="M000384"></a>
|
172
185
|
|
173
186
|
<div class="method-heading">
|
174
|
-
<a href="#
|
187
|
+
<a href="#M000384" class="method-signature">
|
175
188
|
<span class="method-name">new</span><span class="method-args">(app_path, path, headers, fields, cookies)</span>
|
176
189
|
</a>
|
177
190
|
</div>
|
178
191
|
|
179
192
|
<div class="method-description">
|
180
193
|
<p><a class="source-toggle" href="#"
|
181
|
-
onclick="toggleCode('
|
182
|
-
<div class="method-source-code" id="
|
194
|
+
onclick="toggleCode('M000384-source');return false;">[Source]</a></p>
|
195
|
+
<div class="method-source-code" id="M000384-source">
|
183
196
|
<pre>
|
184
|
-
<span class="ruby-comment cmt"># File lib/wee/request.rb, line
|
197
|
+
<span class="ruby-comment cmt"># File lib/wee/request.rb, line 17</span>
|
185
198
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">app_path</span>, <span class="ruby-identifier">path</span>, <span class="ruby-identifier">headers</span>, <span class="ruby-identifier">fields</span>, <span class="ruby-identifier">cookies</span>)
|
199
|
+
<span class="ruby-identifier">raise</span> <span class="ruby-constant">ArgumentError</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">app_path</span>[<span class="ruby-value">-1</span>] <span class="ruby-operator">==</span> <span class="ruby-value">?/</span>
|
186
200
|
<span class="ruby-ivar">@app_path</span>, <span class="ruby-ivar">@path</span>, <span class="ruby-ivar">@headers</span>, <span class="ruby-ivar">@cookies</span> = <span class="ruby-identifier">app_path</span>, <span class="ruby-identifier">path</span>, <span class="ruby-identifier">headers</span>, <span class="ruby-identifier">cookies</span>
|
187
201
|
<span class="ruby-identifier">parse_fields</span>(<span class="ruby-identifier">fields</span>)
|
188
202
|
<span class="ruby-identifier">parse_path</span>
|
@@ -194,21 +208,47 @@ NOTE that if there are fields named "xxx" and
|
|
194
208
|
|
195
209
|
<h3 class="section-bar">Public Instance methods</h3>
|
196
210
|
|
197
|
-
<div id="method-
|
198
|
-
<a name="
|
211
|
+
<div id="method-M000386" class="method-detail">
|
212
|
+
<a name="M000386"></a>
|
213
|
+
|
214
|
+
<div class="method-heading">
|
215
|
+
<a href="#M000386" class="method-signature">
|
216
|
+
<span class="method-name">action?</span><span class="method-args">()</span>
|
217
|
+
</a>
|
218
|
+
</div>
|
219
|
+
|
220
|
+
<div class="method-description">
|
221
|
+
<p>
|
222
|
+
Is this an action request?
|
223
|
+
</p>
|
224
|
+
<p><a class="source-toggle" href="#"
|
225
|
+
onclick="toggleCode('M000386-source');return false;">[Source]</a></p>
|
226
|
+
<div class="method-source-code" id="M000386-source">
|
227
|
+
<pre>
|
228
|
+
<span class="ruby-comment cmt"># File lib/wee/request.rb, line 29</span>
|
229
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">action?</span>
|
230
|
+
<span class="ruby-keyword kw">not</span> <span class="ruby-identifier">render?</span>
|
231
|
+
<span class="ruby-keyword kw">end</span>
|
232
|
+
</pre>
|
233
|
+
</div>
|
234
|
+
</div>
|
235
|
+
</div>
|
236
|
+
|
237
|
+
<div id="method-M000385" class="method-detail">
|
238
|
+
<a name="M000385"></a>
|
199
239
|
|
200
240
|
<div class="method-heading">
|
201
|
-
<a href="#
|
241
|
+
<a href="#M000385" class="method-signature">
|
202
242
|
<span class="method-name">application_path</span><span class="method-args">()</span>
|
203
243
|
</a>
|
204
244
|
</div>
|
205
245
|
|
206
246
|
<div class="method-description">
|
207
247
|
<p><a class="source-toggle" href="#"
|
208
|
-
onclick="toggleCode('
|
209
|
-
<div class="method-source-code" id="
|
248
|
+
onclick="toggleCode('M000385-source');return false;">[Source]</a></p>
|
249
|
+
<div class="method-source-code" id="M000385-source">
|
210
250
|
<pre>
|
211
|
-
<span class="ruby-comment cmt"># File lib/wee/request.rb, line
|
251
|
+
<span class="ruby-comment cmt"># File lib/wee/request.rb, line 24</span>
|
212
252
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">application_path</span>
|
213
253
|
<span class="ruby-ivar">@app_path</span>
|
214
254
|
<span class="ruby-keyword kw">end</span>
|
@@ -217,32 +257,56 @@ NOTE that if there are fields named "xxx" and
|
|
217
257
|
</div>
|
218
258
|
</div>
|
219
259
|
|
220
|
-
<div id="method-
|
221
|
-
<a name="
|
260
|
+
<div id="method-M000388" class="method-detail">
|
261
|
+
<a name="M000388"></a>
|
222
262
|
|
223
263
|
<div class="method-heading">
|
224
|
-
<a href="#
|
225
|
-
<span class="method-name">build_url</span><span class="method-args">(
|
264
|
+
<a href="#M000388" class="method-signature">
|
265
|
+
<span class="method-name">build_url</span><span class="method-args">(hash={})</span>
|
226
266
|
</a>
|
227
267
|
</div>
|
228
268
|
|
229
269
|
<div class="method-description">
|
230
270
|
<p><a class="source-toggle" href="#"
|
231
|
-
onclick="toggleCode('
|
232
|
-
<div class="method-source-code" id="
|
271
|
+
onclick="toggleCode('M000388-source');return false;">[Source]</a></p>
|
272
|
+
<div class="method-source-code" id="M000388-source">
|
233
273
|
<pre>
|
234
|
-
<span class="ruby-comment cmt"># File lib/wee/request.rb, line
|
235
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">build_url</span>(<span class="ruby-identifier">
|
274
|
+
<span class="ruby-comment cmt"># File lib/wee/request.rb, line 38</span>
|
275
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">build_url</span>(<span class="ruby-identifier">hash</span>={})
|
276
|
+
<span class="ruby-identifier">default</span> = {
|
277
|
+
<span class="ruby-identifier">:request_handler_id</span> =<span class="ruby-operator">></span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">request_handler_id</span>,
|
278
|
+
<span class="ruby-identifier">:page_id</span> =<span class="ruby-operator">></span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">page_id</span>,
|
279
|
+
<span class="ruby-identifier">:info</span> =<span class="ruby-operator">></span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">info</span>
|
280
|
+
}
|
281
|
+
<span class="ruby-identifier">hash</span> = <span class="ruby-identifier">default</span>.<span class="ruby-identifier">update</span>(<span class="ruby-identifier">hash</span>)
|
282
|
+
|
283
|
+
<span class="ruby-identifier">request_handler_id</span> = <span class="ruby-identifier">hash</span>[<span class="ruby-identifier">:request_handler_id</span>]
|
284
|
+
<span class="ruby-identifier">page_id</span> = <span class="ruby-identifier">hash</span>[<span class="ruby-identifier">:page_id</span>]
|
285
|
+
<span class="ruby-identifier">callback_id</span> = <span class="ruby-identifier">hash</span>[<span class="ruby-identifier">:callback_id</span>]
|
286
|
+
<span class="ruby-identifier">info</span> = <span class="ruby-identifier">hash</span>[<span class="ruby-identifier">:info</span>]
|
287
|
+
|
236
288
|
<span class="ruby-identifier">raise</span> <span class="ruby-constant">ArgumentError</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">request_handler_id</span>.<span class="ruby-identifier">nil?</span> <span class="ruby-keyword kw">and</span> <span class="ruby-keyword kw">not</span> <span class="ruby-identifier">page_id</span>.<span class="ruby-identifier">nil?</span>
|
289
|
+
<span class="ruby-keyword kw">if</span> <span class="ruby-keyword kw">not</span> <span class="ruby-identifier">pageless?</span>
|
290
|
+
<span class="ruby-identifier">raise</span> <span class="ruby-constant">ArgumentError</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">page_id</span>.<span class="ruby-identifier">nil?</span> <span class="ruby-keyword kw">and</span> <span class="ruby-keyword kw">not</span> <span class="ruby-identifier">callback_id</span>.<span class="ruby-identifier">nil?</span>
|
291
|
+
<span class="ruby-keyword kw">end</span>
|
237
292
|
|
238
|
-
<span class="ruby-
|
293
|
+
<span class="ruby-comment cmt"># build request path, e.g. /___/req-id/page-id</span>
|
294
|
+
<span class="ruby-identifier">req_path</span> = <span class="ruby-identifier">make_request_path</span>(<span class="ruby-identifier">request_handler_id</span>, <span class="ruby-identifier">page_id</span>)
|
239
295
|
|
240
|
-
<span class="ruby-
|
296
|
+
<span class="ruby-comment cmt"># build the whole url</span>
|
297
|
+
<span class="ruby-identifier">url</span> = <span class="ruby-value str">""</span>
|
241
298
|
<span class="ruby-identifier">url</span> <span class="ruby-operator"><<</span> <span class="ruby-ivar">@app_path</span>
|
242
|
-
|
243
|
-
|
244
|
-
|
299
|
+
|
300
|
+
<span class="ruby-identifier">raise</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">url</span>[<span class="ruby-value">-1</span>] <span class="ruby-operator">==</span> <span class="ruby-value">?/</span> <span class="ruby-comment cmt"># sanity check</span>
|
301
|
+
|
302
|
+
<span class="ruby-keyword kw">if</span> <span class="ruby-identifier">info</span>
|
303
|
+
<span class="ruby-identifier">url</span> <span class="ruby-operator"><<</span> <span class="ruby-value str">'/'</span>
|
304
|
+
<span class="ruby-identifier">url</span> <span class="ruby-operator"><<</span> <span class="ruby-identifier">info</span>
|
245
305
|
<span class="ruby-keyword kw">end</span>
|
306
|
+
<span class="ruby-identifier">url</span> <span class="ruby-operator"><<</span> <span class="ruby-identifier">req_path</span>
|
307
|
+
|
308
|
+
<span class="ruby-identifier">url</span> <span class="ruby-operator"><<</span> <span class="ruby-value str">'/'</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">info</span>.<span class="ruby-identifier">nil?</span> <span class="ruby-keyword kw">and</span> <span class="ruby-identifier">req_path</span>.<span class="ruby-identifier">empty?</span>
|
309
|
+
|
246
310
|
<span class="ruby-identifier">url</span> <span class="ruby-operator"><<</span> (<span class="ruby-value str">'?'</span> <span class="ruby-operator">+</span> <span class="ruby-identifier">callback_id</span>) <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">callback_id</span>
|
247
311
|
|
248
312
|
<span class="ruby-keyword kw">return</span> <span class="ruby-identifier">url</span>
|
@@ -252,23 +316,101 @@ NOTE that if there are fields named "xxx" and
|
|
252
316
|
</div>
|
253
317
|
</div>
|
254
318
|
|
319
|
+
<div id="method-M000387" class="method-detail">
|
320
|
+
<a name="M000387"></a>
|
321
|
+
|
322
|
+
<div class="method-heading">
|
323
|
+
<a href="#M000387" class="method-signature">
|
324
|
+
<span class="method-name">render?</span><span class="method-args">()</span>
|
325
|
+
</a>
|
326
|
+
</div>
|
327
|
+
|
328
|
+
<div class="method-description">
|
329
|
+
<p>
|
330
|
+
Is this a render request?
|
331
|
+
</p>
|
332
|
+
<p><a class="source-toggle" href="#"
|
333
|
+
onclick="toggleCode('M000387-source');return false;">[Source]</a></p>
|
334
|
+
<div class="method-source-code" id="M000387-source">
|
335
|
+
<pre>
|
336
|
+
<span class="ruby-comment cmt"># File lib/wee/request.rb, line 34</span>
|
337
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">render?</span>
|
338
|
+
<span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">fields</span>.<span class="ruby-identifier">empty?</span>
|
339
|
+
<span class="ruby-keyword kw">end</span>
|
340
|
+
</pre>
|
341
|
+
</div>
|
342
|
+
</div>
|
343
|
+
</div>
|
344
|
+
|
255
345
|
<h3 class="section-bar">Private Instance methods</h3>
|
256
346
|
|
257
|
-
<div id="method-
|
258
|
-
<a name="
|
347
|
+
<div id="method-M000390" class="method-detail">
|
348
|
+
<a name="M000390"></a>
|
259
349
|
|
260
350
|
<div class="method-heading">
|
261
|
-
<a href="#
|
351
|
+
<a href="#M000390" class="method-signature">
|
352
|
+
<span class="method-name">make_request_path</span><span class="method-args">(request_handler_id, page_id)</span>
|
353
|
+
</a>
|
354
|
+
</div>
|
355
|
+
|
356
|
+
<div class="method-description">
|
357
|
+
<p><a class="source-toggle" href="#"
|
358
|
+
onclick="toggleCode('M000390-source');return false;">[Source]</a></p>
|
359
|
+
<div class="method-source-code" id="M000390-source">
|
360
|
+
<pre>
|
361
|
+
<span class="ruby-comment cmt"># File lib/wee/request.rb, line 84</span>
|
362
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">make_request_path</span>(<span class="ruby-identifier">request_handler_id</span>, <span class="ruby-identifier">page_id</span>)
|
363
|
+
<span class="ruby-identifier">arr</span> = [<span class="ruby-identifier">request_handler_id</span>, <span class="ruby-identifier">page_id</span>].<span class="ruby-identifier">compact</span>
|
364
|
+
<span class="ruby-identifier">req_path</span> =
|
365
|
+
<span class="ruby-keyword kw">if</span> <span class="ruby-identifier">arr</span>.<span class="ruby-identifier">empty?</span>
|
366
|
+
<span class="ruby-value str">""</span>
|
367
|
+
<span class="ruby-keyword kw">else</span>
|
368
|
+
<span class="ruby-constant">DELIM</span> <span class="ruby-operator">+</span> <span class="ruby-identifier">arr</span>.<span class="ruby-identifier">join</span>(<span class="ruby-value str">'/'</span>)
|
369
|
+
<span class="ruby-keyword kw">end</span>
|
370
|
+
<span class="ruby-keyword kw">end</span>
|
371
|
+
</pre>
|
372
|
+
</div>
|
373
|
+
</div>
|
374
|
+
</div>
|
375
|
+
|
376
|
+
<div id="method-M000389" class="method-detail">
|
377
|
+
<a name="M000389"></a>
|
378
|
+
|
379
|
+
<div class="method-heading">
|
380
|
+
<a href="#M000389" class="method-signature">
|
381
|
+
<span class="method-name">pageless?</span><span class="method-args">()</span>
|
382
|
+
</a>
|
383
|
+
</div>
|
384
|
+
|
385
|
+
<div class="method-description">
|
386
|
+
<p><a class="source-toggle" href="#"
|
387
|
+
onclick="toggleCode('M000389-source');return false;">[Source]</a></p>
|
388
|
+
<div class="method-source-code" id="M000389-source">
|
389
|
+
<pre>
|
390
|
+
<span class="ruby-comment cmt"># File lib/wee/request.rb, line 80</span>
|
391
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">pageless?</span>
|
392
|
+
<span class="ruby-keyword kw">false</span>
|
393
|
+
<span class="ruby-keyword kw">end</span>
|
394
|
+
</pre>
|
395
|
+
</div>
|
396
|
+
</div>
|
397
|
+
</div>
|
398
|
+
|
399
|
+
<div id="method-M000391" class="method-detail">
|
400
|
+
<a name="M000391"></a>
|
401
|
+
|
402
|
+
<div class="method-heading">
|
403
|
+
<a href="#M000391" class="method-signature">
|
262
404
|
<span class="method-name">parse_fields</span><span class="method-args">(fields)</span>
|
263
405
|
</a>
|
264
406
|
</div>
|
265
407
|
|
266
408
|
<div class="method-description">
|
267
409
|
<p><a class="source-toggle" href="#"
|
268
|
-
onclick="toggleCode('
|
269
|
-
<div class="method-source-code" id="
|
410
|
+
onclick="toggleCode('M000391-source');return false;">[Source]</a></p>
|
411
|
+
<div class="method-source-code" id="M000391-source">
|
270
412
|
<pre>
|
271
|
-
<span class="ruby-comment cmt"># File lib/wee/request.rb, line
|
413
|
+
<span class="ruby-comment cmt"># File lib/wee/request.rb, line 94</span>
|
272
414
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">parse_fields</span>(<span class="ruby-identifier">fields</span>)
|
273
415
|
<span class="ruby-identifier">fields</span> <span class="ruby-operator">||=</span> <span class="ruby-constant">Hash</span>.<span class="ruby-identifier">new</span>
|
274
416
|
<span class="ruby-ivar">@fields</span> = <span class="ruby-constant">Hash</span>.<span class="ruby-identifier">new</span>
|
@@ -294,23 +436,32 @@ NOTE that if there are fields named "xxx" and
|
|
294
436
|
</div>
|
295
437
|
</div>
|
296
438
|
|
297
|
-
<div id="method-
|
298
|
-
<a name="
|
439
|
+
<div id="method-M000392" class="method-detail">
|
440
|
+
<a name="M000392"></a>
|
299
441
|
|
300
442
|
<div class="method-heading">
|
301
|
-
<a href="#
|
443
|
+
<a href="#M000392" class="method-signature">
|
302
444
|
<span class="method-name">parse_path</span><span class="method-args">()</span>
|
303
445
|
</a>
|
304
446
|
</div>
|
305
447
|
|
306
448
|
<div class="method-description">
|
307
449
|
<p><a class="source-toggle" href="#"
|
308
|
-
onclick="toggleCode('
|
309
|
-
<div class="method-source-code" id="
|
450
|
+
onclick="toggleCode('M000392-source');return false;">[Source]</a></p>
|
451
|
+
<div class="method-source-code" id="M000392-source">
|
310
452
|
<pre>
|
311
|
-
<span class="ruby-comment cmt"># File lib/wee/request.rb, line
|
453
|
+
<span class="ruby-comment cmt"># File lib/wee/request.rb, line 115</span>
|
312
454
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">parse_path</span>
|
313
455
|
<span class="ruby-identifier">full_app_path</span>, <span class="ruby-identifier">req_path</span> = <span class="ruby-ivar">@path</span>.<span class="ruby-identifier">split</span>(<span class="ruby-constant">DELIM</span>, <span class="ruby-value">2</span>)
|
456
|
+
|
457
|
+
<span class="ruby-keyword kw">if</span> <span class="ruby-identifier">full_app_path</span> <span class="ruby-operator">==</span> <span class="ruby-ivar">@app_path</span>
|
458
|
+
<span class="ruby-ivar">@info</span> = <span class="ruby-keyword kw">nil</span>
|
459
|
+
<span class="ruby-keyword kw">elsif</span> <span class="ruby-identifier">full_app_path</span>[<span class="ruby-value">0</span>, <span class="ruby-ivar">@app_path</span>.<span class="ruby-identifier">size</span>] <span class="ruby-operator">==</span> <span class="ruby-ivar">@app_path</span> <span class="ruby-keyword kw">and</span> <span class="ruby-identifier">full_app_path</span>[<span class="ruby-ivar">@app_path</span>.<span class="ruby-identifier">size</span>] <span class="ruby-operator">==</span> <span class="ruby-value">?/</span>
|
460
|
+
<span class="ruby-ivar">@info</span> = <span class="ruby-identifier">full_app_path</span>[<span class="ruby-ivar">@app_path</span>.<span class="ruby-identifier">size</span><span class="ruby-operator">+</span><span class="ruby-value">1</span><span class="ruby-operator">..</span><span class="ruby-value">-1</span>]
|
461
|
+
<span class="ruby-keyword kw">else</span>
|
462
|
+
<span class="ruby-identifier">raise</span> <span class="ruby-value str">"dispatched to wrong handler"</span>
|
463
|
+
<span class="ruby-keyword kw">end</span>
|
464
|
+
|
314
465
|
<span class="ruby-ivar">@request_handler_id</span> = <span class="ruby-ivar">@page_id</span> = <span class="ruby-keyword kw">nil</span>
|
315
466
|
<span class="ruby-ivar">@request_handler_id</span>, <span class="ruby-ivar">@page_id</span> = <span class="ruby-identifier">req_path</span>.<span class="ruby-identifier">split</span>(<span class="ruby-value str">'/'</span>, <span class="ruby-value">2</span>) <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">req_path</span>
|
316
467
|
<span class="ruby-keyword kw">end</span>
|