renee 0.3.11 → 0.4.0.pre1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (231) hide show
  1. data/Gemfile +17 -0
  2. data/Gemfile-renee +8 -0
  3. data/Gemfile-renee-core +8 -0
  4. data/Gemfile-renee-render +9 -0
  5. data/Gemfile-renee-session +9 -0
  6. data/Gemfile-renee-url-generation +8 -0
  7. data/MIT-LICENSE.txt +7 -0
  8. data/README-renee-core.md +242 -0
  9. data/README-renee-render.md +38 -0
  10. data/README-renee-session.md +3 -0
  11. data/README-renee-url-generation.md +3 -0
  12. data/README.md +131 -6
  13. data/Rakefile +109 -9
  14. data/TODO.txt +45 -0
  15. data/config.ru +26 -0
  16. data/examples/blog/blog.rb +3 -1
  17. data/examples/blog/config.ru +24 -19
  18. data/examples/blog/views/edit.erb +10 -1
  19. data/examples/blog/views/show.erb +5 -0
  20. data/lib/renee.rb +11 -4
  21. data/lib/renee/core.rb +98 -0
  22. data/lib/renee/core/chaining.rb +66 -0
  23. data/lib/renee/core/env_accessors.rb +72 -0
  24. data/lib/renee/core/exceptions.rb +15 -0
  25. data/lib/renee/core/matcher.rb +61 -0
  26. data/lib/renee/core/plugins.rb +31 -0
  27. data/lib/renee/core/rack_interaction.rb +50 -0
  28. data/lib/renee/core/request_context.rb +56 -0
  29. data/lib/renee/core/responding.rb +112 -0
  30. data/lib/renee/core/response.rb +78 -0
  31. data/lib/renee/core/routing.rb +319 -0
  32. data/lib/renee/core/transform.rb +18 -0
  33. data/lib/renee/render.rb +221 -0
  34. data/lib/renee/session.rb +50 -0
  35. data/lib/renee/url_generation.rb +117 -0
  36. data/lib/renee/util.rb +7 -0
  37. data/lib/renee/version.rb +2 -4
  38. data/plan.txt +19 -0
  39. data/renee-core.gemspec +26 -0
  40. data/renee-render.gemspec +30 -0
  41. data/renee-session.gemspec +28 -0
  42. data/renee-url-generation.gemspec +24 -0
  43. data/renee.gemspec +5 -6
  44. data/site/MIT-LICENSE.txt +7 -0
  45. data/site/public/css/app.css +75 -0
  46. data/site/public/docs/renee-core/Renee.html +208 -0
  47. data/site/public/docs/renee-core/Renee/Core.html +366 -0
  48. data/site/public/docs/renee-core/Renee/Core/Chaining.html +192 -0
  49. data/site/public/docs/renee-core/Renee/Core/ClassMethods.html +725 -0
  50. data/site/public/docs/renee-core/Renee/Core/ClientError.html +317 -0
  51. data/site/public/docs/renee-core/Renee/Core/EnvAccessors.html +152 -0
  52. data/site/public/docs/renee-core/Renee/Core/EnvAccessors/ClassMethods.html +354 -0
  53. data/site/public/docs/renee-core/Renee/Core/Matcher.html +675 -0
  54. data/site/public/docs/renee-core/Renee/Core/Plugins.html +475 -0
  55. data/site/public/docs/renee-core/Renee/Core/RackInteraction.html +488 -0
  56. data/site/public/docs/renee-core/Renee/Core/RequestContext.html +511 -0
  57. data/site/public/docs/renee-core/Renee/Core/Responding.html +877 -0
  58. data/site/public/docs/renee-core/Renee/Core/Response.html +691 -0
  59. data/site/public/docs/renee-core/Renee/Core/Routing.html +1589 -0
  60. data/site/public/docs/renee-core/Renee/Core/Transform.html +249 -0
  61. data/site/public/docs/renee-core/Renee/Core/URLGeneration.html +597 -0
  62. data/site/public/docs/renee-core/_index.html +244 -0
  63. data/site/public/docs/renee-core/class_list.html +47 -0
  64. data/site/public/docs/renee-core/css/common.css +1 -0
  65. data/site/public/docs/renee-core/css/full_list.css +55 -0
  66. data/site/public/docs/renee-core/css/style.css +322 -0
  67. data/site/public/docs/renee-core/file.README-renee-core.html +341 -0
  68. data/site/public/docs/renee-core/file.README.html +212 -0
  69. data/site/public/docs/renee-core/file_list.html +49 -0
  70. data/site/public/docs/renee-core/frames.html +13 -0
  71. data/site/public/docs/renee-core/index.html +341 -0
  72. data/site/public/docs/renee-core/js/app.js +205 -0
  73. data/site/public/docs/renee-core/js/full_list.js +167 -0
  74. data/site/public/docs/renee-core/js/jquery.js +16 -0
  75. data/site/public/docs/renee-core/method_list.html +590 -0
  76. data/site/public/docs/renee-core/top-level-namespace.html +103 -0
  77. data/site/public/docs/renee-render/Renee.html +116 -0
  78. data/site/public/docs/renee-render/Renee/Core.html +346 -0
  79. data/site/public/docs/renee-render/Renee/Core/Chaining.html +125 -0
  80. data/site/public/docs/renee-render/Renee/Core/ClassMethods.html +620 -0
  81. data/site/public/docs/renee-render/Renee/Core/ClientError.html +317 -0
  82. data/site/public/docs/renee-render/Renee/Core/EnvAccessors.html +152 -0
  83. data/site/public/docs/renee-render/Renee/Core/EnvAccessors/ClassMethods.html +354 -0
  84. data/site/public/docs/renee-render/Renee/Core/Matcher.html +675 -0
  85. data/site/public/docs/renee-render/Renee/Core/RackInteraction.html +488 -0
  86. data/site/public/docs/renee-render/Renee/Core/RequestContext.html +421 -0
  87. data/site/public/docs/renee-render/Renee/Core/Responding.html +873 -0
  88. data/site/public/docs/renee-render/Renee/Core/Response.html +691 -0
  89. data/site/public/docs/renee-render/Renee/Core/Routing.html +1682 -0
  90. data/site/public/docs/renee-render/Renee/Core/Transform.html +249 -0
  91. data/site/public/docs/renee-render/Renee/Core/URLGeneration.html +597 -0
  92. data/site/public/docs/renee-render/Renee/Render.html +873 -0
  93. data/site/public/docs/renee-render/Renee/Render/ClassMethods.html +382 -0
  94. data/site/public/docs/renee-render/Renee/Render/TemplateNotFound.html +126 -0
  95. data/site/public/docs/renee-render/_index.html +143 -0
  96. data/site/public/docs/renee-render/class_list.html +47 -0
  97. data/site/public/docs/renee-render/css/common.css +1 -0
  98. data/site/public/docs/renee-render/css/full_list.css +55 -0
  99. data/site/public/docs/renee-render/css/style.css +322 -0
  100. data/site/public/docs/renee-render/file.README-renee-render.html +104 -0
  101. data/site/public/docs/renee-render/file.README.html +212 -0
  102. data/site/public/docs/renee-render/file_list.html +49 -0
  103. data/site/public/docs/renee-render/frames.html +13 -0
  104. data/site/public/docs/renee-render/index.html +104 -0
  105. data/site/public/docs/renee-render/js/app.js +205 -0
  106. data/site/public/docs/renee-render/js/full_list.js +167 -0
  107. data/site/public/docs/renee-render/js/jquery.js +16 -0
  108. data/site/public/docs/renee-render/method_list.html +110 -0
  109. data/site/public/docs/renee-render/top-level-namespace.html +103 -0
  110. data/site/public/docs/renee-session/Renee.html +106 -0
  111. data/site/public/docs/renee-session/Renee/Session.html +173 -0
  112. data/site/public/docs/renee-session/Renee/Session/ClassMethods.html +470 -0
  113. data/site/public/docs/renee-session/_index.html +136 -0
  114. data/site/public/docs/renee-session/class_list.html +47 -0
  115. data/site/public/docs/renee-session/css/common.css +1 -0
  116. data/site/public/docs/renee-session/css/full_list.css +55 -0
  117. data/site/public/docs/renee-session/css/style.css +322 -0
  118. data/site/public/docs/renee-session/file.README-renee-core.html +341 -0
  119. data/site/public/docs/renee-session/file.README-renee-session.html +69 -0
  120. data/site/public/docs/renee-session/file_list.html +49 -0
  121. data/site/public/docs/renee-session/frames.html +13 -0
  122. data/site/public/docs/renee-session/index.html +69 -0
  123. data/site/public/docs/renee-session/js/app.js +205 -0
  124. data/site/public/docs/renee-session/js/full_list.js +167 -0
  125. data/site/public/docs/renee-session/js/jquery.js +16 -0
  126. data/site/public/docs/renee-session/method_list.html +102 -0
  127. data/site/public/docs/renee-session/top-level-namespace.html +103 -0
  128. data/site/public/docs/renee-url-generation/Renee.html +208 -0
  129. data/site/public/docs/renee-url-generation/Renee/Core.html +366 -0
  130. data/site/public/docs/renee-url-generation/Renee/Core/Chaining.html +192 -0
  131. data/site/public/docs/renee-url-generation/Renee/Core/ClassMethods.html +725 -0
  132. data/site/public/docs/renee-url-generation/Renee/Core/ClientError.html +317 -0
  133. data/site/public/docs/renee-url-generation/Renee/Core/EnvAccessors.html +152 -0
  134. data/site/public/docs/renee-url-generation/Renee/Core/EnvAccessors/ClassMethods.html +354 -0
  135. data/site/public/docs/renee-url-generation/Renee/Core/Matcher.html +675 -0
  136. data/site/public/docs/renee-url-generation/Renee/Core/Plugins.html +475 -0
  137. data/site/public/docs/renee-url-generation/Renee/Core/RackInteraction.html +488 -0
  138. data/site/public/docs/renee-url-generation/Renee/Core/RequestContext.html +511 -0
  139. data/site/public/docs/renee-url-generation/Renee/Core/Responding.html +877 -0
  140. data/site/public/docs/renee-url-generation/Renee/Core/Response.html +691 -0
  141. data/site/public/docs/renee-url-generation/Renee/Core/Routing.html +1589 -0
  142. data/site/public/docs/renee-url-generation/Renee/Core/Transform.html +249 -0
  143. data/site/public/docs/renee-url-generation/_index.html +244 -0
  144. data/site/public/docs/renee-url-generation/class_list.html +47 -0
  145. data/site/public/docs/renee-url-generation/css/common.css +1 -0
  146. data/site/public/docs/renee-url-generation/css/full_list.css +55 -0
  147. data/site/public/docs/renee-url-generation/css/style.css +322 -0
  148. data/site/public/docs/renee-url-generation/file.README-renee-url-generation.html +69 -0
  149. data/site/public/docs/renee-url-generation/file_list.html +49 -0
  150. data/site/public/docs/renee-url-generation/frames.html +13 -0
  151. data/site/public/docs/renee-url-generation/index.html +69 -0
  152. data/site/public/docs/renee-url-generation/js/app.js +205 -0
  153. data/site/public/docs/renee-url-generation/js/full_list.js +167 -0
  154. data/site/public/docs/renee-url-generation/js/jquery.js +16 -0
  155. data/site/public/docs/renee-url-generation/method_list.html +590 -0
  156. data/site/public/docs/renee-url-generation/top-level-namespace.html +103 -0
  157. data/site/public/docs/renee/Renee.html +232 -0
  158. data/site/public/docs/renee/Renee/Application.html +367 -0
  159. data/site/public/docs/renee/Renee/Core.html +370 -0
  160. data/site/public/docs/renee/Renee/Core/Chaining.html +192 -0
  161. data/site/public/docs/renee/Renee/Core/ClassMethods.html +725 -0
  162. data/site/public/docs/renee/Renee/Core/ClientError.html +317 -0
  163. data/site/public/docs/renee/Renee/Core/EnvAccessors.html +152 -0
  164. data/site/public/docs/renee/Renee/Core/EnvAccessors/ClassMethods.html +354 -0
  165. data/site/public/docs/renee/Renee/Core/Matcher.html +675 -0
  166. data/site/public/docs/renee/Renee/Core/Plugins.html +475 -0
  167. data/site/public/docs/renee/Renee/Core/RackInteraction.html +488 -0
  168. data/site/public/docs/renee/Renee/Core/RequestContext.html +511 -0
  169. data/site/public/docs/renee/Renee/Core/Responding.html +877 -0
  170. data/site/public/docs/renee/Renee/Core/Response.html +691 -0
  171. data/site/public/docs/renee/Renee/Core/Routing.html +1589 -0
  172. data/site/public/docs/renee/Renee/Core/Transform.html +249 -0
  173. data/site/public/docs/renee/Renee/Core/URLGeneration.html +597 -0
  174. data/site/public/docs/renee/Renee/Render.html +877 -0
  175. data/site/public/docs/renee/Renee/Render/ClassMethods.html +382 -0
  176. data/site/public/docs/renee/Renee/Render/TemplateNotFound.html +126 -0
  177. data/site/public/docs/renee/Renee/Session.html +177 -0
  178. data/site/public/docs/renee/Renee/Session/ClassMethods.html +470 -0
  179. data/site/public/docs/renee/Renee/URLGeneration.html +142 -0
  180. data/site/public/docs/renee/Renee/URLGeneration/ClassMethods.html +593 -0
  181. data/site/public/docs/renee/Renee/Util.html +163 -0
  182. data/site/public/docs/renee/_index.html +336 -0
  183. data/site/public/docs/renee/class_list.html +47 -0
  184. data/site/public/docs/renee/css/common.css +1 -0
  185. data/site/public/docs/renee/css/full_list.css +55 -0
  186. data/site/public/docs/renee/css/style.css +322 -0
  187. data/site/public/docs/renee/file.README.html +212 -0
  188. data/site/public/docs/renee/file_list.html +49 -0
  189. data/site/public/docs/renee/frames.html +13 -0
  190. data/site/public/docs/renee/index.html +212 -0
  191. data/site/public/docs/renee/js/app.js +205 -0
  192. data/site/public/docs/renee/js/full_list.js +167 -0
  193. data/site/public/docs/renee/js/jquery.js +16 -0
  194. data/site/public/docs/renee/method_list.html +758 -0
  195. data/site/public/docs/renee/top-level-namespace.html +202 -0
  196. data/site/public/img/favicon.ico +0 -0
  197. data/site/public/img/reneeclean.png +0 -0
  198. data/site/public/img/russiangithub.png +0 -0
  199. data/site/public/img/stoneposter.png +0 -0
  200. data/site/public/img/vospit.jpeg +0 -0
  201. data/site/views/chaining.md +32 -0
  202. data/site/views/index.md +219 -0
  203. data/site/views/layouts/app.haml +16 -0
  204. data/site/views/rack-integration.md +51 -0
  205. data/site/views/responding.md +103 -0
  206. data/site/views/route-generation.md +82 -0
  207. data/site/views/routing.md +261 -0
  208. data/site/views/settings.md +19 -0
  209. data/site/views/team-renee.md +13 -0
  210. data/site/views/tutorial.md +57 -0
  211. data/site/views/variable-types.md +57 -0
  212. data/test.watchr +61 -0
  213. data/test/renee-core/chaining_test.rb +33 -0
  214. data/test/renee-core/env_accessors_test.rb +43 -0
  215. data/test/renee-core/include_test.rb +14 -0
  216. data/test/renee-core/request_context_test.rb +70 -0
  217. data/test/renee-core/responding_test.rb +128 -0
  218. data/test/renee-core/routing_test.rb +443 -0
  219. data/test/renee-core/test_helper.rb +4 -0
  220. data/test/renee-core/variable_type_test.rb +57 -0
  221. data/test/renee-render/render_test.rb +162 -0
  222. data/test/renee-render/test_helper.rb +9 -0
  223. data/test/renee-session/session_test.rb +31 -0
  224. data/test/renee-session/test_helper.rb +9 -0
  225. data/test/renee-url-generation/test_helper.rb +10 -0
  226. data/test/renee-url-generation/url_generation_test.rb +63 -0
  227. data/test/{blog_test.rb → renee/blog_test.rb} +10 -5
  228. data/test/renee/test_helper.rb +56 -0
  229. data/test/test_helper.rb +23 -10
  230. metadata +333 -156
  231. data/.yardopts +0 -6
@@ -0,0 +1,1589 @@
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: Renee::Core::Routing
8
+
9
+ &mdash; Documentation by YARD 0.7.4
10
+
11
+ </title>
12
+
13
+ <link rel="stylesheet" href="../../css/style.css" type="text/css" media="screen" charset="utf-8" />
14
+
15
+ <link rel="stylesheet" href="../../css/common.css" type="text/css" media="screen" charset="utf-8" />
16
+
17
+ <script type="text/javascript" charset="utf-8">
18
+ relpath = '../..';
19
+ if (relpath != '') relpath += '/';
20
+ </script>
21
+
22
+ <script type="text/javascript" charset="utf-8" src="../../js/jquery.js"></script>
23
+
24
+ <script type="text/javascript" charset="utf-8" src="../../js/app.js"></script>
25
+
26
+
27
+ </head>
28
+ <body>
29
+ <script type="text/javascript" charset="utf-8">
30
+ if (window.top.frames.main) document.body.className = 'frames';
31
+ </script>
32
+
33
+ <div id="header">
34
+ <div id="menu">
35
+
36
+ <a href="../../_index.html">Index (R)</a> &raquo;
37
+ <span class='title'><span class='object_link'><a href="../../Renee.html" title="Renee (module)">Renee</a></span></span> &raquo; <span class='title'><span class='object_link'><a href="../Core.html" title="Renee::Core (class)">Core</a></span></span>
38
+ &raquo;
39
+ <span class="title">Routing</span>
40
+
41
+
42
+ <div class="noframes"><span class="title">(</span><a href="." target="_top">no frames</a><span class="title">)</span></div>
43
+ </div>
44
+
45
+ <div id="search">
46
+
47
+ <a id="class_list_link" href="#">Class List</a>
48
+
49
+ <a id="method_list_link" href="#">Method List</a>
50
+
51
+ <a id="file_list_link" href="#">File List</a>
52
+
53
+ </div>
54
+ <div class="clear"></div>
55
+ </div>
56
+
57
+ <iframe id="search_frame"></iframe>
58
+
59
+ <div id="content"><h1>Module: Renee::Core::Routing
60
+
61
+
62
+
63
+ </h1>
64
+
65
+ <dl class="box">
66
+
67
+
68
+
69
+
70
+
71
+ <dt class="r1">Includes:</dt>
72
+ <dd class="r1"><span class='object_link'><a href="Chaining.html" title="Renee::Core::Chaining (module)">Chaining</a></span></dd>
73
+
74
+
75
+
76
+
77
+ <dt class="r2">Included in:</dt>
78
+ <dd class="r2"><span class='object_link'><a href="../Core.html" title="Renee::Core (class)">Renee::Core</a></span></dd>
79
+
80
+
81
+
82
+ <dt class="r1 last">Defined in:</dt>
83
+ <dd class="r1 last">lib/renee/core/routing.rb</dd>
84
+
85
+ </dl>
86
+ <div class="clear"></div>
87
+
88
+ <h2>Overview</h2><div class="docstring">
89
+ <div class="discussion">
90
+ <p>Collection of useful methods for routing within a <span class='object_link'><a href="../Core.html" title="Renee::Core (class)">Renee::Core</a></span> app.</p>
91
+
92
+
93
+ </div>
94
+ </div>
95
+ <div class="tags">
96
+
97
+
98
+ </div>
99
+
100
+
101
+
102
+
103
+
104
+
105
+
106
+
107
+
108
+
109
+
110
+
111
+ <h2>
112
+ Instance Method Summary
113
+ <small>(<a href="#" class="summary_toggle">collapse</a>)</small>
114
+ </h2>
115
+
116
+ <ul class="summary">
117
+
118
+ <li class="public ">
119
+ <span class="summary_signature">
120
+
121
+ <a href="#complete-instance_method" title="#complete (instance method)">- (Object) <strong>complete</strong>(&amp;blk) </a>
122
+
123
+
124
+
125
+ </span>
126
+
127
+
128
+
129
+
130
+
131
+
132
+
133
+
134
+ <span class="summary_desc"><div class='inline'><p>Match only when the path is either '' or '/'.</p>
135
+ </div></span>
136
+
137
+ </li>
138
+
139
+
140
+ <li class="public ">
141
+ <span class="summary_signature">
142
+
143
+ <a href="#complete%3F-instance_method" title="#complete? (instance method)">- (Boolean) <strong>complete?</strong> </a>
144
+
145
+
146
+
147
+ </span>
148
+
149
+
150
+
151
+
152
+
153
+
154
+
155
+
156
+ <span class="summary_desc"><div class='inline'><p>Test if the path has been consumed.</p>
157
+ </div></span>
158
+
159
+ </li>
160
+
161
+
162
+ <li class="public ">
163
+ <span class="summary_signature">
164
+
165
+ <a href="#continue_routing-instance_method" title="#continue_routing (instance method)">- (Object) <strong>continue_routing</strong> </a>
166
+
167
+
168
+
169
+ </span>
170
+
171
+
172
+
173
+
174
+
175
+
176
+
177
+
178
+ <span class="summary_desc"><div class='inline'><p>Allow continued routing if a routing block fails to match.</p>
179
+ </div></span>
180
+
181
+ </li>
182
+
183
+
184
+ <li class="public ">
185
+ <span class="summary_signature">
186
+
187
+ <a href="#delete-instance_method" title="#delete (instance method)">- (Object) <strong>delete</strong>(&amp;blk) </a>
188
+
189
+
190
+
191
+ </span>
192
+
193
+
194
+
195
+
196
+
197
+
198
+
199
+
200
+ <span class="summary_desc"><div class='inline'><p>Respond to a DELETE request and yield the block.</p>
201
+ </div></span>
202
+
203
+ </li>
204
+
205
+
206
+ <li class="public ">
207
+ <span class="summary_signature">
208
+
209
+ <a href="#empty-instance_method" title="#empty (instance method)">- (Object) <strong>empty</strong>(&amp;blk) </a>
210
+
211
+
212
+
213
+ </span>
214
+
215
+
216
+
217
+
218
+
219
+
220
+
221
+
222
+ <span class="summary_desc"><div class='inline'><p>Match only when the path is ''.</p>
223
+ </div></span>
224
+
225
+ </li>
226
+
227
+
228
+ <li class="public ">
229
+ <span class="summary_signature">
230
+
231
+ <a href="#extension-instance_method" title="#extension (instance method)">- (Object) <strong>extension</strong> </a>
232
+
233
+
234
+
235
+ (also: #ext)
236
+
237
+ </span>
238
+
239
+
240
+
241
+
242
+
243
+
244
+
245
+
246
+ <span class="summary_desc"><div class='inline'><p>Returns the matched extension.</p>
247
+ </div></span>
248
+
249
+ </li>
250
+
251
+
252
+ <li class="public ">
253
+ <span class="summary_signature">
254
+
255
+ <a href="#get-instance_method" title="#get (instance method)">- (Object) <strong>get</strong>(&amp;blk) </a>
256
+
257
+
258
+
259
+ </span>
260
+
261
+
262
+
263
+
264
+
265
+
266
+
267
+
268
+ <span class="summary_desc"><div class='inline'><p>Respond to a GET request and yield the block.</p>
269
+ </div></span>
270
+
271
+ </li>
272
+
273
+
274
+ <li class="public ">
275
+ <span class="summary_signature">
276
+
277
+ <a href="#multi_variable-instance_method" title="#multi_variable (instance method)">- (Object) <strong>multi_variable</strong>(count, type = nil, &amp;blk) </a>
278
+
279
+
280
+
281
+ (also: #multi_var, #mvar)
282
+
283
+ </span>
284
+
285
+
286
+
287
+
288
+
289
+
290
+
291
+
292
+ <span class="summary_desc"><div class='inline'><p>Same as variable except you can match multiple variables with the same type.</p>
293
+ </div></span>
294
+
295
+ </li>
296
+
297
+
298
+ <li class="public ">
299
+ <span class="summary_signature">
300
+
301
+ <a href="#no_extension-instance_method" title="#no_extension (instance method)">- (Object) <strong>no_extension</strong>(&amp;blk) </a>
302
+
303
+
304
+
305
+ </span>
306
+
307
+
308
+
309
+
310
+
311
+
312
+
313
+
314
+ <span class="summary_desc"><div class='inline'><p>Match no extension.</p>
315
+ </div></span>
316
+
317
+ </li>
318
+
319
+
320
+ <li class="public ">
321
+ <span class="summary_signature">
322
+
323
+ <a href="#optional_variable-instance_method" title="#optional_variable (instance method)">- (Object) <strong>optional_variable</strong>(type = nil, &amp;blk) </a>
324
+
325
+
326
+
327
+ (also: #optional)
328
+
329
+ </span>
330
+
331
+
332
+
333
+
334
+
335
+
336
+
337
+
338
+ <span class="summary_desc"><div class='inline'>
339
+ </div></span>
340
+
341
+ </li>
342
+
343
+
344
+ <li class="public ">
345
+ <span class="summary_signature">
346
+
347
+ <a href="#part-instance_method" title="#part (instance method)">- (Object) <strong>part</strong>(p) </a>
348
+
349
+
350
+
351
+ </span>
352
+
353
+
354
+
355
+
356
+
357
+
358
+
359
+
360
+ <span class="summary_desc"><div class='inline'><p>Like #path, but doesn't look for leading slashes.</p>
361
+ </div></span>
362
+
363
+ </li>
364
+
365
+
366
+ <li class="public ">
367
+ <span class="summary_signature">
368
+
369
+ <a href="#partial_variable-instance_method" title="#partial_variable (instance method)">- (Object) <strong>partial_variable</strong>(type = nil, &amp;blk) </a>
370
+
371
+
372
+
373
+ (also: #part_var)
374
+
375
+ </span>
376
+
377
+
378
+
379
+
380
+
381
+
382
+
383
+
384
+ <span class="summary_desc"><div class='inline'><p>Match parts off the path as variables without a leading slash.</p>
385
+ </div></span>
386
+
387
+ </li>
388
+
389
+
390
+ <li class="public ">
391
+ <span class="summary_signature">
392
+
393
+ <a href="#path-instance_method" title="#path (instance method)">- (Object) <strong>path</strong>(p, &amp;blk) </a>
394
+
395
+
396
+
397
+ </span>
398
+
399
+
400
+
401
+
402
+
403
+
404
+
405
+
406
+ <span class="summary_desc"><div class='inline'><p>Match a path to respond to.</p>
407
+ </div></span>
408
+
409
+ </li>
410
+
411
+
412
+ <li class="public ">
413
+ <span class="summary_signature">
414
+
415
+ <a href="#post-instance_method" title="#post (instance method)">- (Object) <strong>post</strong>(&amp;blk) </a>
416
+
417
+
418
+
419
+ </span>
420
+
421
+
422
+
423
+
424
+
425
+
426
+
427
+
428
+ <span class="summary_desc"><div class='inline'><p>Respond to a POST request and yield the block.</p>
429
+ </div></span>
430
+
431
+ </li>
432
+
433
+
434
+ <li class="public ">
435
+ <span class="summary_signature">
436
+
437
+ <a href="#put-instance_method" title="#put (instance method)">- (Object) <strong>put</strong>(&amp;blk) </a>
438
+
439
+
440
+
441
+ </span>
442
+
443
+
444
+
445
+
446
+
447
+
448
+
449
+
450
+ <span class="summary_desc"><div class='inline'><p>Respond to a PUT request and yield the block.</p>
451
+ </div></span>
452
+
453
+ </li>
454
+
455
+
456
+ <li class="public ">
457
+ <span class="summary_signature">
458
+
459
+ <a href="#remainder-instance_method" title="#remainder (instance method)">- (Object) <strong>remainder</strong>(&amp;blk) </a>
460
+
461
+
462
+
463
+ (also: #catchall)
464
+
465
+ </span>
466
+
467
+
468
+
469
+
470
+
471
+
472
+
473
+
474
+ <span class="summary_desc"><div class='inline'><p>Match any remaining path.</p>
475
+ </div></span>
476
+
477
+ </li>
478
+
479
+
480
+ <li class="public ">
481
+ <span class="summary_signature">
482
+
483
+ <a href="#repeating_variable-instance_method" title="#repeating_variable (instance method)">- (Object) <strong>repeating_variable</strong>(type = nil, &amp;blk) </a>
484
+
485
+
486
+
487
+ (also: #glob)
488
+
489
+ </span>
490
+
491
+
492
+
493
+
494
+
495
+
496
+
497
+
498
+ <span class="summary_desc"><div class='inline'><p>Same as variable except it matches indefinitely.</p>
499
+ </div></span>
500
+
501
+ </li>
502
+
503
+
504
+ <li class="public ">
505
+ <span class="summary_signature">
506
+
507
+ <a href="#variable-instance_method" title="#variable (instance method)">- (Object) <strong>variable</strong>(type = nil, &amp;blk) </a>
508
+
509
+
510
+
511
+ (also: #var)
512
+
513
+ </span>
514
+
515
+
516
+
517
+
518
+
519
+
520
+
521
+
522
+ <span class="summary_desc"><div class='inline'><p>Match parts off the path as variables.</p>
523
+ </div></span>
524
+
525
+ </li>
526
+
527
+
528
+ </ul>
529
+
530
+
531
+
532
+
533
+
534
+
535
+
536
+
537
+
538
+
539
+ <h3 class="inherited">Methods included from <span class='object_link'><a href="Chaining.html" title="Renee::Core::Chaining (module)">Chaining</a></span></h3>
540
+ <p class="inherited"><span class='object_link'><a href="Chaining.html#create_chain_proxy-instance_method" title="Renee::Core::Chaining#create_chain_proxy (method)">#create_chain_proxy</a></span></p>
541
+
542
+
543
+ <div id="instance_method_details" class="method_details_list">
544
+ <h2>Instance Method Details</h2>
545
+
546
+
547
+ <div class="method_details first">
548
+ <p class="signature first" id="complete-instance_method">
549
+
550
+ - (<tt>Object</tt>) <strong>complete</strong>(&amp;blk)
551
+
552
+
553
+
554
+ </p><div class="docstring">
555
+ <div class="discussion">
556
+ <p>Match only when the path is either '' or '/'.</p>
557
+
558
+
559
+ </div>
560
+ </div>
561
+ <div class="tags">
562
+
563
+ <div class="examples">
564
+ <h3>Examples:</h3>
565
+
566
+ <h4><div class='inline'>
567
+ </div></h4>
568
+ <pre class="example code"><span class='id identifier rubyid_complete'>complete</span> <span class='lbrace'>{</span> <span class='id identifier rubyid_halt'>halt</span> <span class='lbracket'>[</span><span class='int'>200</span><span class='comma'>,</span> <span class='lbrace'>{</span><span class='rbrace'>}</span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>hello world</span><span class='tstring_end'>&quot;</span></span><span class='rbracket'>]</span> <span class='rbrace'>}</span></pre>
569
+
570
+ </div>
571
+
572
+
573
+ </div><table class="source_code">
574
+ <tr>
575
+ <td>
576
+ <pre class="lines">
577
+
578
+
579
+ 212
580
+ 213
581
+ 214
582
+ 215
583
+ 216
584
+ 217
585
+ 218</pre>
586
+ </td>
587
+ <td>
588
+ <pre class="code"><span class="info file"># File 'lib/renee/core/routing.rb', line 212</span>
589
+
590
+ <span class='kw'>def</span> <span class='id identifier rubyid_complete'>complete</span><span class='lparen'>(</span><span class='op'>&amp;</span><span class='id identifier rubyid_blk'>blk</span><span class='rparen'>)</span>
591
+ <span class='kw'>if</span> <span class='id identifier rubyid_blk'>blk</span>
592
+ <span class='id identifier rubyid_with_path_part'>with_path_part</span><span class='lparen'>(</span><span class='id identifier rubyid_env'>env</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>PATH_INFO</span><span class='tstring_end'>'</span></span><span class='rbracket'>]</span><span class='rparen'>)</span> <span class='lbrace'>{</span> <span class='id identifier rubyid_blk'>blk</span><span class='period'>.</span><span class='id identifier rubyid_call'>call</span> <span class='rbrace'>}</span> <span class='kw'>if</span> <span class='id identifier rubyid_complete?'>complete?</span>
593
+ <span class='kw'>else</span>
594
+ <span class='id identifier rubyid_create_chain_proxy'>create_chain_proxy</span><span class='lparen'>(</span><span class='symbol'>:complete</span><span class='rparen'>)</span>
595
+ <span class='kw'>end</span>
596
+ <span class='kw'>end</span></pre>
597
+ </td>
598
+ </tr>
599
+ </table>
600
+ </div>
601
+
602
+ <div class="method_details ">
603
+ <p class="signature " id="complete?-instance_method">
604
+
605
+ - (<tt>Boolean</tt>) <strong>complete?</strong>
606
+
607
+
608
+
609
+ </p><div class="docstring">
610
+ <div class="discussion">
611
+ <p>Test if the path has been consumed</p>
612
+
613
+
614
+ </div>
615
+ </div>
616
+ <div class="tags">
617
+
618
+ <div class="examples">
619
+ <h3>Examples:</h3>
620
+
621
+ <h4><div class='inline'>
622
+ </div></h4>
623
+ <pre class="example code"><span class='kw'>if</span> <span class='id identifier rubyid_complete?'>complete?</span>
624
+ <span class='id identifier rubyid_halt'>halt</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>Hey, the path is done</span><span class='tstring_end'>&quot;</span></span>
625
+ <span class='kw'>end</span></pre>
626
+
627
+ </div>
628
+
629
+ <h3>Returns:</h3>
630
+ <ul class="return">
631
+
632
+ <li>
633
+
634
+
635
+ <span class='type'>(<tt>Boolean</tt>)</span>
636
+
637
+
638
+
639
+ </li>
640
+
641
+ </ul>
642
+
643
+ </div><table class="source_code">
644
+ <tr>
645
+ <td>
646
+ <pre class="lines">
647
+
648
+
649
+ 229
650
+ 230
651
+ 231</pre>
652
+ </td>
653
+ <td>
654
+ <pre class="code"><span class="info file"># File 'lib/renee/core/routing.rb', line 229</span>
655
+
656
+ <span class='kw'>def</span> <span class='id identifier rubyid_complete?'>complete?</span>
657
+ <span class='lparen'>(</span><span class='id identifier rubyid_detected_extension'>detected_extension</span> <span class='kw'>and</span> <span class='id identifier rubyid_env'>env</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>PATH_INFO</span><span class='tstring_end'>'</span></span><span class='rbracket'>]</span> <span class='op'>=~</span> <span class='tstring'><span class='regexp_beg'>/</span><span class='tstring_content'>^\/?(\.</span><span class='embexpr_beg'>#{</span><span class='const'>Regexp</span><span class='period'>.</span><span class='id identifier rubyid_quote'>quote</span><span class='lparen'>(</span><span class='id identifier rubyid_detected_extension'>detected_extension</span><span class='rparen'>)</span><span class='rbrace'>}</span><span class='tstring_content'>\/?)?$</span><span class='regexp_end'>/</span></span><span class='rparen'>)</span> <span class='op'>||</span> <span class='lparen'>(</span><span class='id identifier rubyid_detected_extension'>detected_extension</span><span class='period'>.</span><span class='id identifier rubyid_nil?'>nil?</span> <span class='kw'>and</span> <span class='id identifier rubyid_env'>env</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>PATH_INFO</span><span class='tstring_end'>'</span></span><span class='rbracket'>]</span> <span class='op'>=~</span> <span class='tstring'><span class='regexp_beg'>/</span><span class='tstring_content'>^\/?$</span><span class='regexp_end'>/</span></span><span class='rparen'>)</span>
658
+ <span class='kw'>end</span></pre>
659
+ </td>
660
+ </tr>
661
+ </table>
662
+ </div>
663
+
664
+ <div class="method_details ">
665
+ <p class="signature " id="continue_routing-instance_method">
666
+
667
+ - (<tt>Object</tt>) <strong>continue_routing</strong>
668
+
669
+
670
+
671
+ </p><div class="docstring">
672
+ <div class="discussion">
673
+ <p>Allow continued routing if a routing block fails to match</p>
674
+
675
+
676
+ </div>
677
+ </div>
678
+ <div class="tags">
679
+ <h3>Parameters:</h3>
680
+ <ul class="param">
681
+
682
+ <li>
683
+
684
+ <span class='name'>val</span>
685
+
686
+
687
+ <span class='type'>(<tt>Boolean</tt>)</span>
688
+
689
+
690
+
691
+ &mdash;
692
+ <div class='inline'><p>indicate if continued routing should be allowed.</p>
693
+ </div>
694
+
695
+ </li>
696
+
697
+ </ul>
698
+
699
+
700
+ </div><table class="source_code">
701
+ <tr>
702
+ <td>
703
+ <pre class="lines">
704
+
705
+
706
+ 13
707
+ 14
708
+ 15
709
+ 16
710
+ 17
711
+ 18
712
+ 19
713
+ 20
714
+ 21
715
+ 22
716
+ 23
717
+ 24</pre>
718
+ </td>
719
+ <td>
720
+ <pre class="code"><span class="info file"># File 'lib/renee/core/routing.rb', line 13</span>
721
+
722
+ <span class='kw'>def</span> <span class='id identifier rubyid_continue_routing'>continue_routing</span>
723
+ <span class='kw'>if</span> <span class='id identifier rubyid_block_given?'>block_given?</span>
724
+ <span class='id identifier rubyid_original_env'>original_env</span> <span class='op'>=</span> <span class='ivar'>@env</span><span class='period'>.</span><span class='id identifier rubyid_dup'>dup</span>
725
+ <span class='kw'>begin</span>
726
+ <span class='kw'>yield</span>
727
+ <span class='kw'>rescue</span> <span class='const'>NotMatchedError</span>
728
+ <span class='ivar'>@env</span> <span class='op'>=</span> <span class='id identifier rubyid_original_env'>original_env</span>
729
+ <span class='kw'>end</span>
730
+ <span class='kw'>else</span>
731
+ <span class='id identifier rubyid_create_chain_proxy'>create_chain_proxy</span><span class='lparen'>(</span><span class='symbol'>:continue_routing</span><span class='rparen'>)</span>
732
+ <span class='kw'>end</span>
733
+ <span class='kw'>end</span></pre>
734
+ </td>
735
+ </tr>
736
+ </table>
737
+ </div>
738
+
739
+ <div class="method_details ">
740
+ <p class="signature " id="delete-instance_method">
741
+
742
+ - (<tt>Object</tt>) <strong>delete</strong>(&amp;blk)
743
+
744
+
745
+
746
+ </p><div class="docstring">
747
+ <div class="discussion">
748
+ <p>Respond to a DELETE request and yield the block.</p>
749
+
750
+
751
+ </div>
752
+ </div>
753
+ <div class="tags">
754
+
755
+ <div class="examples">
756
+ <h3>Examples:</h3>
757
+
758
+ <h4><div class='inline'>
759
+ </div></h4>
760
+ <pre class="example code"><span class='id identifier rubyid_delete'>delete</span> <span class='lbrace'>{</span> <span class='id identifier rubyid_halt'>halt</span> <span class='lbracket'>[</span><span class='int'>200</span><span class='comma'>,</span> <span class='lbrace'>{</span><span class='rbrace'>}</span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>hello world</span><span class='tstring_end'>&quot;</span></span><span class='rbracket'>]</span> <span class='rbrace'>}</span></pre>
761
+
762
+ </div>
763
+
764
+
765
+ </div><table class="source_code">
766
+ <tr>
767
+ <td>
768
+ <pre class="lines">
769
+
770
+
771
+ 201
772
+ 202
773
+ 203</pre>
774
+ </td>
775
+ <td>
776
+ <pre class="code"><span class="info file"># File 'lib/renee/core/routing.rb', line 201</span>
777
+
778
+ <span class='kw'>def</span> <span class='id identifier rubyid_delete'>delete</span><span class='lparen'>(</span><span class='op'>&amp;</span><span class='id identifier rubyid_blk'>blk</span><span class='rparen'>)</span>
779
+ <span class='id identifier rubyid_blk'>blk</span> <span class='op'>?</span> <span class='id identifier rubyid_request_method'>request_method</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>DELETE</span><span class='tstring_end'>'</span></span><span class='comma'>,</span> <span class='op'>&amp;</span><span class='id identifier rubyid_blk'>blk</span><span class='rparen'>)</span> <span class='op'>:</span> <span class='id identifier rubyid_create_chain_proxy'>create_chain_proxy</span><span class='lparen'>(</span><span class='symbol'>:delete</span><span class='rparen'>)</span>
780
+ <span class='kw'>end</span></pre>
781
+ </td>
782
+ </tr>
783
+ </table>
784
+ </div>
785
+
786
+ <div class="method_details ">
787
+ <p class="signature " id="empty-instance_method">
788
+
789
+ - (<tt>Object</tt>) <strong>empty</strong>(&amp;blk)
790
+
791
+
792
+
793
+ </p><div class="docstring">
794
+ <div class="discussion">
795
+ <p>Match only when the path is ''.</p>
796
+
797
+
798
+ </div>
799
+ </div>
800
+ <div class="tags">
801
+
802
+ <div class="examples">
803
+ <h3>Examples:</h3>
804
+
805
+ <h4><div class='inline'>
806
+ </div></h4>
807
+ <pre class="example code"><span class='id identifier rubyid_empty'>empty</span> <span class='lbrace'>{</span> <span class='id identifier rubyid_halt'>halt</span> <span class='lbracket'>[</span><span class='int'>200</span><span class='comma'>,</span> <span class='lbrace'>{</span><span class='rbrace'>}</span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>hello world</span><span class='tstring_end'>&quot;</span></span><span class='rbracket'>]</span> <span class='rbrace'>}</span></pre>
808
+
809
+ </div>
810
+
811
+
812
+ </div><table class="source_code">
813
+ <tr>
814
+ <td>
815
+ <pre class="lines">
816
+
817
+
818
+ 239
819
+ 240
820
+ 241
821
+ 242
822
+ 243
823
+ 244
824
+ 245
825
+ 246
826
+ 247</pre>
827
+ </td>
828
+ <td>
829
+ <pre class="code"><span class="info file"># File 'lib/renee/core/routing.rb', line 239</span>
830
+
831
+ <span class='kw'>def</span> <span class='id identifier rubyid_empty'>empty</span><span class='lparen'>(</span><span class='op'>&amp;</span><span class='id identifier rubyid_blk'>blk</span><span class='rparen'>)</span>
832
+ <span class='kw'>if</span> <span class='id identifier rubyid_blk'>blk</span>
833
+ <span class='kw'>if</span> <span class='id identifier rubyid_env'>env</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>PATH_INFO</span><span class='tstring_end'>'</span></span><span class='rbracket'>]</span> <span class='op'>==</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_end'>'</span></span>
834
+ <span class='id identifier rubyid_with_path_part'>with_path_part</span><span class='lparen'>(</span><span class='id identifier rubyid_env'>env</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>PATH_INFO</span><span class='tstring_end'>'</span></span><span class='rbracket'>]</span><span class='rparen'>)</span> <span class='lbrace'>{</span> <span class='id identifier rubyid_blk'>blk</span><span class='period'>.</span><span class='id identifier rubyid_call'>call</span> <span class='rbrace'>}</span>
835
+ <span class='kw'>end</span>
836
+ <span class='kw'>else</span>
837
+ <span class='id identifier rubyid_create_chain_proxy'>create_chain_proxy</span><span class='lparen'>(</span><span class='symbol'>:empty</span><span class='rparen'>)</span>
838
+ <span class='kw'>end</span>
839
+ <span class='kw'>end</span></pre>
840
+ </td>
841
+ </tr>
842
+ </table>
843
+ </div>
844
+
845
+ <div class="method_details ">
846
+ <p class="signature " id="extension-instance_method">
847
+
848
+ - (<tt>Object</tt>) <strong>extension</strong>
849
+
850
+
851
+
852
+ <span class="aliases">Also known as:
853
+ <span class="names"><span id='ext-instance_method'>ext</span></span>
854
+ </span>
855
+
856
+ </p><div class="docstring">
857
+ <div class="discussion">
858
+ <p>Returns the matched extension. If no extension is present, returns <code>nil</code>.</p>
859
+
860
+
861
+ </div>
862
+ </div>
863
+ <div class="tags">
864
+
865
+ <div class="examples">
866
+ <h3>Examples:</h3>
867
+
868
+ <h4><div class='inline'>
869
+ </div></h4>
870
+ <pre class="example code"><span class='id identifier rubyid_halt'>halt</span> <span class='lbracket'>[</span><span class='int'>200</span><span class='comma'>,</span> <span class='lbrace'>{</span><span class='rbrace'>}</span><span class='comma'>,</span> <span class='id identifier rubyid_path'>path</span><span class='rbracket'>]</span> <span class='kw'>if</span> <span class='id identifier rubyid_extension'>extension</span> <span class='op'>==</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>html</span><span class='tstring_end'>'</span></span></pre>
871
+
872
+ </div>
873
+
874
+
875
+ </div><table class="source_code">
876
+ <tr>
877
+ <td>
878
+ <pre class="lines">
879
+
880
+
881
+ 135
882
+ 136
883
+ 137</pre>
884
+ </td>
885
+ <td>
886
+ <pre class="code"><span class="info file"># File 'lib/renee/core/routing.rb', line 135</span>
887
+
888
+ <span class='kw'>def</span> <span class='id identifier rubyid_extension'>extension</span>
889
+ <span class='id identifier rubyid_detected_extension'>detected_extension</span>
890
+ <span class='kw'>end</span></pre>
891
+ </td>
892
+ </tr>
893
+ </table>
894
+ </div>
895
+
896
+ <div class="method_details ">
897
+ <p class="signature " id="get-instance_method">
898
+
899
+ - (<tt>Object</tt>) <strong>get</strong>(&amp;blk)
900
+
901
+
902
+
903
+ </p><div class="docstring">
904
+ <div class="discussion">
905
+ <p>Respond to a GET request and yield the block.</p>
906
+
907
+
908
+ </div>
909
+ </div>
910
+ <div class="tags">
911
+
912
+ <div class="examples">
913
+ <h3>Examples:</h3>
914
+
915
+ <h4><div class='inline'>
916
+ </div></h4>
917
+ <pre class="example code"><span class='id identifier rubyid_get'>get</span> <span class='lbrace'>{</span> <span class='id identifier rubyid_halt'>halt</span> <span class='lbracket'>[</span><span class='int'>200</span><span class='comma'>,</span> <span class='lbrace'>{</span><span class='rbrace'>}</span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>hello world</span><span class='tstring_end'>&quot;</span></span><span class='rbracket'>]</span> <span class='rbrace'>}</span></pre>
918
+
919
+ </div>
920
+
921
+
922
+ </div><table class="source_code">
923
+ <tr>
924
+ <td>
925
+ <pre class="lines">
926
+
927
+
928
+ 168
929
+ 169
930
+ 170</pre>
931
+ </td>
932
+ <td>
933
+ <pre class="code"><span class="info file"># File 'lib/renee/core/routing.rb', line 168</span>
934
+
935
+ <span class='kw'>def</span> <span class='id identifier rubyid_get'>get</span><span class='lparen'>(</span><span class='op'>&amp;</span><span class='id identifier rubyid_blk'>blk</span><span class='rparen'>)</span>
936
+ <span class='id identifier rubyid_blk'>blk</span> <span class='op'>?</span> <span class='id identifier rubyid_request_method'>request_method</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>GET</span><span class='tstring_end'>'</span></span><span class='comma'>,</span> <span class='op'>&amp;</span><span class='id identifier rubyid_blk'>blk</span><span class='rparen'>)</span> <span class='op'>:</span> <span class='id identifier rubyid_create_chain_proxy'>create_chain_proxy</span><span class='lparen'>(</span><span class='symbol'>:get</span><span class='rparen'>)</span>
937
+ <span class='kw'>end</span></pre>
938
+ </td>
939
+ </tr>
940
+ </table>
941
+ </div>
942
+
943
+ <div class="method_details ">
944
+ <p class="signature " id="multi_variable-instance_method">
945
+
946
+ - (<tt>Object</tt>) <strong>multi_variable</strong>(count, type = nil, &amp;blk)
947
+
948
+
949
+
950
+ <span class="aliases">Also known as:
951
+ <span class="names"><span id='multi_var-instance_method'>multi_var</span>, <span id='mvar-instance_method'>mvar</span></span>
952
+ </span>
953
+
954
+ </p><div class="docstring">
955
+ <div class="discussion">
956
+ <p>Same as variable except you can match multiple variables with the same type.</p>
957
+
958
+
959
+ </div>
960
+ </div>
961
+ <div class="tags">
962
+ <h3>Parameters:</h3>
963
+ <ul class="param">
964
+
965
+ <li>
966
+
967
+ <span class='name'>count</span>
968
+
969
+
970
+ <span class='type'>(<tt>Range</tt>, <tt>Integer</tt>)</span>
971
+
972
+
973
+
974
+ &mdash;
975
+ <div class='inline'><p>The number of parameters to capture.</p>
976
+ </div>
977
+
978
+ </li>
979
+
980
+ <li>
981
+
982
+ <span class='name'>type</span>
983
+
984
+
985
+ <span class='type'>(<tt>Symbol</tt>)</span>
986
+
987
+
988
+ <em class="default">(defaults to: <tt>nil</tt>)</em>
989
+
990
+
991
+ &mdash;
992
+ <div class='inline'><p>The type to use for match.</p>
993
+ </div>
994
+
995
+ </li>
996
+
997
+ </ul>
998
+
999
+
1000
+ </div><table class="source_code">
1001
+ <tr>
1002
+ <td>
1003
+ <pre class="lines">
1004
+
1005
+
1006
+ 105
1007
+ 106
1008
+ 107</pre>
1009
+ </td>
1010
+ <td>
1011
+ <pre class="code"><span class="info file"># File 'lib/renee/core/routing.rb', line 105</span>
1012
+
1013
+ <span class='kw'>def</span> <span class='id identifier rubyid_multi_variable'>multi_variable</span><span class='lparen'>(</span><span class='id identifier rubyid_count'>count</span><span class='comma'>,</span> <span class='id identifier rubyid_type'>type</span> <span class='op'>=</span> <span class='kw'>nil</span><span class='comma'>,</span> <span class='op'>&amp;</span><span class='id identifier rubyid_blk'>blk</span><span class='rparen'>)</span>
1014
+ <span class='id identifier rubyid_blk'>blk</span> <span class='op'>?</span> <span class='id identifier rubyid_complex_variable'>complex_variable</span><span class='lparen'>(</span><span class='id identifier rubyid_type'>type</span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>/</span><span class='tstring_end'>'</span></span><span class='comma'>,</span> <span class='id identifier rubyid_count'>count</span><span class='comma'>,</span> <span class='op'>&amp;</span><span class='id identifier rubyid_blk'>blk</span><span class='rparen'>)</span> <span class='op'>:</span> <span class='id identifier rubyid_create_chain_proxy'>create_chain_proxy</span><span class='lparen'>(</span><span class='symbol'>:multi_variable</span><span class='comma'>,</span> <span class='id identifier rubyid_count'>count</span><span class='comma'>,</span> <span class='id identifier rubyid_type'>type</span><span class='rparen'>)</span>
1015
+ <span class='kw'>end</span></pre>
1016
+ </td>
1017
+ </tr>
1018
+ </table>
1019
+ </div>
1020
+
1021
+ <div class="method_details ">
1022
+ <p class="signature " id="no_extension-instance_method">
1023
+
1024
+ - (<tt>Object</tt>) <strong>no_extension</strong>(&amp;blk)
1025
+
1026
+
1027
+
1028
+ </p><div class="docstring">
1029
+ <div class="discussion">
1030
+ <p>Match no extension.</p>
1031
+
1032
+
1033
+ </div>
1034
+ </div>
1035
+ <div class="tags">
1036
+
1037
+ <div class="examples">
1038
+ <h3>Examples:</h3>
1039
+
1040
+ <h4><div class='inline'>
1041
+ </div></h4>
1042
+ <pre class="example code"><span class='id identifier rubyid_no_extension'>no_extension</span> <span class='lbrace'>{</span> <span class='op'>|</span><span class='id identifier rubyid_path'>path</span><span class='op'>|</span> <span class='id identifier rubyid_halt'>halt</span> <span class='lbracket'>[</span><span class='int'>200</span><span class='comma'>,</span> <span class='lbrace'>{</span><span class='rbrace'>}</span><span class='comma'>,</span> <span class='id identifier rubyid_path'>path</span><span class='rbracket'>]</span> <span class='rbrace'>}</span></pre>
1043
+
1044
+ </div>
1045
+
1046
+
1047
+ </div><table class="source_code">
1048
+ <tr>
1049
+ <td>
1050
+ <pre class="lines">
1051
+
1052
+
1053
+ 146
1054
+ 147
1055
+ 148</pre>
1056
+ </td>
1057
+ <td>
1058
+ <pre class="code"><span class="info file"># File 'lib/renee/core/routing.rb', line 146</span>
1059
+
1060
+ <span class='kw'>def</span> <span class='id identifier rubyid_no_extension'>no_extension</span><span class='lparen'>(</span><span class='op'>&amp;</span><span class='id identifier rubyid_blk'>blk</span><span class='rparen'>)</span>
1061
+ <span class='id identifier rubyid_blk'>blk</span><span class='period'>.</span><span class='id identifier rubyid_call'>call</span> <span class='kw'>unless</span> <span class='id identifier rubyid_detected_extension'>detected_extension</span>
1062
+ <span class='kw'>end</span></pre>
1063
+ </td>
1064
+ </tr>
1065
+ </table>
1066
+ </div>
1067
+
1068
+ <div class="method_details ">
1069
+ <p class="signature " id="optional_variable-instance_method">
1070
+
1071
+ - (<tt>Object</tt>) <strong>optional_variable</strong>(type = nil, &amp;blk)
1072
+
1073
+
1074
+
1075
+ <span class="aliases">Also known as:
1076
+ <span class="names"><span id='optional-instance_method'>optional</span></span>
1077
+ </span>
1078
+
1079
+ </p><table class="source_code">
1080
+ <tr>
1081
+ <td>
1082
+ <pre class="lines">
1083
+
1084
+
1085
+ 96
1086
+ 97
1087
+ 98</pre>
1088
+ </td>
1089
+ <td>
1090
+ <pre class="code"><span class="info file"># File 'lib/renee/core/routing.rb', line 96</span>
1091
+
1092
+ <span class='kw'>def</span> <span class='id identifier rubyid_optional_variable'>optional_variable</span><span class='lparen'>(</span><span class='id identifier rubyid_type'>type</span> <span class='op'>=</span> <span class='kw'>nil</span><span class='comma'>,</span> <span class='op'>&amp;</span><span class='id identifier rubyid_blk'>blk</span><span class='rparen'>)</span>
1093
+ <span class='id identifier rubyid_blk'>blk</span> <span class='op'>?</span> <span class='id identifier rubyid_complex_variable'>complex_variable</span><span class='lparen'>(</span><span class='id identifier rubyid_type'>type</span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>/</span><span class='tstring_end'>'</span></span><span class='comma'>,</span> <span class='int'>0</span><span class='op'>..</span><span class='int'>1</span><span class='rparen'>)</span> <span class='lbrace'>{</span> <span class='op'>|</span><span class='id identifier rubyid_vars'>vars</span><span class='op'>|</span> <span class='id identifier rubyid_blk'>blk</span><span class='lbracket'>[</span><span class='id identifier rubyid_vars'>vars</span><span class='period'>.</span><span class='id identifier rubyid_first'>first</span><span class='rbracket'>]</span> <span class='rbrace'>}</span> <span class='op'>:</span> <span class='id identifier rubyid_create_chain_proxy'>create_chain_proxy</span><span class='lparen'>(</span><span class='symbol'>:variable</span><span class='comma'>,</span> <span class='id identifier rubyid_type'>type</span><span class='rparen'>)</span>
1094
+ <span class='kw'>end</span></pre>
1095
+ </td>
1096
+ </tr>
1097
+ </table>
1098
+ </div>
1099
+
1100
+ <div class="method_details ">
1101
+ <p class="signature " id="part-instance_method">
1102
+
1103
+ - (<tt>Object</tt>) <strong>part</strong>(p)
1104
+
1105
+
1106
+
1107
+ </p><div class="docstring">
1108
+ <div class="discussion">
1109
+ <p>Like #path, but doesn't look for leading slashes.</p>
1110
+
1111
+
1112
+ </div>
1113
+ </div>
1114
+ <div class="tags">
1115
+
1116
+
1117
+ </div><table class="source_code">
1118
+ <tr>
1119
+ <td>
1120
+ <pre class="lines">
1121
+
1122
+
1123
+ 55
1124
+ 56
1125
+ 57
1126
+ 58
1127
+ 59
1128
+ 60
1129
+ 61
1130
+ 62
1131
+ 63
1132
+ 64</pre>
1133
+ </td>
1134
+ <td>
1135
+ <pre class="code"><span class="info file"># File 'lib/renee/core/routing.rb', line 55</span>
1136
+
1137
+ <span class='kw'>def</span> <span class='id identifier rubyid_part'>part</span><span class='lparen'>(</span><span class='id identifier rubyid_p'>p</span><span class='rparen'>)</span>
1138
+ <span class='kw'>if</span> <span class='id identifier rubyid_block_given?'>block_given?</span>
1139
+ <span class='id identifier rubyid_p'>p</span> <span class='op'>=</span> <span class='tstring'><span class='regexp_beg'>/</span><span class='tstring_content'>^\/?</span><span class='embexpr_beg'>#{</span><span class='const'>Regexp</span><span class='period'>.</span><span class='id identifier rubyid_quote'>quote</span><span class='lparen'>(</span><span class='id identifier rubyid_p'>p</span><span class='rparen'>)</span><span class='rbrace'>}</span><span class='regexp_end'>/</span></span> <span class='kw'>if</span> <span class='id identifier rubyid_p'>p</span><span class='period'>.</span><span class='id identifier rubyid_is_a?'>is_a?</span><span class='lparen'>(</span><span class='const'>String</span><span class='rparen'>)</span>
1140
+ <span class='kw'>if</span> <span class='id identifier rubyid_match'>match</span> <span class='op'>=</span> <span class='id identifier rubyid_env'>env</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>PATH_INFO</span><span class='tstring_end'>'</span></span><span class='rbracket'>]</span><span class='lbracket'>[</span><span class='id identifier rubyid_p'>p</span><span class='rbracket'>]</span>
1141
+ <span class='id identifier rubyid_with_path_part'>with_path_part</span><span class='lparen'>(</span><span class='id identifier rubyid_match'>match</span><span class='rparen'>)</span> <span class='lbrace'>{</span> <span class='kw'>yield</span> <span class='rbrace'>}</span>
1142
+ <span class='kw'>end</span>
1143
+ <span class='kw'>else</span>
1144
+ <span class='id identifier rubyid_create_chain_proxy'>create_chain_proxy</span><span class='lparen'>(</span><span class='symbol'>:part</span><span class='comma'>,</span> <span class='id identifier rubyid_p'>p</span><span class='rparen'>)</span>
1145
+ <span class='kw'>end</span>
1146
+ <span class='kw'>end</span></pre>
1147
+ </td>
1148
+ </tr>
1149
+ </table>
1150
+ </div>
1151
+
1152
+ <div class="method_details ">
1153
+ <p class="signature " id="partial_variable-instance_method">
1154
+
1155
+ - (<tt>Object</tt>) <strong>partial_variable</strong>(type = nil, &amp;blk)
1156
+
1157
+
1158
+
1159
+ <span class="aliases">Also known as:
1160
+ <span class="names"><span id='part_var-instance_method'>part_var</span></span>
1161
+ </span>
1162
+
1163
+ </p><div class="docstring">
1164
+ <div class="discussion">
1165
+ <p>Match parts off the path as variables without a leading slash.</p>
1166
+
1167
+
1168
+ </div>
1169
+ </div>
1170
+ <div class="tags">
1171
+
1172
+
1173
+ <h3>See Also:</h3>
1174
+ <ul class="see">
1175
+
1176
+ <li><span class='object_link'><a href="#variable-instance_method" title="Renee::Core::Routing#variable (method)">#variable</a></span></li>
1177
+
1178
+ </ul>
1179
+
1180
+ </div><table class="source_code">
1181
+ <tr>
1182
+ <td>
1183
+ <pre class="lines">
1184
+
1185
+
1186
+ 123
1187
+ 124
1188
+ 125</pre>
1189
+ </td>
1190
+ <td>
1191
+ <pre class="code"><span class="info file"># File 'lib/renee/core/routing.rb', line 123</span>
1192
+
1193
+ <span class='kw'>def</span> <span class='id identifier rubyid_partial_variable'>partial_variable</span><span class='lparen'>(</span><span class='id identifier rubyid_type'>type</span> <span class='op'>=</span> <span class='kw'>nil</span><span class='comma'>,</span> <span class='op'>&amp;</span><span class='id identifier rubyid_blk'>blk</span><span class='rparen'>)</span>
1194
+ <span class='id identifier rubyid_blk'>blk</span> <span class='op'>?</span> <span class='id identifier rubyid_complex_variable'>complex_variable</span><span class='lparen'>(</span><span class='id identifier rubyid_type'>type</span><span class='comma'>,</span> <span class='kw'>nil</span><span class='comma'>,</span> <span class='int'>1</span><span class='comma'>,</span> <span class='op'>&amp;</span><span class='id identifier rubyid_blk'>blk</span><span class='rparen'>)</span> <span class='op'>:</span> <span class='id identifier rubyid_create_chain_proxy'>create_chain_proxy</span><span class='lparen'>(</span><span class='symbol'>:partial_variable</span><span class='comma'>,</span> <span class='id identifier rubyid_type'>type</span><span class='rparen'>)</span>
1195
+ <span class='kw'>end</span></pre>
1196
+ </td>
1197
+ </tr>
1198
+ </table>
1199
+ </div>
1200
+
1201
+ <div class="method_details ">
1202
+ <p class="signature " id="path-instance_method">
1203
+
1204
+ - (<tt>Object</tt>) <strong>path</strong>(p, &amp;blk)
1205
+
1206
+
1207
+
1208
+ </p><div class="docstring">
1209
+ <div class="discussion">
1210
+ <p>Match a path to respond to.</p>
1211
+
1212
+
1213
+ </div>
1214
+ </div>
1215
+ <div class="tags">
1216
+
1217
+ <div class="examples">
1218
+ <h3>Examples:</h3>
1219
+
1220
+ <h4><div class='inline'>
1221
+ </div></h4>
1222
+ <pre class="example code">path('/') { ... } #=&gt; '/'
1223
+ path('test') { ... } #=&gt; '/test'
1224
+
1225
+ path 'foo' do
1226
+ path('bar') { ... } #=&gt; '/foo/bar'
1227
+ end</pre>
1228
+
1229
+ </div>
1230
+ <h3>Parameters:</h3>
1231
+ <ul class="param">
1232
+
1233
+ <li>
1234
+
1235
+ <span class='name'>p</span>
1236
+
1237
+
1238
+ <span class='type'>(<tt>String</tt>)</span>
1239
+
1240
+
1241
+
1242
+ &mdash;
1243
+ <div class='inline'><p>path to match.</p>
1244
+ </div>
1245
+
1246
+ </li>
1247
+
1248
+ <li>
1249
+
1250
+ <span class='name'>blk</span>
1251
+
1252
+
1253
+ <span class='type'>(<tt>Proc</tt>)</span>
1254
+
1255
+
1256
+
1257
+ &mdash;
1258
+ <div class='inline'><p>block to yield</p>
1259
+ </div>
1260
+
1261
+ </li>
1262
+
1263
+ </ul>
1264
+
1265
+
1266
+ </div><table class="source_code">
1267
+ <tr>
1268
+ <td>
1269
+ <pre class="lines">
1270
+
1271
+
1272
+ 43
1273
+ 44
1274
+ 45
1275
+ 46
1276
+ 47
1277
+ 48
1278
+ 49
1279
+ 50
1280
+ 51</pre>
1281
+ </td>
1282
+ <td>
1283
+ <pre class="code"><span class="info file"># File 'lib/renee/core/routing.rb', line 43</span>
1284
+
1285
+ <span class='kw'>def</span> <span class='id identifier rubyid_path'>path</span><span class='lparen'>(</span><span class='id identifier rubyid_p'>p</span><span class='comma'>,</span> <span class='op'>&amp;</span><span class='id identifier rubyid_blk'>blk</span><span class='rparen'>)</span>
1286
+ <span class='kw'>if</span> <span class='id identifier rubyid_blk'>blk</span>
1287
+ <span class='id identifier rubyid_p'>p</span> <span class='op'>=</span> <span class='id identifier rubyid_p'>p</span><span class='lbracket'>[</span><span class='int'>1</span><span class='comma'>,</span> <span class='id identifier rubyid_p'>p</span><span class='period'>.</span><span class='id identifier rubyid_size'>size</span><span class='rbracket'>]</span> <span class='kw'>if</span> <span class='id identifier rubyid_p'>p</span><span class='lbracket'>[</span><span class='int'>0</span><span class='rbracket'>]</span> <span class='op'>==</span> <span class='CHAR'>?/</span>
1288
+ <span class='id identifier rubyid_extension_part'>extension_part</span> <span class='op'>=</span> <span class='id identifier rubyid_detected_extension'>detected_extension</span> <span class='op'>?</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>|\\.</span><span class='embexpr_beg'>#{</span><span class='const'>Regexp</span><span class='period'>.</span><span class='id identifier rubyid_quote'>quote</span><span class='lparen'>(</span><span class='id identifier rubyid_detected_extension'>detected_extension</span><span class='rparen'>)</span><span class='rbrace'>}</span><span class='tstring_end'>&quot;</span></span> <span class='op'>:</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_end'>&quot;</span></span>
1289
+ <span class='id identifier rubyid_part'>part</span><span class='lparen'>(</span><span class='tstring'><span class='regexp_beg'>/</span><span class='tstring_content'>^\/</span><span class='embexpr_beg'>#{</span><span class='const'>Regexp</span><span class='period'>.</span><span class='id identifier rubyid_quote'>quote</span><span class='lparen'>(</span><span class='id identifier rubyid_p'>p</span><span class='rparen'>)</span><span class='rbrace'>}</span><span class='tstring_content'>(?=\/|$</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_extension_part'>extension_part</span><span class='rbrace'>}</span><span class='tstring_content'>)</span><span class='regexp_end'>/</span></span><span class='comma'>,</span> <span class='op'>&amp;</span><span class='id identifier rubyid_blk'>blk</span><span class='rparen'>)</span>
1290
+ <span class='kw'>else</span>
1291
+ <span class='id identifier rubyid_create_chain_proxy'>create_chain_proxy</span><span class='lparen'>(</span><span class='symbol'>:path</span><span class='comma'>,</span> <span class='id identifier rubyid_p'>p</span><span class='rparen'>)</span>
1292
+ <span class='kw'>end</span>
1293
+ <span class='kw'>end</span></pre>
1294
+ </td>
1295
+ </tr>
1296
+ </table>
1297
+ </div>
1298
+
1299
+ <div class="method_details ">
1300
+ <p class="signature " id="post-instance_method">
1301
+
1302
+ - (<tt>Object</tt>) <strong>post</strong>(&amp;blk)
1303
+
1304
+
1305
+
1306
+ </p><div class="docstring">
1307
+ <div class="discussion">
1308
+ <p>Respond to a POST request and yield the block.</p>
1309
+
1310
+
1311
+ </div>
1312
+ </div>
1313
+ <div class="tags">
1314
+
1315
+ <div class="examples">
1316
+ <h3>Examples:</h3>
1317
+
1318
+ <h4><div class='inline'>
1319
+ </div></h4>
1320
+ <pre class="example code"><span class='id identifier rubyid_post'>post</span> <span class='lbrace'>{</span> <span class='id identifier rubyid_halt'>halt</span> <span class='lbracket'>[</span><span class='int'>200</span><span class='comma'>,</span> <span class='lbrace'>{</span><span class='rbrace'>}</span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>hello world</span><span class='tstring_end'>&quot;</span></span><span class='rbracket'>]</span> <span class='rbrace'>}</span></pre>
1321
+
1322
+ </div>
1323
+
1324
+
1325
+ </div><table class="source_code">
1326
+ <tr>
1327
+ <td>
1328
+ <pre class="lines">
1329
+
1330
+
1331
+ 179
1332
+ 180
1333
+ 181</pre>
1334
+ </td>
1335
+ <td>
1336
+ <pre class="code"><span class="info file"># File 'lib/renee/core/routing.rb', line 179</span>
1337
+
1338
+ <span class='kw'>def</span> <span class='id identifier rubyid_post'>post</span><span class='lparen'>(</span><span class='op'>&amp;</span><span class='id identifier rubyid_blk'>blk</span><span class='rparen'>)</span>
1339
+ <span class='id identifier rubyid_blk'>blk</span> <span class='op'>?</span> <span class='id identifier rubyid_request_method'>request_method</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>POST</span><span class='tstring_end'>'</span></span><span class='comma'>,</span> <span class='op'>&amp;</span><span class='id identifier rubyid_blk'>blk</span><span class='rparen'>)</span> <span class='op'>:</span> <span class='id identifier rubyid_create_chain_proxy'>create_chain_proxy</span><span class='lparen'>(</span><span class='symbol'>:post</span><span class='rparen'>)</span>
1340
+ <span class='kw'>end</span></pre>
1341
+ </td>
1342
+ </tr>
1343
+ </table>
1344
+ </div>
1345
+
1346
+ <div class="method_details ">
1347
+ <p class="signature " id="put-instance_method">
1348
+
1349
+ - (<tt>Object</tt>) <strong>put</strong>(&amp;blk)
1350
+
1351
+
1352
+
1353
+ </p><div class="docstring">
1354
+ <div class="discussion">
1355
+ <p>Respond to a PUT request and yield the block.</p>
1356
+
1357
+
1358
+ </div>
1359
+ </div>
1360
+ <div class="tags">
1361
+
1362
+ <div class="examples">
1363
+ <h3>Examples:</h3>
1364
+
1365
+ <h4><div class='inline'>
1366
+ </div></h4>
1367
+ <pre class="example code"><span class='id identifier rubyid_put'>put</span> <span class='lbrace'>{</span> <span class='id identifier rubyid_halt'>halt</span> <span class='lbracket'>[</span><span class='int'>200</span><span class='comma'>,</span> <span class='lbrace'>{</span><span class='rbrace'>}</span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>hello world</span><span class='tstring_end'>&quot;</span></span><span class='rbracket'>]</span> <span class='rbrace'>}</span></pre>
1368
+
1369
+ </div>
1370
+
1371
+
1372
+ </div><table class="source_code">
1373
+ <tr>
1374
+ <td>
1375
+ <pre class="lines">
1376
+
1377
+
1378
+ 190
1379
+ 191
1380
+ 192</pre>
1381
+ </td>
1382
+ <td>
1383
+ <pre class="code"><span class="info file"># File 'lib/renee/core/routing.rb', line 190</span>
1384
+
1385
+ <span class='kw'>def</span> <span class='id identifier rubyid_put'>put</span><span class='lparen'>(</span><span class='op'>&amp;</span><span class='id identifier rubyid_blk'>blk</span><span class='rparen'>)</span>
1386
+ <span class='id identifier rubyid_blk'>blk</span> <span class='op'>?</span> <span class='id identifier rubyid_request_method'>request_method</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>PUT</span><span class='tstring_end'>'</span></span><span class='comma'>,</span> <span class='op'>&amp;</span><span class='id identifier rubyid_blk'>blk</span><span class='rparen'>)</span> <span class='op'>:</span> <span class='id identifier rubyid_create_chain_proxy'>create_chain_proxy</span><span class='lparen'>(</span><span class='symbol'>:put</span><span class='rparen'>)</span>
1387
+ <span class='kw'>end</span></pre>
1388
+ </td>
1389
+ </tr>
1390
+ </table>
1391
+ </div>
1392
+
1393
+ <div class="method_details ">
1394
+ <p class="signature " id="remainder-instance_method">
1395
+
1396
+ - (<tt>Object</tt>) <strong>remainder</strong>(&amp;blk)
1397
+
1398
+
1399
+
1400
+ <span class="aliases">Also known as:
1401
+ <span class="names"><span id='catchall-instance_method'>catchall</span></span>
1402
+ </span>
1403
+
1404
+ </p><div class="docstring">
1405
+ <div class="discussion">
1406
+ <p>Match any remaining path.</p>
1407
+
1408
+
1409
+ </div>
1410
+ </div>
1411
+ <div class="tags">
1412
+
1413
+ <div class="examples">
1414
+ <h3>Examples:</h3>
1415
+
1416
+ <h4><div class='inline'>
1417
+ </div></h4>
1418
+ <pre class="example code"><span class='id identifier rubyid_remainder'>remainder</span> <span class='lbrace'>{</span> <span class='op'>|</span><span class='id identifier rubyid_path'>path</span><span class='op'>|</span> <span class='id identifier rubyid_halt'>halt</span> <span class='lbracket'>[</span><span class='int'>200</span><span class='comma'>,</span> <span class='lbrace'>{</span><span class='rbrace'>}</span><span class='comma'>,</span> <span class='id identifier rubyid_path'>path</span><span class='rbracket'>]</span> <span class='rbrace'>}</span></pre>
1419
+
1420
+ </div>
1421
+
1422
+
1423
+ </div><table class="source_code">
1424
+ <tr>
1425
+ <td>
1426
+ <pre class="lines">
1427
+
1428
+
1429
+ 156
1430
+ 157
1431
+ 158</pre>
1432
+ </td>
1433
+ <td>
1434
+ <pre class="code"><span class="info file"># File 'lib/renee/core/routing.rb', line 156</span>
1435
+
1436
+ <span class='kw'>def</span> <span class='id identifier rubyid_remainder'>remainder</span><span class='lparen'>(</span><span class='op'>&amp;</span><span class='id identifier rubyid_blk'>blk</span><span class='rparen'>)</span>
1437
+ <span class='id identifier rubyid_blk'>blk</span> <span class='op'>?</span> <span class='id identifier rubyid_with_path_part'>with_path_part</span><span class='lparen'>(</span><span class='id identifier rubyid_env'>env</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>PATH_INFO</span><span class='tstring_end'>'</span></span><span class='rbracket'>]</span><span class='rparen'>)</span> <span class='lbrace'>{</span> <span class='op'>|</span><span class='id identifier rubyid_var'>var</span><span class='op'>|</span> <span class='id identifier rubyid_blk'>blk</span><span class='period'>.</span><span class='id identifier rubyid_call'>call</span><span class='lparen'>(</span><span class='id identifier rubyid_var'>var</span><span class='rparen'>)</span> <span class='rbrace'>}</span> <span class='op'>:</span> <span class='id identifier rubyid_create_chain_proxy'>create_chain_proxy</span><span class='lparen'>(</span><span class='symbol'>:remainder</span><span class='rparen'>)</span>
1438
+ <span class='kw'>end</span></pre>
1439
+ </td>
1440
+ </tr>
1441
+ </table>
1442
+ </div>
1443
+
1444
+ <div class="method_details ">
1445
+ <p class="signature " id="repeating_variable-instance_method">
1446
+
1447
+ - (<tt>Object</tt>) <strong>repeating_variable</strong>(type = nil, &amp;blk)
1448
+
1449
+
1450
+
1451
+ <span class="aliases">Also known as:
1452
+ <span class="names"><span id='glob-instance_method'>glob</span></span>
1453
+ </span>
1454
+
1455
+ </p><div class="docstring">
1456
+ <div class="discussion">
1457
+ <p>Same as variable except it matches indefinitely.</p>
1458
+
1459
+
1460
+ </div>
1461
+ </div>
1462
+ <div class="tags">
1463
+ <h3>Parameters:</h3>
1464
+ <ul class="param">
1465
+
1466
+ <li>
1467
+
1468
+ <span class='name'>type</span>
1469
+
1470
+
1471
+ <span class='type'>(<tt>Symbol</tt>)</span>
1472
+
1473
+
1474
+ <em class="default">(defaults to: <tt>nil</tt>)</em>
1475
+
1476
+
1477
+ &mdash;
1478
+ <div class='inline'><p>The type to use for match.</p>
1479
+ </div>
1480
+
1481
+ </li>
1482
+
1483
+ </ul>
1484
+
1485
+
1486
+ </div><table class="source_code">
1487
+ <tr>
1488
+ <td>
1489
+ <pre class="lines">
1490
+
1491
+
1492
+ 114
1493
+ 115
1494
+ 116</pre>
1495
+ </td>
1496
+ <td>
1497
+ <pre class="code"><span class="info file"># File 'lib/renee/core/routing.rb', line 114</span>
1498
+
1499
+ <span class='kw'>def</span> <span class='id identifier rubyid_repeating_variable'>repeating_variable</span><span class='lparen'>(</span><span class='id identifier rubyid_type'>type</span> <span class='op'>=</span> <span class='kw'>nil</span><span class='comma'>,</span> <span class='op'>&amp;</span><span class='id identifier rubyid_blk'>blk</span><span class='rparen'>)</span>
1500
+ <span class='id identifier rubyid_blk'>blk</span> <span class='op'>?</span> <span class='id identifier rubyid_complex_variable'>complex_variable</span><span class='lparen'>(</span><span class='id identifier rubyid_type'>type</span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>/</span><span class='tstring_end'>'</span></span><span class='comma'>,</span> <span class='kw'>nil</span><span class='comma'>,</span> <span class='op'>&amp;</span><span class='id identifier rubyid_blk'>blk</span><span class='rparen'>)</span> <span class='op'>:</span> <span class='id identifier rubyid_create_chain_proxy'>create_chain_proxy</span><span class='lparen'>(</span><span class='symbol'>:repeating_variable</span><span class='comma'>,</span> <span class='id identifier rubyid_type'>type</span><span class='rparen'>)</span>
1501
+ <span class='kw'>end</span></pre>
1502
+ </td>
1503
+ </tr>
1504
+ </table>
1505
+ </div>
1506
+
1507
+ <div class="method_details ">
1508
+ <p class="signature " id="variable-instance_method">
1509
+
1510
+ - (<tt>Object</tt>) <strong>variable</strong>(type = nil, &amp;blk)
1511
+
1512
+
1513
+
1514
+ <span class="aliases">Also known as:
1515
+ <span class="names"><span id='var-instance_method'>var</span></span>
1516
+ </span>
1517
+
1518
+ </p><div class="docstring">
1519
+ <div class="discussion">
1520
+ <p>Match parts off the path as variables. The parts matcher can conform to either a regular expression, or be an Integer, or
1521
+ simply a String.
1522
+ @param[Object] type the type of object to match for. If you supply Integer, this will only match integers in addition to casting your variable for you.
1523
+ @param[Object] default the default value to use if your param cannot be successfully matched.</p>
1524
+
1525
+
1526
+ </div>
1527
+ </div>
1528
+ <div class="tags">
1529
+
1530
+ <div class="examples">
1531
+ <h3>Examples:</h3>
1532
+
1533
+ <h4><div class='inline'>
1534
+ </div></h4>
1535
+ <pre class="example code"><span class='id identifier rubyid_path'>path</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>/</span><span class='tstring_end'>'</span></span> <span class='kw'>do</span>
1536
+ <span class='id identifier rubyid_variable'>variable</span> <span class='lbrace'>{</span> <span class='op'>|</span><span class='id identifier rubyid_id'>id</span><span class='op'>|</span> <span class='id identifier rubyid_halt'>halt</span> <span class='lbracket'>[</span><span class='int'>200</span><span class='comma'>,</span> <span class='lbrace'>{</span><span class='rbrace'>}</span><span class='comma'>,</span> <span class='id identifier rubyid_id'>id</span><span class='rbracket'>]</span> <span class='rbrace'>}</span>
1537
+ <span class='kw'>end</span>
1538
+ <span class='const'>GET</span> <span class='tstring'><span class='regexp_beg'>/</span><span class='regexp_end'>hey #=&gt; [200, {}, 'hey']</span></span></pre>
1539
+
1540
+ <h4><div class='inline'>
1541
+ </div></h4>
1542
+ <pre class="example code"><span class='id identifier rubyid_path'>path</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>/</span><span class='tstring_end'>'</span></span> <span class='kw'>do</span>
1543
+ <span class='id identifier rubyid_variable'>variable</span><span class='lparen'>(</span><span class='symbol'>:integer</span><span class='rparen'>)</span> <span class='lbrace'>{</span> <span class='op'>|</span><span class='id identifier rubyid_id'>id</span><span class='op'>|</span> <span class='id identifier rubyid_halt'>halt</span> <span class='lbracket'>[</span><span class='int'>200</span><span class='comma'>,</span> <span class='lbrace'>{</span><span class='rbrace'>}</span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>This is a numeric id: </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_id'>id</span><span class='rbrace'>}</span><span class='tstring_end'>&quot;</span></span><span class='rbracket'>]</span> <span class='rbrace'>}</span>
1544
+ <span class='kw'>end</span>
1545
+ <span class='const'>GET</span> <span class='tstring'><span class='regexp_beg'>/</span><span class='regexp_end'>123 #=&gt; [200, {}, 'This is a numeric id: 123']</span></span></pre>
1546
+
1547
+ <h4><div class='inline'>
1548
+ </div></h4>
1549
+ <pre class="example code"><span class='id identifier rubyid_path'>path</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>/test</span><span class='tstring_end'>'</span></span> <span class='kw'>do</span>
1550
+ <span class='id identifier rubyid_variable'>variable</span> <span class='lbrace'>{</span> <span class='op'>|</span><span class='id identifier rubyid_foo'>foo</span><span class='comma'>,</span> <span class='id identifier rubyid_bar'>bar</span><span class='op'>|</span> <span class='id identifier rubyid_halt'>halt</span> <span class='lbracket'>[</span><span class='int'>200</span><span class='comma'>,</span> <span class='lbrace'>{</span><span class='rbrace'>}</span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_foo'>foo</span><span class='rbrace'>}</span><span class='tstring_content'>-</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_bar'>bar</span><span class='rbrace'>}</span><span class='tstring_end'>&quot;</span></span><span class='rbracket'>]</span> <span class='rbrace'>}</span>
1551
+ <span class='kw'>end</span>
1552
+ <span class='const'>GET</span> <span class='tstring'><span class='regexp_beg'>/</span><span class='tstring_content'>test</span><span class='regexp_end'>/hey</span></span><span class='op'>/</span><span class='id identifier rubyid_there'>there</span> <span class='comment'>#=&gt; [200, {}, 'hey-there']</span></pre>
1553
+
1554
+ </div>
1555
+
1556
+
1557
+ </div><table class="source_code">
1558
+ <tr>
1559
+ <td>
1560
+ <pre class="lines">
1561
+
1562
+
1563
+ 90
1564
+ 91
1565
+ 92</pre>
1566
+ </td>
1567
+ <td>
1568
+ <pre class="code"><span class="info file"># File 'lib/renee/core/routing.rb', line 90</span>
1569
+
1570
+ <span class='kw'>def</span> <span class='id identifier rubyid_variable'>variable</span><span class='lparen'>(</span><span class='id identifier rubyid_type'>type</span> <span class='op'>=</span> <span class='kw'>nil</span><span class='comma'>,</span> <span class='op'>&amp;</span><span class='id identifier rubyid_blk'>blk</span><span class='rparen'>)</span>
1571
+ <span class='id identifier rubyid_blk'>blk</span> <span class='op'>?</span> <span class='id identifier rubyid_complex_variable'>complex_variable</span><span class='lparen'>(</span><span class='id identifier rubyid_type'>type</span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>/</span><span class='tstring_end'>'</span></span><span class='comma'>,</span> <span class='int'>1</span><span class='comma'>,</span> <span class='op'>&amp;</span><span class='id identifier rubyid_blk'>blk</span><span class='rparen'>)</span> <span class='op'>:</span> <span class='id identifier rubyid_create_chain_proxy'>create_chain_proxy</span><span class='lparen'>(</span><span class='symbol'>:variable</span><span class='comma'>,</span> <span class='id identifier rubyid_type'>type</span><span class='rparen'>)</span>
1572
+ <span class='kw'>end</span></pre>
1573
+ </td>
1574
+ </tr>
1575
+ </table>
1576
+ </div>
1577
+
1578
+ </div>
1579
+
1580
+ </div>
1581
+
1582
+ <div id="footer">
1583
+ Generated on Mon Jan 23 11:10:34 2012 by
1584
+ <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
1585
+ 0.7.4 (ruby-1.9.2).
1586
+ </div>
1587
+
1588
+ </body>
1589
+ </html>