Capcode 0.9.1 → 0.9.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -86,9 +86,9 @@
86
86
  <h3 class="section-bar">Methods</h3>
87
87
 
88
88
  <div class="name-list">
89
- <a href="#M000023">get</a>&nbsp;&nbsp;
90
- <a href="#M000024">options</a>&nbsp;&nbsp;
91
- <a href="#M000022">set</a>&nbsp;&nbsp;
89
+ <a href="#M000024">get</a>&nbsp;&nbsp;
90
+ <a href="#M000025">options</a>&nbsp;&nbsp;
91
+ <a href="#M000023">set</a>&nbsp;&nbsp;
92
92
  </div>
93
93
  </div>
94
94
 
@@ -110,19 +110,19 @@
110
110
  <div id="methods">
111
111
  <h3 class="section-bar">Public Class methods</h3>
112
112
 
113
- <div id="method-M000023" class="method-detail">
114
- <a name="M000023"></a>
113
+ <div id="method-M000024" class="method-detail">
114
+ <a name="M000024"></a>
115
115
 
116
116
  <div class="method-heading">
117
- <a href="#M000023" class="method-signature">
117
+ <a href="#M000024" class="method-signature">
118
118
  <span class="method-name">get</span><span class="method-args">( key = nil )</span>
119
119
  </a>
120
120
  </div>
121
121
 
122
122
  <div class="method-description">
123
123
  <p><a class="source-toggle" href="#"
124
- onclick="toggleCode('M000023-source');return false;">[Source]</a></p>
125
- <div class="method-source-code" id="M000023-source">
124
+ onclick="toggleCode('M000024-source');return false;">[Source]</a></p>
125
+ <div class="method-source-code" id="M000024-source">
126
126
  <pre>
127
127
  <span class="ruby-comment cmt"># File lib/capcode/configuration.rb, line 61</span>
128
128
  61: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">get</span>( <span class="ruby-identifier">key</span> = <span class="ruby-keyword kw">nil</span> )
@@ -137,19 +137,19 @@
137
137
  </div>
138
138
  </div>
139
139
 
140
- <div id="method-M000024" class="method-detail">
141
- <a name="M000024"></a>
140
+ <div id="method-M000025" class="method-detail">
141
+ <a name="M000025"></a>
142
142
 
143
143
  <div class="method-heading">
144
- <a href="#M000024" class="method-signature">
144
+ <a href="#M000025" class="method-signature">
145
145
  <span class="method-name">options</span><span class="method-args">()</span>
146
146
  </a>
147
147
  </div>
148
148
 
149
149
  <div class="method-description">
150
150
  <p><a class="source-toggle" href="#"
151
- onclick="toggleCode('M000024-source');return false;">[Source]</a></p>
152
- <div class="method-source-code" id="M000024-source">
151
+ onclick="toggleCode('M000025-source');return false;">[Source]</a></p>
152
+ <div class="method-source-code" id="M000025-source">
153
153
  <pre>
154
154
  <span class="ruby-comment cmt"># File lib/capcode/configuration.rb, line 69</span>
155
155
  69: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">options</span>
@@ -160,18 +160,18 @@
160
160
  </div>
161
161
  </div>
162
162
 
163
- <div id="method-M000022" class="method-detail">
164
- <a name="M000022"></a>
163
+ <div id="method-M000023" class="method-detail">
164
+ <a name="M000023"></a>
165
165
 
166
166
  <div class="method-heading">
167
- <a href="#M000022" class="method-signature">
167
+ <a href="#M000023" class="method-signature">
168
168
  <span class="method-name">set</span><span class="method-args">( key, value, opts = {} )</span>
169
169
  </a>
170
170
  </div>
171
171
 
172
172
  <div class="method-description">
173
173
  <p>
174
- Set global configuration <a href="Configuration.html#M000024">options</a>
174
+ Set global configuration <a href="Configuration.html#M000025">options</a>
175
175
  </p>
176
176
  <p>
177
177
  Options :
@@ -213,12 +213,12 @@ This is also the working directory !
213
213
 
214
214
  </li>
215
215
  <li><tt>:auth</tt> = HTTP Basic Authentication <a
216
- href="Configuration.html#M000024">options</a>
216
+ href="Configuration.html#M000025">options</a>
217
217
 
218
218
  </li>
219
219
  </ul>
220
220
  <p>
221
- It can exist specifics <a href="Configuration.html#M000024">options</a>
221
+ It can exist specifics <a href="Configuration.html#M000025">options</a>
222
222
  depending on a renderer, a helper, &#8230;
223
223
  </p>
224
224
  <p>
@@ -231,8 +231,8 @@ Example :
231
231
  end
232
232
  </pre>
233
233
  <p><a class="source-toggle" href="#"
234
- onclick="toggleCode('M000022-source');return false;">[Source]</a></p>
235
- <div class="method-source-code" id="M000022-source">
234
+ onclick="toggleCode('M000023-source');return false;">[Source]</a></p>
235
+ <div class="method-source-code" id="M000023-source">
236
236
  <pre>
237
237
  <span class="ruby-comment cmt"># File lib/capcode/configuration.rb, line 52</span>
238
238
  52: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">set</span>( <span class="ruby-identifier">key</span>, <span class="ruby-identifier">value</span>, <span class="ruby-identifier">opts</span> = {} )
@@ -95,14 +95,14 @@ controllers
95
95
  <h3 class="section-bar">Methods</h3>
96
96
 
97
97
  <div class="name-list">
98
- <a href="#M000018">URL</a>&nbsp;&nbsp;
99
- <a href="#M000013">args</a>&nbsp;&nbsp;
100
- <a href="#M000014">args=</a>&nbsp;&nbsp;
101
- <a href="#M000019">content_for</a>&nbsp;&nbsp;
102
- <a href="#M000016">json</a>&nbsp;&nbsp;
103
- <a href="#M000017">redirect</a>&nbsp;&nbsp;
104
- <a href="#M000015">render</a>&nbsp;&nbsp;
105
- <a href="#M000020">static</a>&nbsp;&nbsp;
98
+ <a href="#M000019">URL</a>&nbsp;&nbsp;
99
+ <a href="#M000014">args</a>&nbsp;&nbsp;
100
+ <a href="#M000015">args=</a>&nbsp;&nbsp;
101
+ <a href="#M000020">content_for</a>&nbsp;&nbsp;
102
+ <a href="#M000017">json</a>&nbsp;&nbsp;
103
+ <a href="#M000018">redirect</a>&nbsp;&nbsp;
104
+ <a href="#M000016">render</a>&nbsp;&nbsp;
105
+ <a href="#M000021">static</a>&nbsp;&nbsp;
106
106
  </div>
107
107
  </div>
108
108
 
@@ -137,11 +137,11 @@ controllers
137
137
  <div id="methods">
138
138
  <h3 class="section-bar">Public Class methods</h3>
139
139
 
140
- <div id="method-M000013" class="method-detail">
141
- <a name="M000013"></a>
140
+ <div id="method-M000014" class="method-detail">
141
+ <a name="M000014"></a>
142
142
 
143
143
  <div class="method-heading">
144
- <a href="#M000013" class="method-signature">
144
+ <a href="#M000014" class="method-signature">
145
145
  <span class="method-name">args</span><span class="method-args">()</span>
146
146
  </a>
147
147
  </div>
@@ -151,36 +151,36 @@ controllers
151
151
  @@<em>ARGS</em> = nil
152
152
  </p>
153
153
  <p><a class="source-toggle" href="#"
154
- onclick="toggleCode('M000013-source');return false;">[Source]</a></p>
155
- <div class="method-source-code" id="M000013-source">
154
+ onclick="toggleCode('M000014-source');return false;">[Source]</a></p>
155
+ <div class="method-source-code" id="M000014-source">
156
156
  <pre>
157
- <span class="ruby-comment cmt"># File lib/capcode.rb, line 47</span>
158
- 47: <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">args</span>
159
- 48: <span class="ruby-ivar">@args</span> <span class="ruby-operator">||=</span> <span class="ruby-keyword kw">nil</span>
160
- 49: <span class="ruby-keyword kw">end</span>
157
+ <span class="ruby-comment cmt"># File lib/capcode.rb, line 46</span>
158
+ 46: <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">args</span>
159
+ 47: <span class="ruby-ivar">@args</span> <span class="ruby-operator">||=</span> <span class="ruby-keyword kw">nil</span>
160
+ 48: <span class="ruby-keyword kw">end</span>
161
161
  </pre>
162
162
  </div>
163
163
  </div>
164
164
  </div>
165
165
 
166
- <div id="method-M000014" class="method-detail">
167
- <a name="M000014"></a>
166
+ <div id="method-M000015" class="method-detail">
167
+ <a name="M000015"></a>
168
168
 
169
169
  <div class="method-heading">
170
- <a href="#M000014" class="method-signature">
170
+ <a href="#M000015" class="method-signature">
171
171
  <span class="method-name">args=</span><span class="method-args">(x)</span>
172
172
  </a>
173
173
  </div>
174
174
 
175
175
  <div class="method-description">
176
176
  <p><a class="source-toggle" href="#"
177
- onclick="toggleCode('M000014-source');return false;">[Source]</a></p>
178
- <div class="method-source-code" id="M000014-source">
177
+ onclick="toggleCode('M000015-source');return false;">[Source]</a></p>
178
+ <div class="method-source-code" id="M000015-source">
179
179
  <pre>
180
- <span class="ruby-comment cmt"># File lib/capcode.rb, line 50</span>
181
- 50: <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">args=</span>(<span class="ruby-identifier">x</span>)
182
- 51: <span class="ruby-ivar">@args</span> = <span class="ruby-identifier">x</span>
183
- 52: <span class="ruby-keyword kw">end</span>
180
+ <span class="ruby-comment cmt"># File lib/capcode.rb, line 49</span>
181
+ 49: <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">args=</span>(<span class="ruby-identifier">x</span>)
182
+ 50: <span class="ruby-ivar">@args</span> = <span class="ruby-identifier">x</span>
183
+ 51: <span class="ruby-keyword kw">end</span>
184
184
  </pre>
185
185
  </div>
186
186
  </div>
@@ -188,18 +188,18 @@ controllers
188
188
 
189
189
  <h3 class="section-bar">Public Instance methods</h3>
190
190
 
191
- <div id="method-M000018" class="method-detail">
192
- <a name="M000018"></a>
191
+ <div id="method-M000019" class="method-detail">
192
+ <a name="M000019"></a>
193
193
 
194
194
  <div class="method-heading">
195
- <a href="#M000018" class="method-signature">
195
+ <a href="#M000019" class="method-signature">
196
196
  <span class="method-name">URL</span><span class="method-args">( klass, *a )</span>
197
197
  </a>
198
198
  </div>
199
199
 
200
200
  <div class="method-description">
201
201
  <p>
202
- Builds an <a href="Helpers.html#M000018">URL</a> route to a controller or a
202
+ Builds an <a href="Helpers.html#M000019">URL</a> route to a controller or a
203
203
  path
204
204
  </p>
205
205
  <p>
@@ -219,41 +219,41 @@ then
219
219
  URL( Capcode::Hello, &quot;you&quot; ) # =&gt; /hello/you
220
220
  </pre>
221
221
  <p><a class="source-toggle" href="#"
222
- onclick="toggleCode('M000018-source');return false;">[Source]</a></p>
223
- <div class="method-source-code" id="M000018-source">
222
+ onclick="toggleCode('M000019-source');return false;">[Source]</a></p>
223
+ <div class="method-source-code" id="M000019-source">
224
224
  <pre>
225
- <span class="ruby-comment cmt"># File lib/capcode.rb, line 195</span>
226
- 195: <span class="ruby-keyword kw">def</span> <span class="ruby-constant">URL</span>( <span class="ruby-identifier">klass</span>, <span class="ruby-operator">*</span><span class="ruby-identifier">a</span> )
227
- 196: <span class="ruby-identifier">path</span> = <span class="ruby-keyword kw">nil</span>
228
- 197: <span class="ruby-identifier">a</span> = <span class="ruby-identifier">a</span>.<span class="ruby-identifier">delete_if</span>{ <span class="ruby-operator">|</span><span class="ruby-identifier">x</span><span class="ruby-operator">|</span> <span class="ruby-identifier">x</span>.<span class="ruby-identifier">nil?</span> }
229
- 198:
230
- 199: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">klass</span>.<span class="ruby-identifier">class</span> <span class="ruby-operator">==</span> <span class="ruby-constant">Class</span>
231
- 200: <span class="ruby-constant">Capcode</span>.<span class="ruby-identifier">routes</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">p</span>, <span class="ruby-identifier">k</span><span class="ruby-operator">|</span>
232
- 201: <span class="ruby-identifier">path</span> = <span class="ruby-identifier">p</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">k</span>.<span class="ruby-identifier">class</span> <span class="ruby-operator">==</span> <span class="ruby-identifier">klass</span>
233
- 202: <span class="ruby-keyword kw">end</span>
234
- 203: <span class="ruby-keyword kw">else</span>
235
- 204: <span class="ruby-identifier">path</span> = <span class="ruby-identifier">klass</span>
236
- 205: <span class="ruby-keyword kw">end</span>
237
- 206:
238
- 207: (<span class="ruby-constant">ENV</span>[<span class="ruby-value str">'RACK_BASE_URI'</span>]<span class="ruby-operator">||</span><span class="ruby-value str">''</span>)<span class="ruby-operator">+</span><span class="ruby-identifier">path</span><span class="ruby-operator">+</span>((<span class="ruby-identifier">a</span>.<span class="ruby-identifier">size</span><span class="ruby-operator">&gt;</span><span class="ruby-value">0</span>)<span class="ruby-operator">?</span>(<span class="ruby-value str">&quot;/&quot;</span><span class="ruby-operator">+</span><span class="ruby-identifier">a</span>.<span class="ruby-identifier">join</span>(<span class="ruby-value str">&quot;/&quot;</span>))<span class="ruby-operator">:</span>(<span class="ruby-value str">&quot;&quot;</span>))
239
- 208: <span class="ruby-keyword kw">end</span>
225
+ <span class="ruby-comment cmt"># File lib/capcode.rb, line 213</span>
226
+ 213: <span class="ruby-keyword kw">def</span> <span class="ruby-constant">URL</span>( <span class="ruby-identifier">klass</span>, <span class="ruby-operator">*</span><span class="ruby-identifier">a</span> )
227
+ 214: <span class="ruby-identifier">path</span> = <span class="ruby-keyword kw">nil</span>
228
+ 215: <span class="ruby-identifier">a</span> = <span class="ruby-identifier">a</span>.<span class="ruby-identifier">delete_if</span>{ <span class="ruby-operator">|</span><span class="ruby-identifier">x</span><span class="ruby-operator">|</span> <span class="ruby-identifier">x</span>.<span class="ruby-identifier">nil?</span> }
229
+ 216:
230
+ 217: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">klass</span>.<span class="ruby-identifier">class</span> <span class="ruby-operator">==</span> <span class="ruby-constant">Class</span>
231
+ 218: <span class="ruby-constant">Capcode</span>.<span class="ruby-identifier">routes</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">p</span>, <span class="ruby-identifier">k</span><span class="ruby-operator">|</span>
232
+ 219: <span class="ruby-identifier">path</span> = <span class="ruby-identifier">p</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">k</span>.<span class="ruby-identifier">class</span> <span class="ruby-operator">==</span> <span class="ruby-identifier">klass</span>
233
+ 220: <span class="ruby-keyword kw">end</span>
234
+ 221: <span class="ruby-keyword kw">else</span>
235
+ 222: <span class="ruby-identifier">path</span> = <span class="ruby-identifier">klass</span>
236
+ 223: <span class="ruby-keyword kw">end</span>
237
+ 224:
238
+ 225: (<span class="ruby-constant">ENV</span>[<span class="ruby-value str">'RACK_BASE_URI'</span>]<span class="ruby-operator">||</span><span class="ruby-value str">''</span>)<span class="ruby-operator">+</span><span class="ruby-identifier">path</span><span class="ruby-operator">+</span>((<span class="ruby-identifier">a</span>.<span class="ruby-identifier">size</span><span class="ruby-operator">&gt;</span><span class="ruby-value">0</span>)<span class="ruby-operator">?</span>(<span class="ruby-value str">&quot;/&quot;</span><span class="ruby-operator">+</span><span class="ruby-identifier">a</span>.<span class="ruby-identifier">join</span>(<span class="ruby-value str">&quot;/&quot;</span>))<span class="ruby-operator">:</span>(<span class="ruby-value str">&quot;&quot;</span>))
239
+ 226: <span class="ruby-keyword kw">end</span>
240
240
  </pre>
241
241
  </div>
242
242
  </div>
243
243
  </div>
244
244
 
245
- <div id="method-M000019" class="method-detail">
246
- <a name="M000019"></a>
245
+ <div id="method-M000020" class="method-detail">
246
+ <a name="M000020"></a>
247
247
 
248
248
  <div class="method-heading">
249
- <a href="#M000019" class="method-signature">
249
+ <a href="#M000020" class="method-signature">
250
250
  <span class="method-name">content_for</span><span class="method-args">( x ) {|| ...}</span>
251
251
  </a>
252
252
  </div>
253
253
 
254
254
  <div class="method-description">
255
255
  <p>
256
- Calling <a href="Helpers.html#M000019">content_for</a> stores a block of
256
+ Calling <a href="Helpers.html#M000020">content_for</a> stores a block of
257
257
  markup in an identifier.
258
258
  </p>
259
259
  <pre>
@@ -289,26 +289,26 @@ markup in an identifier.
289
289
  end
290
290
  </pre>
291
291
  <p><a class="source-toggle" href="#"
292
- onclick="toggleCode('M000019-source');return false;">[Source]</a></p>
293
- <div class="method-source-code" id="M000019-source">
292
+ onclick="toggleCode('M000020-source');return false;">[Source]</a></p>
293
+ <div class="method-source-code" id="M000020-source">
294
294
  <pre>
295
- <span class="ruby-comment cmt"># File lib/capcode.rb, line 242</span>
296
- 242: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">content_for</span>( <span class="ruby-identifier">x</span> )
297
- 243: <span class="ruby-comment cmt">#if @@__ARGS__.map{|_| _.to_s }.include?(x.to_s)</span>
298
- 244: <span class="ruby-keyword kw">if</span> <span class="ruby-constant">Capcode</span><span class="ruby-operator">::</span><span class="ruby-constant">Helpers</span>.<span class="ruby-identifier">args</span>.<span class="ruby-identifier">map</span>{<span class="ruby-operator">|</span><span class="ruby-identifier">_</span><span class="ruby-operator">|</span> <span class="ruby-identifier">_</span>.<span class="ruby-identifier">to_s</span> }.<span class="ruby-identifier">include?</span>(<span class="ruby-identifier">x</span>.<span class="ruby-identifier">to_s</span>)
299
- 245: <span class="ruby-keyword kw">yield</span>
300
- 246: <span class="ruby-keyword kw">end</span>
301
- 247: <span class="ruby-keyword kw">end</span>
295
+ <span class="ruby-comment cmt"># File lib/capcode.rb, line 260</span>
296
+ 260: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">content_for</span>( <span class="ruby-identifier">x</span> )
297
+ 261: <span class="ruby-comment cmt">#if @@__ARGS__.map{|_| _.to_s }.include?(x.to_s)</span>
298
+ 262: <span class="ruby-keyword kw">if</span> <span class="ruby-constant">Capcode</span><span class="ruby-operator">::</span><span class="ruby-constant">Helpers</span>.<span class="ruby-identifier">args</span>.<span class="ruby-identifier">map</span>{<span class="ruby-operator">|</span><span class="ruby-identifier">_</span><span class="ruby-operator">|</span> <span class="ruby-identifier">_</span>.<span class="ruby-identifier">to_s</span> }.<span class="ruby-identifier">include?</span>(<span class="ruby-identifier">x</span>.<span class="ruby-identifier">to_s</span>)
299
+ 263: <span class="ruby-keyword kw">yield</span>
300
+ 264: <span class="ruby-keyword kw">end</span>
301
+ 265: <span class="ruby-keyword kw">end</span>
302
302
  </pre>
303
303
  </div>
304
304
  </div>
305
305
  </div>
306
306
 
307
- <div id="method-M000016" class="method-detail">
308
- <a name="M000016"></a>
307
+ <div id="method-M000017" class="method-detail">
308
+ <a name="M000017"></a>
309
309
 
310
310
  <div class="method-heading">
311
- <a href="#M000016" class="method-signature">
311
+ <a href="#M000017" class="method-signature">
312
312
  <span class="method-name">json</span><span class="method-args">( d )</span>
313
313
  </a>
314
314
  </div>
@@ -328,36 +328,35 @@ Help you to return a JSON response
328
328
  </pre>
329
329
  <p>
330
330
  <b>DEPRECATED</b>, please use <tt><a
331
- href="Helpers.html#M000015">render</a>( :<a
332
- href="Helpers.html#M000016">json</a> =&gt; o )</tt>
331
+ href="Helpers.html#M000016">render</a>( :<a
332
+ href="Helpers.html#M000017">json</a> =&gt; o )</tt>
333
333
  </p>
334
334
  <p><a class="source-toggle" href="#"
335
- onclick="toggleCode('M000016-source');return false;">[Source]</a></p>
336
- <div class="method-source-code" id="M000016-source">
335
+ onclick="toggleCode('M000017-source');return false;">[Source]</a></p>
336
+ <div class="method-source-code" id="M000017-source">
337
337
  <pre>
338
- <span class="ruby-comment cmt"># File lib/capcode.rb, line 138</span>
339
- 138: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">json</span>( <span class="ruby-identifier">d</span> ) <span class="ruby-comment cmt">## DELETE THIS IN 1.0.0</span>
340
- 139: <span class="ruby-identifier">warn</span>( <span class="ruby-value str">&quot;json is deprecated and will be removed in version 1.0, please use `render( :json =&gt; ... )'&quot;</span> )
341
- 140: <span class="ruby-ivar">@response</span>[<span class="ruby-value str">'Content-Type'</span>] = <span class="ruby-value str">'application/json'</span>
342
- 141: <span class="ruby-identifier">d</span>.<span class="ruby-identifier">to_json</span>
343
- 142: <span class="ruby-keyword kw">end</span>
338
+ <span class="ruby-comment cmt"># File lib/capcode.rb, line 157</span>
339
+ 157: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">json</span>( <span class="ruby-identifier">d</span> ) <span class="ruby-comment cmt">## DELETE THIS IN 1.0.0</span>
340
+ 158: <span class="ruby-identifier">warn</span>( <span class="ruby-value str">&quot;json is deprecated and will be removed in version 1.0, please use `render( :json =&gt; ... )'&quot;</span> )
341
+ 159: <span class="ruby-identifier">render</span> <span class="ruby-identifier">:json</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">d</span>
342
+ 160: <span class="ruby-keyword kw">end</span>
344
343
  </pre>
345
344
  </div>
346
345
  </div>
347
346
  </div>
348
347
 
349
- <div id="method-M000017" class="method-detail">
350
- <a name="M000017"></a>
348
+ <div id="method-M000018" class="method-detail">
349
+ <a name="M000018"></a>
351
350
 
352
351
  <div class="method-heading">
353
- <a href="#M000017" class="method-signature">
352
+ <a href="#M000018" class="method-signature">
354
353
  <span class="method-name">redirect</span><span class="method-args">( klass, *a )</span>
355
354
  </a>
356
355
  </div>
357
356
 
358
357
  <div class="method-description">
359
358
  <p>
360
- Send a <a href="Helpers.html#M000017">redirect</a> response
359
+ Send a <a href="Helpers.html#M000018">redirect</a> response
361
360
  </p>
362
361
  <pre>
363
362
  module Capcode
@@ -386,7 +385,7 @@ it can be a string path
386
385
  </pre>
387
386
  <p>
388
387
  it can be an http status code (by default <tt><a
389
- href="Helpers.html#M000017">redirect</a></tt> use the http status code 302)
388
+ href="Helpers.html#M000018">redirect</a></tt> use the http status code 302)
390
389
  </p>
391
390
  <pre>
392
391
  redirect( 304, MyController )
@@ -396,30 +395,30 @@ For more informations about HTTP status, see <a
396
395
  href="http://en.wikipedia.org/wiki/List_of_HTTP_status_codes#3xx_Redirection">en.wikipedia.org/wiki/List_of_HTTP_status_codes#3xx_Redirection</a>
397
396
  </p>
398
397
  <p><a class="source-toggle" href="#"
399
- onclick="toggleCode('M000017-source');return false;">[Source]</a></p>
400
- <div class="method-source-code" id="M000017-source">
398
+ onclick="toggleCode('M000018-source');return false;">[Source]</a></p>
399
+ <div class="method-source-code" id="M000018-source">
401
400
  <pre>
402
- <span class="ruby-comment cmt"># File lib/capcode.rb, line 171</span>
403
- 171: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">redirect</span>( <span class="ruby-identifier">klass</span>, <span class="ruby-operator">*</span><span class="ruby-identifier">a</span> )
404
- 172: <span class="ruby-identifier">httpCode</span> = <span class="ruby-value">302</span>
405
- 173:
406
- 174: <span class="ruby-keyword kw">if</span>( <span class="ruby-identifier">klass</span>.<span class="ruby-identifier">class</span> <span class="ruby-operator">==</span> <span class="ruby-constant">Fixnum</span> )
407
- 175: <span class="ruby-identifier">httpCode</span> = <span class="ruby-identifier">klass</span>
408
- 176: <span class="ruby-identifier">klass</span> = <span class="ruby-identifier">a</span>.<span class="ruby-identifier">shift</span>
409
- 177: <span class="ruby-keyword kw">end</span>
410
- 178:
411
- 179: [<span class="ruby-identifier">httpCode</span>, {<span class="ruby-value str">'Location'</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-constant">URL</span>(<span class="ruby-identifier">klass</span>, <span class="ruby-operator">*</span><span class="ruby-identifier">a</span>)}, <span class="ruby-value str">''</span>]
412
- 180: <span class="ruby-keyword kw">end</span>
401
+ <span class="ruby-comment cmt"># File lib/capcode.rb, line 189</span>
402
+ 189: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">redirect</span>( <span class="ruby-identifier">klass</span>, <span class="ruby-operator">*</span><span class="ruby-identifier">a</span> )
403
+ 190: <span class="ruby-identifier">httpCode</span> = <span class="ruby-value">302</span>
404
+ 191:
405
+ 192: <span class="ruby-keyword kw">if</span>( <span class="ruby-identifier">klass</span>.<span class="ruby-identifier">class</span> <span class="ruby-operator">==</span> <span class="ruby-constant">Fixnum</span> )
406
+ 193: <span class="ruby-identifier">httpCode</span> = <span class="ruby-identifier">klass</span>
407
+ 194: <span class="ruby-identifier">klass</span> = <span class="ruby-identifier">a</span>.<span class="ruby-identifier">shift</span>
408
+ 195: <span class="ruby-keyword kw">end</span>
409
+ 196:
410
+ 197: [<span class="ruby-identifier">httpCode</span>, {<span class="ruby-value str">'Location'</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-constant">URL</span>(<span class="ruby-identifier">klass</span>, <span class="ruby-operator">*</span><span class="ruby-identifier">a</span>)}, <span class="ruby-value str">''</span>]
411
+ 198: <span class="ruby-keyword kw">end</span>
413
412
  </pre>
414
413
  </div>
415
414
  </div>
416
415
  </div>
417
416
 
418
- <div id="method-M000015" class="method-detail">
419
- <a name="M000015"></a>
417
+ <div id="method-M000016" class="method-detail">
418
+ <a name="M000016"></a>
420
419
 
421
420
  <div class="method-heading">
422
- <a href="#M000015" class="method-signature">
421
+ <a href="#M000016" class="method-signature">
423
422
  <span class="method-name">render</span><span class="method-args">( hash )</span>
424
423
  </a>
425
424
  </div>
@@ -429,7 +428,7 @@ href="http://en.wikipedia.org/wiki/List_of_HTTP_status_codes#3xx_Redirection">en
429
428
  Render a view
430
429
  </p>
431
430
  <p>
432
- <a href="Helpers.html#M000015">render</a>&#8216;s parameter can be a Hash
431
+ <a href="Helpers.html#M000016">render</a>&#8216;s parameter can be a Hash
433
432
  or a string. Passing a string is equivalent to do
434
433
  </p>
435
434
  <pre>
@@ -458,13 +457,13 @@ exist in sass_path
458
457
  <li>:text =&gt; &quot;my text&quot;
459
458
 
460
459
  </li>
461
- <li>:<a href="Helpers.html#M000016">json</a> =&gt; MyObject : this suppose
460
+ <li>:<a href="Helpers.html#M000017">json</a> =&gt; MyObject : this suppose
462
461
  that&#8216;s MyObject respond to .to_json
463
462
 
464
463
  </li>
465
- <li>:<a href="Helpers.html#M000020">static</a> =&gt; &quot;my_file.xxx&quot; :
464
+ <li>:<a href="Helpers.html#M000021">static</a> =&gt; &quot;my_file.xxx&quot; :
466
465
  this suppose that&#8216;s my_file.xxx exist in the <a
467
- href="Helpers.html#M000020">static</a> directory
466
+ href="Helpers.html#M000021">static</a> directory
468
467
 
469
468
  </li>
470
469
  <li>:xml =&gt; :my_func : :my_func must be defined in <a
@@ -476,6 +475,12 @@ href="Views.html">Capcode::Views</a>
476
475
  </li>
477
476
  </ul>
478
477
  <p>
478
+ Or you can use a &quot;HTTP code&quot; renderer :
479
+ </p>
480
+ <pre>
481
+ render 200 =&gt; &quot;Ok&quot;, :server =&gt; &quot;Capcode #{Capcode::CAPCOD_VERION}&quot;, ...
482
+ </pre>
483
+ <p>
479
484
  If you want to use a specific layout, you can specify it with option
480
485
  </p>
481
486
  <pre>
@@ -497,96 +502,112 @@ If you use the WebDav renderer, you can use the option
497
502
  :resource_class (see http://github.com/georgi/rack_dav for more informations)
498
503
  </pre>
499
504
  <p><a class="source-toggle" href="#"
500
- onclick="toggleCode('M000015-source');return false;">[Source]</a></p>
501
- <div class="method-source-code" id="M000015-source">
505
+ onclick="toggleCode('M000016-source');return false;">[Source]</a></p>
506
+ <div class="method-source-code" id="M000016-source">
502
507
  <pre>
503
- <span class="ruby-comment cmt"># File lib/capcode.rb, line 80</span>
504
- 80: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">render</span>( <span class="ruby-identifier">hash</span> )
505
- 81: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">hash</span>.<span class="ruby-identifier">class</span> <span class="ruby-operator">==</span> <span class="ruby-constant">Hash</span>
506
- 82: <span class="ruby-identifier">render_type</span> = <span class="ruby-keyword kw">nil</span>
507
- 83:
508
- 84: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">render_type</span>.<span class="ruby-identifier">nil?</span>
509
- 85: <span class="ruby-identifier">hash</span>.<span class="ruby-identifier">keys</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">key</span><span class="ruby-operator">|</span>
510
- 86: <span class="ruby-keyword kw">begin</span>
511
- 87: <span class="ruby-identifier">gem</span> <span class="ruby-node">&quot;capcode-render-#{key.to_s}&quot;</span>
512
- 88: <span class="ruby-identifier">require</span> <span class="ruby-node">&quot;capcode/render/#{key.to_s}&quot;</span>
513
- 89: <span class="ruby-keyword kw">rescue</span> <span class="ruby-constant">Gem</span><span class="ruby-operator">::</span><span class="ruby-constant">LoadError</span>
514
- 90: <span class="ruby-keyword kw">nil</span>
515
- 91: <span class="ruby-keyword kw">rescue</span> <span class="ruby-constant">LoadError</span>
516
- 92: <span class="ruby-identifier">raise</span> <span class="ruby-constant">Capcode</span><span class="ruby-operator">::</span><span class="ruby-constant">RenderError</span>, <span class="ruby-node">&quot;Hum... The #{key} renderer is malformated! Please try to install a new version or use an other renderer!&quot;</span>, <span class="ruby-identifier">caller</span>
517
- 93: <span class="ruby-keyword kw">end</span>
518
- 94:
519
- 95: <span class="ruby-keyword kw">if</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">respond_to?</span>(<span class="ruby-node">&quot;render_#{key.to_s}&quot;</span>)
520
- 96: <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">render_type</span>.<span class="ruby-identifier">nil?</span>
521
- 97: <span class="ruby-identifier">raise</span> <span class="ruby-constant">Capcode</span><span class="ruby-operator">::</span><span class="ruby-constant">RenderError</span>, <span class="ruby-node">&quot;Can't use multiple renderer (`#{render_type}' and `#{key}') !&quot;</span>, <span class="ruby-identifier">caller</span>
522
- 98: <span class="ruby-keyword kw">end</span>
523
- 99: <span class="ruby-identifier">render_type</span> = <span class="ruby-identifier">key</span>
524
- 100: <span class="ruby-keyword kw">end</span>
525
- 101: <span class="ruby-keyword kw">end</span>
526
- 102:
527
- 103: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">render_type</span>.<span class="ruby-identifier">nil?</span>
528
- 104: <span class="ruby-identifier">raise</span> <span class="ruby-constant">Capcode</span><span class="ruby-operator">::</span><span class="ruby-constant">RenderError</span>, <span class="ruby-value str">&quot;Renderer type not specified!&quot;</span>, <span class="ruby-identifier">caller</span>
529
- 105: <span class="ruby-keyword kw">end</span>
530
- 106: <span class="ruby-keyword kw">end</span>
531
- 107: <span class="ruby-keyword kw">unless</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">respond_to?</span>(<span class="ruby-node">&quot;render_#{render_type.to_s}&quot;</span>)
532
- 108: <span class="ruby-identifier">raise</span> <span class="ruby-constant">Capcode</span><span class="ruby-operator">::</span><span class="ruby-constant">RenderError</span>, <span class="ruby-node">&quot;#{render_type} renderer not present ! please require 'capcode/render/#{render_type}'&quot;</span>, <span class="ruby-identifier">caller</span>
533
- 109: <span class="ruby-keyword kw">end</span>
534
- 110:
535
- 111: <span class="ruby-identifier">render_name</span> = <span class="ruby-identifier">hash</span>.<span class="ruby-identifier">delete</span>(<span class="ruby-identifier">render_type</span>)
536
- 112: <span class="ruby-identifier">content_type</span> = <span class="ruby-identifier">hash</span>.<span class="ruby-identifier">delete</span>(<span class="ruby-identifier">:content_type</span>)
537
- 113: <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">content_type</span>.<span class="ruby-identifier">nil?</span>
538
- 114: <span class="ruby-ivar">@response</span>[<span class="ruby-value str">'Content-Type'</span>] = <span class="ruby-identifier">content_type</span>
539
- 115: <span class="ruby-keyword kw">end</span>
540
- 116:
541
- 117: <span class="ruby-keyword kw">begin</span>
542
- 118: <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">send</span>( <span class="ruby-node">&quot;render_#{render_type.to_s}&quot;</span>, <span class="ruby-identifier">render_name</span>, <span class="ruby-identifier">hash</span> )
543
- 119: <span class="ruby-keyword kw">rescue</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">e</span>
544
- 120: <span class="ruby-identifier">raise</span> <span class="ruby-constant">Capcode</span><span class="ruby-operator">::</span><span class="ruby-constant">RenderError</span>, <span class="ruby-node">&quot;Error rendering `#{render_type.to_s}' : #{e.message}&quot;</span>, <span class="ruby-identifier">caller</span>
545
- 121: <span class="ruby-keyword kw">end</span>
546
- 122: <span class="ruby-keyword kw">else</span>
547
- 123: <span class="ruby-identifier">render</span>( <span class="ruby-identifier">:text</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">hash</span> )
548
- 124: <span class="ruby-keyword kw">end</span>
549
- 125: <span class="ruby-keyword kw">end</span>
508
+ <span class="ruby-comment cmt"># File lib/capcode.rb, line 83</span>
509
+ 83: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">render</span>( <span class="ruby-identifier">hash</span> )
510
+ 84: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">hash</span>.<span class="ruby-identifier">class</span> <span class="ruby-operator">==</span> <span class="ruby-constant">Hash</span>
511
+ 85: <span class="ruby-identifier">render_type</span> = <span class="ruby-keyword kw">nil</span>
512
+ 86: <span class="ruby-identifier">possible_code_renderer</span> = <span class="ruby-keyword kw">nil</span>
513
+ 87:
514
+ 88: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">render_type</span>.<span class="ruby-identifier">nil?</span>
515
+ 89: <span class="ruby-identifier">hash</span>.<span class="ruby-identifier">keys</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">key</span><span class="ruby-operator">|</span>
516
+ 90: <span class="ruby-keyword kw">begin</span>
517
+ 91: <span class="ruby-identifier">gem</span> <span class="ruby-node">&quot;capcode-render-#{key.to_s}&quot;</span>
518
+ 92: <span class="ruby-identifier">require</span> <span class="ruby-node">&quot;capcode/render/#{key.to_s}&quot;</span>
519
+ 93: <span class="ruby-keyword kw">rescue</span> <span class="ruby-constant">Gem</span><span class="ruby-operator">::</span><span class="ruby-constant">LoadError</span>
520
+ 94: <span class="ruby-keyword kw">nil</span>
521
+ 95: <span class="ruby-keyword kw">rescue</span> <span class="ruby-constant">LoadError</span>
522
+ 96: <span class="ruby-identifier">raise</span> <span class="ruby-constant">Capcode</span><span class="ruby-operator">::</span><span class="ruby-constant">RenderError</span>, <span class="ruby-node">&quot;Hum... The #{key} renderer is malformated! Please try to install a new version or use an other renderer!&quot;</span>, <span class="ruby-identifier">caller</span>
523
+ 97: <span class="ruby-keyword kw">end</span>
524
+ 98:
525
+ 99: <span class="ruby-keyword kw">if</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">respond_to?</span>(<span class="ruby-node">&quot;render_#{key.to_s}&quot;</span>)
526
+ 100: <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">render_type</span>.<span class="ruby-identifier">nil?</span>
527
+ 101: <span class="ruby-identifier">raise</span> <span class="ruby-constant">Capcode</span><span class="ruby-operator">::</span><span class="ruby-constant">RenderError</span>, <span class="ruby-node">&quot;Can't use multiple renderer (`#{render_type}' and `#{key}') !&quot;</span>, <span class="ruby-identifier">caller</span>
528
+ 102: <span class="ruby-keyword kw">end</span>
529
+ 103: <span class="ruby-identifier">render_type</span> = <span class="ruby-identifier">key</span>
530
+ 104: <span class="ruby-keyword kw">end</span>
531
+ 105:
532
+ 106: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">key</span>.<span class="ruby-identifier">class</span> <span class="ruby-operator">==</span> <span class="ruby-constant">Fixnum</span>
533
+ 107: <span class="ruby-identifier">possible_code_renderer</span> = <span class="ruby-identifier">key</span>
534
+ 108: <span class="ruby-keyword kw">end</span>
535
+ 109: <span class="ruby-keyword kw">end</span>
536
+ 110:
537
+ 111: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">render_type</span>.<span class="ruby-identifier">nil?</span> <span class="ruby-keyword kw">and</span> <span class="ruby-identifier">possible_code_renderer</span>.<span class="ruby-identifier">nil?</span>
538
+ 112: <span class="ruby-identifier">raise</span> <span class="ruby-constant">Capcode</span><span class="ruby-operator">::</span><span class="ruby-constant">RenderError</span>, <span class="ruby-value str">&quot;Renderer type not specified!&quot;</span>, <span class="ruby-identifier">caller</span>
539
+ 113: <span class="ruby-keyword kw">end</span>
540
+ 114: <span class="ruby-keyword kw">end</span>
541
+ 115: <span class="ruby-keyword kw">unless</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">respond_to?</span>(<span class="ruby-node">&quot;render_#{render_type.to_s}&quot;</span>)
542
+ 116: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">possible_code_renderer</span>.<span class="ruby-identifier">nil?</span>
543
+ 117: <span class="ruby-identifier">raise</span> <span class="ruby-constant">Capcode</span><span class="ruby-operator">::</span><span class="ruby-constant">RenderError</span>, <span class="ruby-node">&quot;#{render_type} renderer not present ! please require 'capcode/render/#{render_type}'&quot;</span>, <span class="ruby-identifier">caller</span>
544
+ 118: <span class="ruby-keyword kw">else</span>
545
+ 119: <span class="ruby-identifier">code</span> = <span class="ruby-identifier">possible_code_renderer</span>
546
+ 120: <span class="ruby-identifier">body</span> = <span class="ruby-identifier">hash</span>.<span class="ruby-identifier">delete</span>(<span class="ruby-identifier">possible_code_renderer</span>)
547
+ 121: <span class="ruby-identifier">header</span> = {}
548
+ 122: <span class="ruby-identifier">hash</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">k</span>, <span class="ruby-identifier">v</span><span class="ruby-operator">|</span>
549
+ 123: <span class="ruby-identifier">k</span> = <span class="ruby-identifier">k</span>.<span class="ruby-identifier">to_s</span>.<span class="ruby-identifier">split</span>(<span class="ruby-regexp re">/_/</span>).<span class="ruby-identifier">map</span>{<span class="ruby-operator">|</span><span class="ruby-identifier">e</span><span class="ruby-operator">|</span> <span class="ruby-identifier">e</span>.<span class="ruby-identifier">capitalize</span>}.<span class="ruby-identifier">join</span>(<span class="ruby-value str">&quot;-&quot;</span>)
550
+ 124: <span class="ruby-identifier">header</span>[<span class="ruby-identifier">k</span>] = <span class="ruby-identifier">v</span>
551
+ 125: <span class="ruby-keyword kw">end</span>
552
+ 126: [<span class="ruby-identifier">code</span>, <span class="ruby-identifier">hash</span>, <span class="ruby-identifier">body</span>]
553
+ 127: <span class="ruby-keyword kw">end</span>
554
+ 128: <span class="ruby-keyword kw">else</span>
555
+ 129: <span class="ruby-identifier">render_name</span> = <span class="ruby-identifier">hash</span>.<span class="ruby-identifier">delete</span>(<span class="ruby-identifier">render_type</span>)
556
+ 130: <span class="ruby-identifier">content_type</span> = <span class="ruby-identifier">hash</span>.<span class="ruby-identifier">delete</span>(<span class="ruby-identifier">:content_type</span>)
557
+ 131: <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">content_type</span>.<span class="ruby-identifier">nil?</span>
558
+ 132: <span class="ruby-ivar">@response</span>[<span class="ruby-value str">'Content-Type'</span>] = <span class="ruby-identifier">content_type</span>
559
+ 133: <span class="ruby-keyword kw">end</span>
560
+ 134:
561
+ 135: <span class="ruby-keyword kw">begin</span>
562
+ 136: <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">send</span>( <span class="ruby-node">&quot;render_#{render_type.to_s}&quot;</span>, <span class="ruby-identifier">render_name</span>, <span class="ruby-identifier">hash</span> )
563
+ 137: <span class="ruby-keyword kw">rescue</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">e</span>
564
+ 138: <span class="ruby-identifier">raise</span> <span class="ruby-constant">Capcode</span><span class="ruby-operator">::</span><span class="ruby-constant">RenderError</span>, <span class="ruby-node">&quot;Error rendering `#{render_type.to_s}' : #{e.message}&quot;</span>, <span class="ruby-identifier">caller</span>
565
+ 139: <span class="ruby-keyword kw">end</span>
566
+ 140: <span class="ruby-keyword kw">end</span>
567
+ 141: <span class="ruby-keyword kw">else</span>
568
+ 142: <span class="ruby-identifier">render</span>( <span class="ruby-identifier">:text</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">hash</span> )
569
+ 143: <span class="ruby-keyword kw">end</span>
570
+ 144: <span class="ruby-keyword kw">end</span>
550
571
  </pre>
551
572
  </div>
552
573
  </div>
553
574
  </div>
554
575
 
555
- <div id="method-M000020" class="method-detail">
556
- <a name="M000020"></a>
576
+ <div id="method-M000021" class="method-detail">
577
+ <a name="M000021"></a>
557
578
 
558
579
  <div class="method-heading">
559
- <a href="#M000020" class="method-signature">
580
+ <a href="#M000021" class="method-signature">
560
581
  <span class="method-name">static</span><span class="method-args">()</span>
561
582
  </a>
562
583
  </div>
563
584
 
564
585
  <div class="method-description">
565
586
  <p>
566
- Return information about the <a href="Helpers.html#M000020">static</a>
587
+ Return information about the <a href="Helpers.html#M000021">static</a>
567
588
  directory
568
589
  </p>
569
590
  <ul>
570
- <li><tt><a href="Helpers.html#M000020">static</a>[:uri]</tt> give the <a
571
- href="Helpers.html#M000020">static</a> URI
591
+ <li><tt><a href="Helpers.html#M000021">static</a>[:uri]</tt> give the <a
592
+ href="Helpers.html#M000021">static</a> URI
572
593
 
573
594
  </li>
574
- <li><tt><a href="Helpers.html#M000020">static</a>[:path]</tt> give the path to
575
- the <a href="Helpers.html#M000020">static</a> directory on the server
595
+ <li><tt><a href="Helpers.html#M000021">static</a>[:path]</tt> give the path to
596
+ the <a href="Helpers.html#M000021">static</a> directory on the server
576
597
 
577
598
  </li>
578
599
  </ul>
579
600
  <p><a class="source-toggle" href="#"
580
- onclick="toggleCode('M000020-source');return false;">[Source]</a></p>
581
- <div class="method-source-code" id="M000020-source">
601
+ onclick="toggleCode('M000021-source');return false;">[Source]</a></p>
602
+ <div class="method-source-code" id="M000021-source">
582
603
  <pre>
583
- <span class="ruby-comment cmt"># File lib/capcode.rb, line 253</span>
584
- 253: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">static</span>
585
- 254: {
586
- 255: <span class="ruby-identifier">:uri</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-constant">Capcode</span>.<span class="ruby-identifier">static</span>,
587
- 256: <span class="ruby-identifier">:path</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-constant">File</span>.<span class="ruby-identifier">expand_path</span>( <span class="ruby-constant">File</span>.<span class="ruby-identifier">join</span>(<span class="ruby-value str">&quot;.&quot;</span>, <span class="ruby-constant">Capcode</span>.<span class="ruby-identifier">static</span> ) )
588
- 257: }
589
- 258: <span class="ruby-keyword kw">end</span>
604
+ <span class="ruby-comment cmt"># File lib/capcode.rb, line 271</span>
605
+ 271: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">static</span>
606
+ 272: {
607
+ 273: <span class="ruby-identifier">:uri</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-constant">Capcode</span>.<span class="ruby-identifier">static</span>,
608
+ 274: <span class="ruby-identifier">:path</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-constant">File</span>.<span class="ruby-identifier">expand_path</span>( <span class="ruby-constant">File</span>.<span class="ruby-identifier">join</span>(<span class="ruby-value str">&quot;.&quot;</span>, <span class="ruby-constant">Capcode</span>.<span class="ruby-identifier">static</span> ) )
609
+ 275: }
610
+ 276: <span class="ruby-keyword kw">end</span>
590
611
  </pre>
591
612
  </div>
592
613
  </div>