rack-blogengine 1.0.8 → 1.0.9

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,413 +0,0 @@
1
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
2
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3
- <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
4
- <head>
5
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
6
- <title>
7
- Module: Rack::Blogengine::ApplicationRouter
8
-
9
- &mdash; Documentation by YARD 0.8.7.4
10
-
11
- </title>
12
-
13
- <link rel="stylesheet" href="../../css/style.css" type="text/css" charset="utf-8" />
14
-
15
- <link rel="stylesheet" href="../../css/common.css" type="text/css" charset="utf-8" />
16
-
17
- <script type="text/javascript" charset="utf-8">
18
- hasFrames = window.top.frames.main ? true : false;
19
- relpath = '../../';
20
- framesUrl = "../../frames.html#!Rack/Blogengine/ApplicationRouter.html";
21
- </script>
22
-
23
-
24
- <script type="text/javascript" charset="utf-8" src="../../js/jquery.js"></script>
25
-
26
- <script type="text/javascript" charset="utf-8" src="../../js/app.js"></script>
27
-
28
-
29
- </head>
30
- <body>
31
- <div id="header">
32
- <div id="menu">
33
-
34
- <a href="../../_index.html">Index (A)</a> &raquo;
35
- <span class='title'><span class='object_link'><a href="../../Rack.html" title="Rack (module)">Rack</a></span></span> &raquo; <span class='title'><span class='object_link'><a href="../Blogengine.html" title="Rack::Blogengine (module)">Blogengine</a></span></span>
36
- &raquo;
37
- <span class="title">ApplicationRouter</span>
38
-
39
-
40
- <div class="noframes"><span class="title">(</span><a href="." target="_top">no frames</a><span class="title">)</span></div>
41
- </div>
42
-
43
- <div id="search">
44
-
45
- <a class="full_list_link" id="class_list_link"
46
- href="../../class_list.html">
47
- Class List
48
- </a>
49
-
50
- <a class="full_list_link" id="method_list_link"
51
- href="../../method_list.html">
52
- Method List
53
- </a>
54
-
55
- <a class="full_list_link" id="file_list_link"
56
- href="../../file_list.html">
57
- File List
58
- </a>
59
-
60
- </div>
61
- <div class="clear"></div>
62
- </div>
63
-
64
- <iframe id="search_frame"></iframe>
65
-
66
- <div id="content"><h1>Module: Rack::Blogengine::ApplicationRouter
67
-
68
-
69
-
70
- </h1>
71
-
72
- <dl class="box">
73
-
74
-
75
-
76
-
77
-
78
-
79
-
80
-
81
- <dt class="r1 last">Defined in:</dt>
82
- <dd class="r1 last">lib/rack/blogengine/application_router.rb</dd>
83
-
84
- </dl>
85
- <div class="clear"></div>
86
-
87
- <h2>Overview</h2><div class="docstring">
88
- <div class="discussion">
89
-
90
- <p>ApplicationRouter routes the request to the proper, parsed .content
91
- (layout.html + .content) file</p>
92
-
93
-
94
- </div>
95
- </div>
96
- <div class="tags">
97
-
98
- <p class="tag_title">Author:</p>
99
- <ul class="author">
100
-
101
- <li>
102
-
103
-
104
-
105
-
106
-
107
- <div class='inline'><dl class="rdoc-list label-list"><dt>benny
108
- <dd></dd></dl>
109
- </div>
110
-
111
- </li>
112
-
113
- </ul>
114
-
115
- </div>
116
-
117
-
118
-
119
-
120
-
121
-
122
-
123
- <h2>
124
- Class Method Summary
125
- <small>(<a href="#" class="summary_toggle">collapse</a>)</small>
126
- </h2>
127
-
128
- <ul class="summary">
129
-
130
- <li class="private ">
131
- <span class="summary_signature">
132
-
133
- <a href="#errorpage-class_method" title="errorpage (class method)">+ (Object) <strong>errorpage</strong>(request, documents) </a>
134
-
135
-
136
-
137
- </span>
138
-
139
-
140
-
141
- <span class="note title private">private</span>
142
-
143
-
144
-
145
-
146
-
147
- <span class="summary_desc"><div class='inline'>
148
- <p>Returns the errorpage.</p>
149
- </div></span>
150
-
151
- </li>
152
-
153
-
154
- <li class="public ">
155
- <span class="summary_signature">
156
-
157
- <a href="#map_route-class_method" title="map_route (class method)">+ (Hash) <strong>map_route</strong>(request, documents) </a>
158
-
159
-
160
-
161
- </span>
162
-
163
-
164
-
165
-
166
-
167
-
168
-
169
-
170
-
171
- <span class="summary_desc"><div class='inline'>
172
- <p>Maps documents to routes.</p>
173
- </div></span>
174
-
175
- </li>
176
-
177
-
178
- </ul>
179
-
180
-
181
-
182
-
183
- <div id="class_method_details" class="method_details_list">
184
- <h2>Class Method Details</h2>
185
-
186
-
187
- <div class="method_details first">
188
- <h3 class="signature first" id="errorpage-class_method">
189
-
190
- + (<tt>Object</tt>) <strong>errorpage</strong>(request, documents) <span class="extras">(private)</span>
191
-
192
-
193
-
194
-
195
-
196
- </h3><div class="docstring">
197
- <div class="discussion">
198
-
199
- <p>Returns the errorpage</p>
200
-
201
-
202
- </div>
203
- </div>
204
- <div class="tags">
205
- <p class="tag_title">Parameters:</p>
206
- <ul class="param">
207
-
208
- <li>
209
-
210
- <span class='name'>request</span>
211
-
212
-
213
- <span class='type'>(<tt>Rack::Request</tt>)</span>
214
-
215
-
216
-
217
- &mdash;
218
- <div class='inline'><dl class="rdoc-list label-list"><dt>current Request
219
- <dd></dd></dl>
220
- </div>
221
-
222
- </li>
223
-
224
- <li>
225
-
226
- <span class='name'>documents</span>
227
-
228
-
229
- <span class='type'>(<tt>Array</tt>)</span>
230
-
231
-
232
-
233
- &mdash;
234
- <div class='inline'><dl class="rdoc-list label-list"><dt>parsed in Documents
235
- <dd></dd></dl>
236
- </div>
237
-
238
- </li>
239
-
240
- </ul>
241
-
242
-
243
- </div><table class="source_code">
244
- <tr>
245
- <td>
246
- <pre class="lines">
247
-
248
-
249
- 39
250
- 40
251
- 41
252
- 42
253
- 43
254
- 44</pre>
255
- </td>
256
- <td>
257
- <pre class="code"><span class="info file"># File 'lib/rack/blogengine/application_router.rb', line 39</span>
258
-
259
- <span class='kw'>def</span> <span class='id identifier rubyid_errorpage'>errorpage</span><span class='lparen'>(</span><span class='id identifier rubyid_request'>request</span><span class='comma'>,</span> <span class='id identifier rubyid_documents'>documents</span><span class='rparen'>)</span>
260
- <span class='id identifier rubyid_header'>header</span> <span class='op'>=</span> <span class='lbrace'>{</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>Content-Type</span><span class='tstring_end'>&#39;</span></span> <span class='op'>=&gt;</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>text/html; charset=UTF-8</span><span class='tstring_end'>&#39;</span></span> <span class='rbrace'>}</span>
261
- <span class='id identifier rubyid_response'>response</span> <span class='op'>=</span> <span class='const'>Rack</span><span class='op'>::</span><span class='const'>Response</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>Page not found</span><span class='tstring_end'>&#39;</span></span><span class='comma'>,</span> <span class='int'>404</span><span class='comma'>,</span> <span class='id identifier rubyid_header'>header</span><span class='rparen'>)</span>
262
-
263
- <span class='lbrace'>{</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>path</span><span class='tstring_end'>&#39;</span></span> <span class='op'>=&gt;</span> <span class='id identifier rubyid_request'>request</span><span class='period'>.</span><span class='id identifier rubyid_path'>path</span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>response</span><span class='tstring_end'>&#39;</span></span> <span class='op'>=&gt;</span> <span class='id identifier rubyid_response'>response</span> <span class='rbrace'>}</span>
264
- <span class='kw'>end</span></pre>
265
- </td>
266
- </tr>
267
- </table>
268
- </div>
269
-
270
- <div class="method_details ">
271
- <h3 class="signature " id="map_route-class_method">
272
-
273
- + (<tt>Hash</tt>) <strong>map_route</strong>(request, documents)
274
-
275
-
276
-
277
-
278
-
279
- </h3><div class="docstring">
280
- <div class="discussion">
281
-
282
- <p>Maps documents to routes.</p>
283
-
284
-
285
- </div>
286
- </div>
287
- <div class="tags">
288
- <p class="tag_title">Parameters:</p>
289
- <ul class="param">
290
-
291
- <li>
292
-
293
- <span class='name'>request</span>
294
-
295
-
296
- <span class='type'>(<tt>Rack::Request</tt>)</span>
297
-
298
-
299
-
300
- &mdash;
301
- <div class='inline'><dl class="rdoc-list label-list"><dt>Current Request Object
302
- <dd></dd></dl>
303
- </div>
304
-
305
- </li>
306
-
307
- <li>
308
-
309
- <span class='name'>documents</span>
310
-
311
-
312
- <span class='type'>(<tt>Array</tt>)</span>
313
-
314
-
315
-
316
- &mdash;
317
- <div class='inline'><dl class="rdoc-list label-list"><dt>parsed in Documents
318
- <dd></dd></dl>
319
- </div>
320
-
321
- </li>
322
-
323
- </ul>
324
-
325
- <p class="tag_title">Returns:</p>
326
- <ul class="return">
327
-
328
- <li>
329
-
330
-
331
- <span class='type'>(<tt>Hash</tt>)</span>
332
-
333
-
334
-
335
- &mdash;
336
- <div class='inline'>
337
- <p>request [route Hash =&gt; [String], &#39;response&#39;
338
- =&gt; [Rack::Response]]</p>
339
- </div>
340
-
341
- </li>
342
-
343
- </ul>
344
-
345
- </div><table class="source_code">
346
- <tr>
347
- <td>
348
- <pre class="lines">
349
-
350
-
351
- 14
352
- 15
353
- 16
354
- 17
355
- 18
356
- 19
357
- 20
358
- 21
359
- 22
360
- 23
361
- 24
362
- 25
363
- 26
364
- 27
365
- 28
366
- 29
367
- 30
368
- 31
369
- 32
370
- 33
371
- 34</pre>
372
- </td>
373
- <td>
374
- <pre class="code"><span class="info file"># File 'lib/rack/blogengine/application_router.rb', line 14</span>
375
-
376
- <span class='kw'>def</span> <span class='id identifier rubyid_map_route'>map_route</span><span class='lparen'>(</span><span class='id identifier rubyid_request'>request</span><span class='comma'>,</span> <span class='id identifier rubyid_documents'>documents</span><span class='rparen'>)</span>
377
- <span class='id identifier rubyid_header'>header</span> <span class='op'>=</span> <span class='lbrace'>{</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>Content-Type</span><span class='tstring_end'>&#39;</span></span> <span class='op'>=&gt;</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>text/html; charset=UTF-8</span><span class='tstring_end'>&#39;</span></span> <span class='rbrace'>}</span>
378
-
379
- <span class='comment'># Iterate through available docs, if nothing matched return nil
380
- </span> <span class='id identifier rubyid_documents'>documents</span><span class='period'>.</span><span class='id identifier rubyid_each'>each</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_doc'>doc</span><span class='op'>|</span>
381
- <span class='kw'>if</span> <span class='id identifier rubyid_doc'>doc</span><span class='lbracket'>[</span><span class='symbol'>:path</span><span class='rbracket'>]</span> <span class='op'>==</span> <span class='id identifier rubyid_request'>request</span><span class='period'>.</span><span class='id identifier rubyid_path'>path</span>
382
- <span class='id identifier rubyid_response'>response</span> <span class='op'>=</span> <span class='const'>Rack</span><span class='op'>::</span><span class='const'>Response</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='id identifier rubyid_doc'>doc</span><span class='lbracket'>[</span><span class='symbol'>:html</span><span class='rbracket'>]</span><span class='comma'>,</span> <span class='int'>200</span><span class='comma'>,</span> <span class='id identifier rubyid_header'>header</span><span class='rparen'>)</span>
383
-
384
- <span class='id identifier rubyid_route_response'>route_response</span> <span class='op'>=</span> <span class='lbrace'>{</span>
385
- <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>path</span><span class='tstring_end'>&#39;</span></span> <span class='op'>=&gt;</span> <span class='id identifier rubyid_request'>request</span><span class='period'>.</span><span class='id identifier rubyid_path'>path</span><span class='comma'>,</span>
386
- <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>response</span><span class='tstring_end'>&#39;</span></span> <span class='op'>=&gt;</span> <span class='id identifier rubyid_response'>response</span>
387
- <span class='comment'># &#39;response&#39; =&gt; [200, header, [doc[:html]]]
388
- </span> <span class='rbrace'>}</span>
389
-
390
- <span class='kw'>return</span> <span class='id identifier rubyid_route_response'>route_response</span>
391
- <span class='kw'>end</span>
392
- <span class='kw'>end</span>
393
-
394
- <span class='comment'># if no document matches -&gt; return error page
395
- </span> <span class='id identifier rubyid_errorpage'>errorpage</span><span class='lparen'>(</span><span class='id identifier rubyid_request'>request</span><span class='comma'>,</span> <span class='id identifier rubyid_documents'>documents</span><span class='rparen'>)</span>
396
- <span class='kw'>end</span></pre>
397
- </td>
398
- </tr>
399
- </table>
400
- </div>
401
-
402
- </div>
403
-
404
- </div>
405
-
406
- <div id="footer">
407
- Generated on Mon Apr 21 22:58:51 2014 by
408
- <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
409
- 0.8.7.4 (ruby-2.1.1).
410
- </div>
411
-
412
- </body>
413
- </html>