jqr-helpers 1.0.5 → 1.0.6

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,461 @@
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
+ Class: JqrHelpers::Helpers::PanelRenderer
8
+
9
+ &mdash; Documentation by YARD 0.8.7.3
10
+
11
+ </title>
12
+
13
+ <link rel="stylesheet" href="../../css/style.css" type="text/css" charset="utf-8" />
14
+
15
+ <link rel="stylesheet" href="../../css/common.css" type="text/css" charset="utf-8" />
16
+
17
+ <script type="text/javascript" charset="utf-8">
18
+ hasFrames = window.top.frames.main ? true : false;
19
+ relpath = '../../';
20
+ framesUrl = "../../frames.html#!" + escape(window.location.href);
21
+ </script>
22
+
23
+
24
+ <script type="text/javascript" charset="utf-8" src="../../js/jquery.js"></script>
25
+
26
+ <script type="text/javascript" charset="utf-8" src="../../js/app.js"></script>
27
+
28
+
29
+ </head>
30
+ <body>
31
+ <div id="header">
32
+ <div id="menu">
33
+
34
+ <a href="../../_index.html">Index (P)</a> &raquo;
35
+ <span class='title'><span class='object_link'><a href="../../JqrHelpers.html" title="JqrHelpers (module)">JqrHelpers</a></span></span> &raquo; <span class='title'><span class='object_link'><a href="../Helpers.html" title="JqrHelpers::Helpers (module)">Helpers</a></span></span>
36
+ &raquo;
37
+ <span class="title">PanelRenderer</span>
38
+
39
+
40
+ <div class="noframes"><span class="title">(</span><a href="." target="_top">no frames</a><span class="title">)</span></div>
41
+ </div>
42
+
43
+ <div id="search">
44
+
45
+ <a class="full_list_link" id="class_list_link"
46
+ href="../../class_list.html">
47
+ Class List
48
+ </a>
49
+
50
+ <a class="full_list_link" id="method_list_link"
51
+ href="../../method_list.html">
52
+ Method List
53
+ </a>
54
+
55
+ <a class="full_list_link" id="file_list_link"
56
+ href="../../file_list.html">
57
+ File List
58
+ </a>
59
+
60
+ </div>
61
+ <div class="clear"></div>
62
+ </div>
63
+
64
+ <iframe id="search_frame"></iframe>
65
+
66
+ <div id="content"><h1>Class: JqrHelpers::Helpers::PanelRenderer
67
+
68
+
69
+
70
+ </h1>
71
+
72
+ <dl class="box">
73
+
74
+ <dt class="r1">Inherits:</dt>
75
+ <dd class="r1">
76
+ <span class="inheritName">Object</span>
77
+
78
+ <ul class="fullTree">
79
+ <li>Object</li>
80
+
81
+ <li class="next">JqrHelpers::Helpers::PanelRenderer</li>
82
+
83
+ </ul>
84
+ <a href="#" class="inheritanceTree">show all</a>
85
+
86
+ </dd>
87
+
88
+
89
+
90
+
91
+
92
+
93
+
94
+
95
+
96
+ <dt class="r2 last">Defined in:</dt>
97
+ <dd class="r2 last">lib/jqr-helpers/helpers.rb</dd>
98
+
99
+ </dl>
100
+ <div class="clear"></div>
101
+
102
+ <h2>Overview</h2><div class="docstring">
103
+ <div class="discussion">
104
+
105
+ <p>A renderer used for tabs, accordions, etc.</p>
106
+
107
+
108
+ </div>
109
+ </div>
110
+ <div class="tags">
111
+
112
+
113
+ </div>
114
+
115
+
116
+
117
+ <h2>Instance Attribute Summary <small>(<a href="#" class="summary_toggle">collapse</a>)</small></h2>
118
+ <ul class="summary">
119
+
120
+ <li class="public ">
121
+ <span class="summary_signature">
122
+
123
+ <a href="#panels-instance_method" title="#panels (instance method)">- (Array&lt;Hash&gt;) <strong>panels</strong> </a>
124
+
125
+
126
+
127
+ </span>
128
+
129
+
130
+
131
+
132
+
133
+
134
+
135
+
136
+
137
+
138
+
139
+
140
+ <span class="summary_desc"><div class='inline'></div></span>
141
+
142
+ </li>
143
+
144
+
145
+ </ul>
146
+
147
+
148
+
149
+
150
+
151
+ <h2>
152
+ Instance Method Summary
153
+ <small>(<a href="#" class="summary_toggle">collapse</a>)</small>
154
+ </h2>
155
+
156
+ <ul class="summary">
157
+
158
+ <li class="public ">
159
+ <span class="summary_signature">
160
+
161
+ <a href="#initialize-instance_method" title="#initialize (instance method)">- (PanelRenderer) <strong>initialize</strong> </a>
162
+
163
+
164
+
165
+ </span>
166
+
167
+
168
+ <span class="note title constructor">constructor</span>
169
+
170
+
171
+
172
+
173
+
174
+
175
+
176
+
177
+ <span class="summary_desc"><div class='inline'>
178
+ <p>A new instance of PanelRenderer.</p>
179
+ </div></span>
180
+
181
+ </li>
182
+
183
+
184
+ <li class="public ">
185
+ <span class="summary_signature">
186
+
187
+ <a href="#panel-instance_method" title="#panel (instance method)">- (Object) <strong>panel</strong>(title, url_or_options = {}, options = {}, &amp;block) </a>
188
+
189
+
190
+
191
+ </span>
192
+
193
+
194
+
195
+
196
+
197
+
198
+
199
+
200
+
201
+ <span class="summary_desc"><div class='inline'>
202
+ <p>Render a panel in the parent container.</p>
203
+ </div></span>
204
+
205
+ </li>
206
+
207
+
208
+ </ul>
209
+
210
+
211
+ <div id="constructor_details" class="method_details_list">
212
+ <h2>Constructor Details</h2>
213
+
214
+ <div class="method_details first">
215
+ <h3 class="signature first" id="initialize-instance_method">
216
+
217
+ - (<tt><span class='object_link'><a href="" title="JqrHelpers::Helpers::PanelRenderer (class)">PanelRenderer</a></span></tt>) <strong>initialize</strong>
218
+
219
+
220
+
221
+
222
+
223
+ </h3><div class="docstring">
224
+ <div class="discussion">
225
+
226
+ <p>Returns a new instance of PanelRenderer</p>
227
+
228
+
229
+ </div>
230
+ </div>
231
+ <div class="tags">
232
+
233
+
234
+ </div><table class="source_code">
235
+ <tr>
236
+ <td>
237
+ <pre class="lines">
238
+
239
+
240
+ 12
241
+ 13
242
+ 14</pre>
243
+ </td>
244
+ <td>
245
+ <pre class="code"><span class="info file"># File 'lib/jqr-helpers/helpers.rb', line 12</span>
246
+
247
+ <span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span>
248
+ <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_panels'>panels</span> <span class='op'>=</span> <span class='lbracket'>[</span><span class='rbracket'>]</span>
249
+ <span class='kw'>end</span></pre>
250
+ </td>
251
+ </tr>
252
+ </table>
253
+ </div>
254
+
255
+ </div>
256
+
257
+ <div id="instance_attr_details" class="attr_details">
258
+ <h2>Instance Attribute Details</h2>
259
+
260
+
261
+ <span id="panels=-instance_method"></span>
262
+ <div class="method_details first">
263
+ <h3 class="signature first" id="panels-instance_method">
264
+
265
+ - (<tt>Array&lt;Hash&gt;</tt>) <strong>panels</strong>
266
+
267
+
268
+
269
+
270
+
271
+ </h3><div class="docstring">
272
+ <div class="discussion">
273
+
274
+
275
+ </div>
276
+ </div>
277
+ <div class="tags">
278
+
279
+ <p class="tag_title">Returns:</p>
280
+ <ul class="return">
281
+
282
+ <li>
283
+
284
+
285
+ <span class='type'>(<tt>Array&lt;Hash&gt;</tt>)</span>
286
+
287
+
288
+
289
+ </li>
290
+
291
+ </ul>
292
+
293
+ </div><table class="source_code">
294
+ <tr>
295
+ <td>
296
+ <pre class="lines">
297
+
298
+
299
+ 10
300
+ 11
301
+ 12</pre>
302
+ </td>
303
+ <td>
304
+ <pre class="code"><span class="info file"># File 'lib/jqr-helpers/helpers.rb', line 10</span>
305
+
306
+ <span class='kw'>def</span> <span class='id identifier rubyid_panels'>panels</span>
307
+ <span class='ivar'>@panels</span>
308
+ <span class='kw'>end</span></pre>
309
+ </td>
310
+ </tr>
311
+ </table>
312
+ </div>
313
+
314
+ </div>
315
+
316
+
317
+ <div id="instance_method_details" class="method_details_list">
318
+ <h2>Instance Method Details</h2>
319
+
320
+
321
+ <div class="method_details first">
322
+ <h3 class="signature first" id="panel-instance_method">
323
+
324
+ - (<tt>Object</tt>) <strong>panel</strong>(title, url_or_options = {}, options = {}, &amp;block)
325
+
326
+
327
+
328
+
329
+
330
+ </h3><div class="docstring">
331
+ <div class="discussion">
332
+
333
+ <p>Render a panel in the parent container. The panel must have either a URL or
334
+ a block containing content.</p>
335
+
336
+
337
+ </div>
338
+ </div>
339
+ <div class="tags">
340
+ <p class="tag_title">Parameters:</p>
341
+ <ul class="param">
342
+
343
+ <li>
344
+
345
+ <span class='name'>title</span>
346
+
347
+
348
+ <span class='type'>(<tt>String</tt>)</span>
349
+
350
+
351
+
352
+ </li>
353
+
354
+ <li>
355
+
356
+ <span class='name'>url_or_options</span>
357
+
358
+
359
+ <span class='type'>(<tt>String|Hash</tt>)</span>
360
+
361
+
362
+ <em class="default">(defaults to: <tt>{}</tt>)</em>
363
+
364
+
365
+ &mdash;
366
+ <div class='inline'>
367
+ <p>If a URL is given, it will be here and the options will be the next
368
+ parameter. If a block is given, this will be the option hash. Options will
369
+ be passed as is into the HTML &lt;li&gt; tag.</p>
370
+ </div>
371
+
372
+ </li>
373
+
374
+ <li>
375
+
376
+ <span class='name'>options</span>
377
+
378
+
379
+ <span class='type'>(<tt>Hash</tt>)</span>
380
+
381
+
382
+ <em class="default">(defaults to: <tt>{}</tt>)</em>
383
+
384
+
385
+ &mdash;
386
+ <div class='inline'>
387
+ <p>the options if a URL is given.</p>
388
+ </div>
389
+
390
+ </li>
391
+
392
+ </ul>
393
+
394
+
395
+ </div><table class="source_code">
396
+ <tr>
397
+ <td>
398
+ <pre class="lines">
399
+
400
+
401
+ 24
402
+ 25
403
+ 26
404
+ 27
405
+ 28
406
+ 29
407
+ 30
408
+ 31
409
+ 32
410
+ 33
411
+ 34
412
+ 35
413
+ 36
414
+ 37
415
+ 38
416
+ 39
417
+ 40
418
+ 41
419
+ 42
420
+ 43</pre>
421
+ </td>
422
+ <td>
423
+ <pre class="code"><span class="info file"># File 'lib/jqr-helpers/helpers.rb', line 24</span>
424
+
425
+ <span class='kw'>def</span> <span class='id identifier rubyid_panel'>panel</span><span class='lparen'>(</span><span class='id identifier rubyid_title'>title</span><span class='comma'>,</span> <span class='id identifier rubyid_url_or_options'>url_or_options</span><span class='op'>=</span><span class='lbrace'>{</span><span class='rbrace'>}</span><span class='comma'>,</span> <span class='id identifier rubyid_options'>options</span><span class='op'>=</span><span class='lbrace'>{</span><span class='rbrace'>}</span><span class='comma'>,</span> <span class='op'>&amp;</span><span class='id identifier rubyid_block'>block</span><span class='rparen'>)</span>
426
+ <span class='kw'>if</span> <span class='id identifier rubyid_url_or_options'>url_or_options</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>
427
+ <span class='id identifier rubyid_url'>url</span> <span class='op'>=</span> <span class='id identifier rubyid_url_or_options'>url_or_options</span>
428
+ <span class='id identifier rubyid_content'>content</span> <span class='op'>=</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_end'>'</span></span>
429
+ <span class='id identifier rubyid_id'>id</span> <span class='op'>=</span> <span class='kw'>nil</span>
430
+ <span class='kw'>else</span>
431
+ <span class='id identifier rubyid_options'>options</span> <span class='op'>=</span> <span class='id identifier rubyid_url_or_options'>url_or_options</span>
432
+ <span class='id identifier rubyid_content'>content</span> <span class='op'>=</span> <span class='kw'>yield</span>
433
+ <span class='id identifier rubyid_id'>id</span> <span class='op'>=</span> <span class='id identifier rubyid__random_string'>_random_string</span>
434
+ <span class='id identifier rubyid_url'>url</span> <span class='op'>=</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>#</span><span class='tstring_end'>'</span></span> <span class='op'>+</span> <span class='id identifier rubyid_id'>id</span>
435
+ <span class='kw'>end</span>
436
+ <span class='id identifier rubyid_options'>options</span><span class='period'>.</span><span class='id identifier rubyid_merge!'>merge!</span><span class='lparen'>(</span><span class='symbol'>:id</span> <span class='op'>=&gt;</span> <span class='id identifier rubyid_id'>id</span><span class='rparen'>)</span>
437
+ <span class='id identifier rubyid_panels'>panels</span> <span class='op'>&lt;&lt;</span> <span class='lbrace'>{</span>
438
+ <span class='symbol'>:title</span> <span class='op'>=&gt;</span> <span class='id identifier rubyid_title'>title</span><span class='comma'>,</span>
439
+ <span class='symbol'>:url</span> <span class='op'>=&gt;</span> <span class='id identifier rubyid_url'>url</span><span class='comma'>,</span>
440
+ <span class='symbol'>:options</span> <span class='op'>=&gt;</span> <span class='id identifier rubyid_options'>options</span><span class='comma'>,</span>
441
+ <span class='symbol'>:content</span> <span class='op'>=&gt;</span> <span class='id identifier rubyid_content'>content</span>
442
+ <span class='rbrace'>}</span>
443
+ <span class='kw'>nil</span> <span class='comment'># suppress output
444
+ </span><span class='kw'>end</span></pre>
445
+ </td>
446
+ </tr>
447
+ </table>
448
+ </div>
449
+
450
+ </div>
451
+
452
+ </div>
453
+
454
+ <div id="footer">
455
+ Generated on Thu Nov 28 11:14:00 2013 by
456
+ <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
457
+ 0.8.7.3 (ruby-1.9.3).
458
+ </div>
459
+
460
+ </body>
461
+ </html>