bivouac 0.1.4 → 0.1.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (58) hide show
  1. data/README +6 -7
  2. data/bin/bivouac +1 -1
  3. data/doc/rdoc/classes/BivouacHelpers/BaseView.html +178 -0
  4. data/doc/rdoc/classes/BivouacHelpers/FormView.html +398 -0
  5. data/doc/rdoc/classes/BivouacHelpers/HtmlView.html +305 -0
  6. data/doc/rdoc/classes/BivouacHelpers/JavaScriptView.html +573 -0
  7. data/doc/rdoc/classes/BivouacHelpers/ScriptAculoUsView.html +258 -0
  8. data/doc/rdoc/classes/BivouacHelpers/TooltipView.html +158 -0
  9. data/doc/rdoc/classes/BivouacHelpers.html +117 -0
  10. data/doc/rdoc/classes/JavaScriptGenerator.html +564 -0
  11. data/doc/rdoc/created.rid +1 -0
  12. data/doc/rdoc/files/AUTHORS.html +109 -0
  13. data/doc/rdoc/files/COPYING.html +533 -0
  14. data/doc/rdoc/files/README.html +427 -0
  15. data/doc/rdoc/files/lib/bivouac/helpers/view/goh/base_rb.html +109 -0
  16. data/doc/rdoc/files/lib/bivouac/helpers/view/goh/form_rb.html +109 -0
  17. data/doc/rdoc/files/lib/bivouac/helpers/view/goh/html_rb.html +109 -0
  18. data/doc/rdoc/files/lib/bivouac/helpers/view/goh/javascript_rb.html +113 -0
  19. data/doc/rdoc/files/lib/bivouac/helpers/view/goh/scriptaculous_rb.html +113 -0
  20. data/doc/rdoc/files/lib/bivouac/helpers/view/goh/tooltip_rb.html +109 -0
  21. data/doc/rdoc/index.html +10 -0
  22. data/doc/rdoc/permalink.gif +0 -0
  23. data/doc/rdoc/rdoc-style.css +106 -0
  24. data/doc/rdoc/rubyfr.png +0 -0
  25. data/examples/bivouac_sample/Rakefile +48 -0
  26. data/examples/bivouac_sample/app/bivouac_sample.rb +15 -7
  27. data/examples/bivouac_sample/app/controllers/index.rb +2 -2
  28. data/examples/bivouac_sample/app/controllers/sound.rb +10 -0
  29. data/examples/bivouac_sample/app/helpers/_helpers.rb +6 -3
  30. data/examples/bivouac_sample/app/views/sound.rb +16 -0
  31. data/examples/bivouac_sample/config/environment.rb +5 -2
  32. data/examples/bivouac_sample/config/postamble.rb +89 -18
  33. data/examples/bivouac_sample/public/javascripts/builder.js +12 -7
  34. data/examples/bivouac_sample/public/javascripts/controls.js +485 -355
  35. data/examples/bivouac_sample/public/javascripts/dragdrop.js +82 -52
  36. data/examples/bivouac_sample/public/javascripts/effects.js +361 -329
  37. data/examples/bivouac_sample/public/javascripts/prototype.js +2826 -1120
  38. data/examples/bivouac_sample/public/javascripts/scriptaculous.js +15 -8
  39. data/examples/bivouac_sample/public/javascripts/slider.js +40 -43
  40. data/examples/bivouac_sample/public/javascripts/sound.js +55 -0
  41. data/examples/bivouac_sample/public/javascripts/unittest.js +16 -12
  42. data/examples/bivouac_sample/public/sound/sword.mp3 +0 -0
  43. data/examples/bivouac_sample/script/console +6 -0
  44. data/examples/bivouac_sample/script/plugin +3 -0
  45. data/examples/bivouac_sample/script/server +2 -1
  46. data/examples/bivouac_sample/test/test_sound.rb +15 -0
  47. data/lib/bivouac/helpers/view/goh/sound.rb +38 -0
  48. data/lib/bivouac/template/application/helpers_goh.rb +2 -0
  49. data/lib/bivouac/template/static/builder.js +12 -7
  50. data/lib/bivouac/template/static/controls.js +485 -355
  51. data/lib/bivouac/template/static/dragdrop.js +82 -52
  52. data/lib/bivouac/template/static/effects.js +361 -329
  53. data/lib/bivouac/template/static/prototype.js +2826 -1120
  54. data/lib/bivouac/template/static/scriptaculous.js +15 -8
  55. data/lib/bivouac/template/static/slider.js +40 -43
  56. data/lib/bivouac/template/static/sound.js +55 -0
  57. data/lib/bivouac/template/static/unittest.js +16 -12
  58. metadata +45 -2
@@ -0,0 +1,305 @@
1
+
2
+ <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
3
+ <html>
4
+ <head>
5
+ <title>
6
+ Bivouac, the Documentation &raquo; Module: BivouacHelpers::HtmlView
7
+ </title>
8
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
9
+ <link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
10
+ <script language="JavaScript" type="text/javascript">
11
+ // <![CDATA[
12
+
13
+ function toggleSource( id )
14
+ {
15
+ var elem
16
+ var link
17
+
18
+ if( document.getElementById )
19
+ {
20
+ elem = document.getElementById( id )
21
+ link = document.getElementById( "l_" + id )
22
+ }
23
+ else if ( document.all )
24
+ {
25
+ elem = eval( "document.all." + id )
26
+ link = eval( "document.all.l_" + id )
27
+ }
28
+ else
29
+ return false;
30
+
31
+ if( elem.style.display == "block" )
32
+ {
33
+ elem.style.display = "none"
34
+ link.innerHTML = "show source"
35
+ }
36
+ else
37
+ {
38
+ elem.style.display = "block"
39
+ link.innerHTML = "hide source"
40
+ }
41
+ }
42
+
43
+ function openCode( url )
44
+ {
45
+ window.open( url, "SOURCE_CODE", "width=400,height=400,scrollbars=yes" )
46
+ }
47
+ // ]]>
48
+ </script>
49
+ </head>
50
+ <body>
51
+ <!--
52
+ <div id="menu">
53
+ <h3 class="title">Module: BivouacHelpers::HtmlView</h3>
54
+ </div>
55
+ -->
56
+ <div id="fullpage">
57
+ <div id="pager">
58
+ <table>
59
+ <tr><td><img src="../../rubyfr.png" /></td>
60
+ <td id="pagertd">
61
+ <strong># Module: BivouacHelpers::HtmlView<br />
62
+ [
63
+ "<a href="../../files/README.html" value="File: README">README</a>",
64
+ "<a href="../../files/AUTHORS.html" value="File: AUTHORS">AUTHORS</a>",
65
+ "<a href="../../files/COPYING.html" value="File: COPYING">COPYING</a>",
66
+ "<a href="../../files/lib/bivouac/helpers/view/goh/base_rb.html" value="File: base.rb">lib/bivouac/helpers/view/goh/base.rb</a>",
67
+ "<a href="../../files/lib/bivouac/helpers/view/goh/form_rb.html" value="File: form.rb">lib/bivouac/helpers/view/goh/form.rb</a>",
68
+ "<a href="../../files/lib/bivouac/helpers/view/goh/html_rb.html" value="File: html.rb">lib/bivouac/helpers/view/goh/html.rb</a>",
69
+ "<a href="../../files/lib/bivouac/helpers/view/goh/tooltip_rb.html" value="File: tooltip.rb">lib/bivouac/helpers/view/goh/tooltip.rb</a>",
70
+ "<a href="../../files/lib/bivouac/helpers/view/goh/scriptaculous_rb.html" value="File: scriptaculous.rb">lib/bivouac/helpers/view/goh/scriptaculous.rb</a>",
71
+ "<a href="../../files/lib/bivouac/helpers/view/goh/javascript_rb.html" value="File: javascript.rb">lib/bivouac/helpers/view/goh/javascript.rb</a>",
72
+ <a href="http://greg.rubyfr.net">nil</a>].each do<br />
73
+ <a href="../../classes/JavaScriptGenerator.html" title="Class: JavaScriptGenerator">JavaScriptGenerator</a>.view_html<br />
74
+ <a href="../../classes/BivouacHelpers.html" title="Module: BivouacHelpers">BivouacHelpers</a>.view_html<br />
75
+ <a href="../../classes/BivouacHelpers/TooltipView.html" title="Module: BivouacHelpers::TooltipView">BivouacHelpers::TooltipView</a>.view_html<br />
76
+ <a href="../../classes/BivouacHelpers/ScriptAculoUsView.html" title="Module: BivouacHelpers::ScriptAculoUsView">BivouacHelpers::ScriptAculoUsView</a>.view_html<br />
77
+ <a href="../../classes/BivouacHelpers/BaseView.html" title="Module: BivouacHelpers::BaseView">BivouacHelpers::BaseView</a>.view_html<br />
78
+ <a href="../../classes/BivouacHelpers/JavaScriptView.html" title="Module: BivouacHelpers::JavaScriptView">BivouacHelpers::JavaScriptView</a>.view_html<br />
79
+ <a href="../../classes/BivouacHelpers/HtmlView.html" title="Module: BivouacHelpers::HtmlView">BivouacHelpers::HtmlView</a>.view_html<br />
80
+ <a href="../../classes/BivouacHelpers/FormView.html" title="Module: BivouacHelpers::FormView">BivouacHelpers::FormView</a>.view_html<br />
81
+ end</strong>
82
+ </td></tr>
83
+ </table>
84
+ </ul>
85
+ </div>
86
+
87
+
88
+ <div id="BivouacHelpers::HtmlView" class="page_shade">
89
+ <div class="page">
90
+ <h3>Module BivouacHelpers::HtmlView &lt; Object</h3>
91
+
92
+ (in files
93
+ <a href="../../files/lib/bivouac/helpers/view/goh/html_rb.html">lib/bivouac/helpers/view/goh/html.rb</a>
94
+ )
95
+
96
+ <p>
97
+ bivouac/helpers/view/html
98
+ </p>
99
+
100
+
101
+
102
+
103
+
104
+ <h2 class="ruled">Methods</h2>
105
+ <h4 class="ruled">Public Instance method:
106
+ <strong><a name="M000041">image_path( source )</a></strong> <a href="#M000041"><img src="../../permalink.gif" border="0" title="Permalink to Public Instance method: image_path" /></a></h4>
107
+
108
+ <p>
109
+ Computes the path to an image asset in the public images directory. Full
110
+ paths from the document root will be passed through. Used internally by <a
111
+ href="HtmlView.html#M000040">image_tag</a> to build the image path.
112
+ </p>
113
+ <pre>
114
+ image_path(&quot;edit&quot;) # =&gt; /public/images/edit
115
+ image_path(&quot;edit.png&quot;) # =&gt; /public/images/edit.png
116
+ image_path(&quot;icons/edit.png&quot;) # =&gt; /public/images/icons/edit.png
117
+ image_path(&quot;/icons/edit.png&quot;) # =&gt; /icons/edit.png
118
+ image_path(&quot;http://www.railsapplication.com/img/edit.png&quot;) # =&gt; http://www.railsapplication.com/img/edit.png
119
+ </pre>
120
+
121
+ <div class="sourcecode">
122
+ <p class="source-link">[ <a href="javascript:toggleSource('M000041_source')" id="l_M000041_source">show source</a> ]</p>
123
+ <div id="M000041_source" class="dyn-source">
124
+ <pre>
125
+ <span class="ruby-comment cmt"># File lib/bivouac/helpers/view/goh/html.rb, line 89</span>
126
+ 89: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">image_path</span>( <span class="ruby-identifier">source</span> )
127
+ 90: <span class="ruby-keyword kw">if</span> <span class="ruby-regexp re">/^http:\/\//</span>.<span class="ruby-identifier">match</span>( <span class="ruby-identifier">source</span> ) <span class="ruby-operator">||</span> <span class="ruby-regexp re">/^\//</span>.<span class="ruby-identifier">match</span>( <span class="ruby-identifier">source</span> )
128
+ 91: <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">source</span>
129
+ 92: <span class="ruby-keyword kw">else</span>
130
+ 93: <span class="ruby-keyword kw">return</span> <span class="ruby-node">&quot;/public/images/#{source}&quot;</span>
131
+ 94: <span class="ruby-keyword kw">end</span>
132
+ 95: <span class="ruby-keyword kw">end</span>
133
+ </pre>
134
+ </div>
135
+ </div>
136
+ <h4 class="ruled">Public Instance method:
137
+ <strong><a name="M000040">image_tag( source, options = {} )</a></strong> <a href="#M000040"><img src="../../permalink.gif" border="0" title="Permalink to Public Instance method: image_tag" /></a></h4>
138
+
139
+ <p>
140
+ Returns an html image tag for the <tt>source</tt>. The <tt>source</tt> must
141
+ be a file that exists in your public images directory (public/images). You
142
+ can add html attributes using the <tt>options</tt>. If no alt text is
143
+ given, the file name part of the <tt>source</tt> is used (capitalized and
144
+ without the extension)
145
+ </p>
146
+ <pre>
147
+ image_tag(&quot;icon.png&quot;) # =&gt;
148
+ &lt;img src=&quot;/public/images/icon.png&quot; alt=&quot;Icon&quot; /&gt;
149
+
150
+ image_tag(&quot;icon.png&quot;, :alt =&gt; &quot;Edit Entry&quot;) # =&gt;
151
+ &lt;img src=&quot;/public/images/icon.png&quot; alt=&quot;Edit Entry&quot; /&gt;
152
+ </pre>
153
+
154
+ <div class="sourcecode">
155
+ <p class="source-link">[ <a href="javascript:toggleSource('M000040_source')" id="l_M000040_source">show source</a> ]</p>
156
+ <div id="M000040_source" class="dyn-source">
157
+ <pre>
158
+ <span class="ruby-comment cmt"># File lib/bivouac/helpers/view/goh/html.rb, line 73</span>
159
+ 73: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">image_tag</span>( <span class="ruby-identifier">source</span>, <span class="ruby-identifier">options</span> = {} )
160
+ 74: <span class="ruby-identifier">options</span>[<span class="ruby-identifier">:src</span>] = <span class="ruby-node">&quot;/public/images/#{source}&quot;</span>
161
+ 75: <span class="ruby-identifier">options</span>[<span class="ruby-identifier">:alt</span>] <span class="ruby-operator">||=</span> <span class="ruby-constant">File</span>.<span class="ruby-identifier">basename</span>(<span class="ruby-identifier">options</span>[<span class="ruby-identifier">:src</span>], <span class="ruby-value str">'.*'</span>).<span class="ruby-identifier">split</span>(<span class="ruby-value str">'.'</span>).<span class="ruby-identifier">first</span>.<span class="ruby-identifier">capitalize</span>
162
+ 76:
163
+ 77: <span class="ruby-identifier">img</span>( <span class="ruby-identifier">options</span> )
164
+ 78: <span class="ruby-keyword kw">end</span>
165
+ </pre>
166
+ </div>
167
+ </div>
168
+ <h4 class="ruled">Public Instance method:
169
+ <strong><a name="M000039">javascript_include_tag( *sources )</a></strong> <a href="#M000039"><img src="../../permalink.gif" border="0" title="Permalink to Public Instance method: javascript_include_tag" /></a></h4>
170
+
171
+ <p>
172
+ Returns an html script tag for each of the <tt>sources</tt> provided. You
173
+ can pass in the filename (.js extension is optional) of javascript files
174
+ that exist in your public/javascripts directory for inclusion into the
175
+ current page. To include the Prototype and Scriptaculous javascript
176
+ libraries in your application, pass :defaults as the source.
177
+ </p>
178
+ <pre>
179
+ javascript_include_tag &quot;xmlhr&quot; # =&gt;
180
+ &lt;script type=&quot;text/javascript&quot; src=&quot;/public/javascripts/xmlhr.js&quot;&gt;&lt;/script&gt;
181
+
182
+ javascript_include_tag &quot;common.javascript&quot;, &quot;elsewhere/cools&quot; # =&gt;
183
+ &lt;script type=&quot;text/javascript&quot; src=&quot;/public/javascripts/common.javascript&quot;&gt;&lt;/script&gt;
184
+ &lt;script type=&quot;text/javascript&quot; src=&quot;/public/javascripts/elsewhere/cools.js&quot;&gt;&lt;/script&gt;
185
+ </pre>
186
+
187
+ <div class="sourcecode">
188
+ <p class="source-link">[ <a href="javascript:toggleSource('M000039_source')" id="l_M000039_source">show source</a> ]</p>
189
+ <div id="M000039_source" class="dyn-source">
190
+ <pre>
191
+ <span class="ruby-comment cmt"># File lib/bivouac/helpers/view/goh/html.rb, line 43</span>
192
+ 43: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">javascript_include_tag</span>( <span class="ruby-operator">*</span><span class="ruby-identifier">sources</span> )
193
+ 44: <span class="ruby-identifier">options</span> = <span class="ruby-identifier">sources</span>.<span class="ruby-identifier">last</span>.<span class="ruby-identifier">is_a?</span>(<span class="ruby-constant">Hash</span>) <span class="ruby-operator">?</span> <span class="ruby-identifier">sources</span>.<span class="ruby-identifier">pop</span> <span class="ruby-operator">:</span> { }
194
+ 45: <span class="ruby-identifier">options</span>[<span class="ruby-identifier">:type</span>] = <span class="ruby-value str">&quot;text/javascript&quot;</span>
195
+ 46:
196
+ 47: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">sources</span>.<span class="ruby-identifier">include?</span>(<span class="ruby-identifier">:defaults</span>)
197
+ 48: <span class="ruby-identifier">sources</span> = <span class="ruby-identifier">sources</span>[<span class="ruby-value">0</span><span class="ruby-operator">..</span>(<span class="ruby-identifier">sources</span>.<span class="ruby-identifier">index</span>(<span class="ruby-identifier">:defaults</span>))] <span class="ruby-operator">+</span>
198
+ 49: <span class="ruby-ivar">@@javascript_default_sources</span>.<span class="ruby-identifier">dup</span> <span class="ruby-operator">+</span>
199
+ 50: <span class="ruby-identifier">sources</span>[(<span class="ruby-identifier">sources</span>.<span class="ruby-identifier">index</span>(<span class="ruby-identifier">:defaults</span>) <span class="ruby-operator">+</span> <span class="ruby-value">1</span>)<span class="ruby-operator">..</span><span class="ruby-identifier">sources</span>.<span class="ruby-identifier">length</span>]
200
+ 51:
201
+ 52: <span class="ruby-identifier">sources</span>.<span class="ruby-identifier">delete</span>(<span class="ruby-identifier">:defaults</span>)
202
+ 53: <span class="ruby-keyword kw">end</span>
203
+ 54: <span class="ruby-identifier">sources</span>.<span class="ruby-identifier">collect</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">file</span><span class="ruby-operator">|</span>
204
+ 55: <span class="ruby-identifier">file</span> = <span class="ruby-identifier">file</span>.<span class="ruby-identifier">to_s</span>
205
+ 56: <span class="ruby-identifier">file</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-value str">&quot;.js&quot;</span> <span class="ruby-keyword kw">if</span> <span class="ruby-constant">File</span>.<span class="ruby-identifier">extname</span>(<span class="ruby-identifier">file</span>).<span class="ruby-identifier">blank?</span>
206
+ 57: <span class="ruby-identifier">options</span>[<span class="ruby-identifier">:src</span>] = <span class="ruby-node">&quot;/public/javascripts/#{file}&quot;</span>
207
+ 58: <span class="ruby-identifier">script</span>( <span class="ruby-identifier">options</span> ) {}
208
+ 59: <span class="ruby-keyword kw">end</span>
209
+ 60: <span class="ruby-keyword kw">end</span>
210
+ </pre>
211
+ </div>
212
+ </div>
213
+ <h4 class="ruled">Public Instance method:
214
+ <strong><a name="M000042">link_to(name, address, options = {})</a></strong> <a href="#M000042"><img src="../../permalink.gif" border="0" title="Permalink to Public Instance method: link_to" /></a></h4>
215
+
216
+ <p>
217
+ Creates a link tag of the given <tt>name</tt> using <tt>address</tt> has
218
+ the href for the link
219
+ </p>
220
+ <p>
221
+ The <tt>options</tt> will accept a hash of html attributes for the link
222
+ tag. It also accepts 2 modifiers that specialize the link behavior.
223
+ </p>
224
+ <ul>
225
+ <li><tt>:confirm =&gt; &#8216;question?&#8216;</tt>: This will add a JavaScript
226
+ confirm prompt with the question specified. If the user accepts, the link
227
+ is processed normally, otherwise no action is taken.
228
+
229
+ </li>
230
+ <li><tt>:popup =&gt; true || array of window options</tt>: This will force the
231
+ link to open in a popup window. By passing true, a default browser window
232
+ will be opened with the URL. You can also specify an array of options that
233
+ are passed-thru to JavaScripts window.open method.
234
+
235
+ </li>
236
+ </ul>
237
+ <p>
238
+ You can mix and match the <tt>options</tt>.
239
+ </p>
240
+ <pre>
241
+ link_to &quot;Documentation&quot;, &quot;http://camping.rubyforge.org/&quot;, :confirm =&gt; &quot;Are you sure?&quot;
242
+ link_to &quot;Help&quot;, R( Help ), :popup =&gt; true
243
+ link_to image_tag( &quot;thumb.png&quot; ), &quot;/public/images/fullsize.png&quot;, :popup =&gt; ['My house', 'height=300,width=600']
244
+ </pre>
245
+
246
+ <div class="sourcecode">
247
+ <p class="source-link">[ <a href="javascript:toggleSource('M000042_source')" id="l_M000042_source">show source</a> ]</p>
248
+ <div id="M000042_source" class="dyn-source">
249
+ <pre>
250
+ <span class="ruby-comment cmt"># File lib/bivouac/helpers/view/goh/html.rb, line 116</span>
251
+ 116: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">link_to</span>(<span class="ruby-identifier">name</span>, <span class="ruby-identifier">address</span>, <span class="ruby-identifier">options</span> = {})
252
+ 117: <span class="ruby-identifier">options</span> = <span class="ruby-identifier">javascript_options</span>( <span class="ruby-identifier">options</span> )
253
+ 118: <span class="ruby-identifier">options</span>[<span class="ruby-identifier">:href</span>] = <span class="ruby-identifier">address</span>
254
+ 119:
255
+ 120: <span class="ruby-identifier">a</span>( <span class="ruby-identifier">options</span> ) <span class="ruby-keyword kw">do</span>; <span class="ruby-identifier">name</span>; <span class="ruby-keyword kw">end</span>
256
+ 121: <span class="ruby-keyword kw">end</span>
257
+ </pre>
258
+ </div>
259
+ </div>
260
+ <h4 class="ruled">Public Instance method:
261
+ <strong><a name="M000038">stylesheet_link_tag( *data )</a></strong> <a href="#M000038"><img src="../../permalink.gif" border="0" title="Permalink to Public Instance method: stylesheet_link_tag" /></a></h4>
262
+
263
+ <p>
264
+ Returns a stylesheet link tag for the sources specified as arguments. If
265
+ you don&#8216;t specify an extension, .css will be appended automatically.
266
+ You can modify the link attributes by passing a hash as the last argument.
267
+ </p>
268
+ <pre>
269
+ stylesheet_link_tag &quot;style&quot; # =&gt;
270
+ &lt;link href=&quot;/public/stylesheets/style.css&quot; media=&quot;screen&quot; rel=&quot;Stylesheet&quot; type=&quot;text/css&quot; /&gt;
271
+
272
+ stylesheet_link_tag &quot;style&quot;, :media =&gt; &quot;all&quot; # =&gt;
273
+ &lt;link href=&quot;/public/stylesheets/style.css&quot; media=&quot;all&quot; rel=&quot;Stylesheet&quot; type=&quot;text/css&quot; /&gt;
274
+
275
+ stylesheet_link_tag &quot;random.styles&quot;, &quot;/css/stylish&quot; # =&gt;
276
+ &lt;link href=&quot;/public/stylesheets/random.styles&quot; media=&quot;screen&quot; rel=&quot;Stylesheet&quot; type=&quot;text/css&quot; /&gt;
277
+ &lt;link href=&quot;/public/stylesheets/css/stylish.css&quot; media=&quot;screen&quot; rel=&quot;Stylesheet&quot; type=&quot;text/css&quot; /&gt;
278
+ </pre>
279
+
280
+ <div class="sourcecode">
281
+ <p class="source-link">[ <a href="javascript:toggleSource('M000038_source')" id="l_M000038_source">show source</a> ]</p>
282
+ <div id="M000038_source" class="dyn-source">
283
+ <pre>
284
+ <span class="ruby-comment cmt"># File lib/bivouac/helpers/view/goh/html.rb, line 20</span>
285
+ 20: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">stylesheet_link_tag</span>( <span class="ruby-operator">*</span><span class="ruby-identifier">data</span> )
286
+ 21: <span class="ruby-identifier">options</span> = <span class="ruby-identifier">data</span>.<span class="ruby-identifier">last</span>.<span class="ruby-identifier">is_a?</span>(<span class="ruby-constant">Hash</span>) <span class="ruby-operator">?</span> <span class="ruby-identifier">data</span>.<span class="ruby-identifier">pop</span> <span class="ruby-operator">:</span> { }
287
+ 22: <span class="ruby-identifier">options</span>[<span class="ruby-identifier">:rel</span>] = <span class="ruby-value str">&quot;Stylesheet&quot;</span>
288
+ 23: <span class="ruby-identifier">options</span>[<span class="ruby-identifier">:type</span>] = <span class="ruby-value str">&quot;text/css&quot;</span>
289
+ 24: <span class="ruby-identifier">data</span>.<span class="ruby-identifier">collect</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">file</span><span class="ruby-operator">|</span>
290
+ 25: <span class="ruby-identifier">file</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-value str">&quot;.css&quot;</span> <span class="ruby-keyword kw">if</span> <span class="ruby-constant">File</span>.<span class="ruby-identifier">extname</span>(<span class="ruby-identifier">file</span>).<span class="ruby-identifier">blank?</span>
291
+ 26: <span class="ruby-identifier">options</span>[<span class="ruby-identifier">:href</span>] = <span class="ruby-node">&quot;/public/stylesheets/#{file}&quot;</span>
292
+ 27: <span class="ruby-identifier">link</span>( <span class="ruby-identifier">options</span> )
293
+ 28: <span class="ruby-keyword kw">end</span>
294
+ 29: <span class="ruby-keyword kw">end</span>
295
+ </pre>
296
+ </div>
297
+ </div>
298
+
299
+ </div>
300
+ </div>
301
+
302
+
303
+ </div>
304
+ </body>
305
+ </html>