bivouac 0.1.3 → 0.1.4
Sign up to get free protection for your applications and to get access to all the features.
- data/README +18 -1
- data/bin/bivouac +10 -6
- data/lib/bivouac/commands/generate.rb +2 -0
- data/lib/bivouac/commands/plugin.rb +47 -0
- data/lib/bivouac/helpers/view/goh/html.rb +17 -0
- data/lib/bivouac/template/application/postamble.rb +26 -4
- data/lib/bivouac/template/application_goh.rb +2 -1
- data/{examples/blog_erb/script/generate → lib/bivouac/template/plugin.rb} +1 -1
- data/lib/bivouac/template/static/index.html +3 -2
- metadata +95 -172
- data/doc/rdoc/classes/BivouacHelpers/BaseView.html +0 -178
- data/doc/rdoc/classes/BivouacHelpers/FormView.html +0 -398
- data/doc/rdoc/classes/BivouacHelpers/HtmlView.html +0 -274
- data/doc/rdoc/classes/BivouacHelpers/JavaScriptView.html +0 -573
- data/doc/rdoc/classes/BivouacHelpers/ScriptAculoUsView.html +0 -258
- data/doc/rdoc/classes/BivouacHelpers/TooltipView.html +0 -158
- data/doc/rdoc/classes/BivouacHelpers.html +0 -117
- data/doc/rdoc/classes/JavaScriptGenerator.html +0 -564
- data/doc/rdoc/created.rid +0 -1
- data/doc/rdoc/files/AUTHORS.html +0 -109
- data/doc/rdoc/files/COPYING.html +0 -533
- data/doc/rdoc/files/README.html +0 -379
- data/doc/rdoc/files/lib/bivouac/helpers/view/goh/base_rb.html +0 -109
- data/doc/rdoc/files/lib/bivouac/helpers/view/goh/form_rb.html +0 -109
- data/doc/rdoc/files/lib/bivouac/helpers/view/goh/html_rb.html +0 -109
- data/doc/rdoc/files/lib/bivouac/helpers/view/goh/javascript_rb.html +0 -113
- data/doc/rdoc/files/lib/bivouac/helpers/view/goh/scriptaculous_rb.html +0 -113
- data/doc/rdoc/files/lib/bivouac/helpers/view/goh/tooltip_rb.html +0 -109
- data/doc/rdoc/index.html +0 -10
- data/doc/rdoc/permalink.gif +0 -0
- data/doc/rdoc/rdoc-style.css +0 -106
- data/doc/rdoc/rubyfr.png +0 -0
- data/examples/blog_erb/app/blog.rb +0 -84
- data/examples/blog_erb/app/controllers/add.rb +0 -19
- data/examples/blog_erb/app/controllers/comment.rb +0 -9
- data/examples/blog_erb/app/controllers/edit.rb +0 -18
- data/examples/blog_erb/app/controllers/index.rb +0 -8
- data/examples/blog_erb/app/controllers/info.rb +0 -11
- data/examples/blog_erb/app/controllers/login.rb +0 -15
- data/examples/blog_erb/app/controllers/logout.rb +0 -8
- data/examples/blog_erb/app/controllers/view.rb +0 -9
- data/examples/blog_erb/app/models/comment.rb +0 -5
- data/examples/blog_erb/app/models/post.rb +0 -5
- data/examples/blog_erb/app/models/user.rb +0 -4
- data/examples/blog_erb/app/views/add.html +0 -18
- data/examples/blog_erb/app/views/edit.html +0 -18
- data/examples/blog_erb/app/views/index.html +0 -12
- data/examples/blog_erb/app/views/layout.html +0 -12
- data/examples/blog_erb/app/views/login.html +0 -2
- data/examples/blog_erb/app/views/logout.html +0 -2
- data/examples/blog_erb/app/views/view.html +0 -20
- data/examples/blog_erb/config/environment.rb +0 -27
- data/examples/blog_erb/db/Blog.db +0 -0
- data/examples/blog_erb/db/create.rb +0 -8
- data/examples/blog_erb/db/migrate/comment.rb +0 -15
- data/examples/blog_erb/db/migrate/post.rb +0 -15
- data/examples/blog_erb/db/migrate/user.rb +0 -15
- data/examples/blog_erb/log/Blog.log +0 -57
- data/examples/blog_erb/public/images/camping.png +0 -0
- data/examples/blog_erb/public/index.html +0 -242
- data/examples/blog_erb/public/stylesheets/style.css +0 -10
- data/examples/blog_erb/script/server +0 -5
- data/lib/bivouac/commands/server.rb +0 -9
- data/lib/bivouac/template/application/helpers_erb.rb +0 -11
- data/lib/bivouac/template/application_erb.rb +0 -77
- data/lib/bivouac/template/application_jof.rb +0 -42
- data/lib/bivouac/template/generate/scaffold_view_create_erb.rb +0 -7
- data/lib/bivouac/template/generate/scaffold_view_list_erb.rb +0 -7
- data/lib/bivouac/template/generate/scaffold_view_view_erb.rb +0 -10
- data/lib/bivouac/template/generate/view_erb.rb +0 -2
@@ -1,274 +0,0 @@
|
|
1
|
-
|
2
|
-
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
3
|
-
<html>
|
4
|
-
<head>
|
5
|
-
<title>
|
6
|
-
Bivouac, the Documentation » 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 < 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="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>
|
107
|
-
|
108
|
-
<p>
|
109
|
-
Returns an html image tag for the <tt>source</tt>. The <tt>source</tt> must
|
110
|
-
be a file that exists in your public images directory (public/images). You
|
111
|
-
can add html attributes using the <tt>options</tt>. If no alt text is
|
112
|
-
given, the file name part of the <tt>source</tt> is used (capitalized and
|
113
|
-
without the extension)
|
114
|
-
</p>
|
115
|
-
<pre>
|
116
|
-
image_tag("icon.png") # =>
|
117
|
-
<img src="/public/images/icon.png" alt="Icon" />
|
118
|
-
|
119
|
-
image_tag("icon.png", :alt => "Edit Entry") # =>
|
120
|
-
<img src="/public/images/icon.png" alt="Edit Entry" />
|
121
|
-
</pre>
|
122
|
-
|
123
|
-
<div class="sourcecode">
|
124
|
-
<p class="source-link">[ <a href="javascript:toggleSource('M000040_source')" id="l_M000040_source">show source</a> ]</p>
|
125
|
-
<div id="M000040_source" class="dyn-source">
|
126
|
-
<pre>
|
127
|
-
<span class="ruby-comment cmt"># File lib/bivouac/helpers/view/goh/html.rb, line 73</span>
|
128
|
-
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> = {} )
|
129
|
-
74: <span class="ruby-identifier">options</span>[<span class="ruby-identifier">:src</span>] = <span class="ruby-node">"/public/images/#{source}"</span>
|
130
|
-
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>
|
131
|
-
76:
|
132
|
-
77: <span class="ruby-identifier">img</span>( <span class="ruby-identifier">options</span> )
|
133
|
-
78: <span class="ruby-keyword kw">end</span>
|
134
|
-
</pre>
|
135
|
-
</div>
|
136
|
-
</div>
|
137
|
-
<h4 class="ruled">Public Instance method:
|
138
|
-
<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>
|
139
|
-
|
140
|
-
<p>
|
141
|
-
Returns an html script tag for each of the <tt>sources</tt> provided. You
|
142
|
-
can pass in the filename (.js extension is optional) of javascript files
|
143
|
-
that exist in your public/javascripts directory for inclusion into the
|
144
|
-
current page. To include the Prototype and Scriptaculous javascript
|
145
|
-
libraries in your application, pass :defaults as the source.
|
146
|
-
</p>
|
147
|
-
<pre>
|
148
|
-
javascript_include_tag "xmlhr" # =>
|
149
|
-
<script type="text/javascript" src="/public/javascripts/xmlhr.js"></script>
|
150
|
-
|
151
|
-
javascript_include_tag "common.javascript", "elsewhere/cools" # =>
|
152
|
-
<script type="text/javascript" src="/public/javascripts/common.javascript"></script>
|
153
|
-
<script type="text/javascript" src="/public/javascripts/elsewhere/cools.js"></script>
|
154
|
-
</pre>
|
155
|
-
|
156
|
-
<div class="sourcecode">
|
157
|
-
<p class="source-link">[ <a href="javascript:toggleSource('M000039_source')" id="l_M000039_source">show source</a> ]</p>
|
158
|
-
<div id="M000039_source" class="dyn-source">
|
159
|
-
<pre>
|
160
|
-
<span class="ruby-comment cmt"># File lib/bivouac/helpers/view/goh/html.rb, line 43</span>
|
161
|
-
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> )
|
162
|
-
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> { }
|
163
|
-
45: <span class="ruby-identifier">options</span>[<span class="ruby-identifier">:type</span>] = <span class="ruby-value str">"text/javascript"</span>
|
164
|
-
46:
|
165
|
-
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>)
|
166
|
-
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>
|
167
|
-
49: <span class="ruby-ivar">@@javascript_default_sources</span>.<span class="ruby-identifier">dup</span> <span class="ruby-operator">+</span>
|
168
|
-
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>]
|
169
|
-
51:
|
170
|
-
52: <span class="ruby-identifier">sources</span>.<span class="ruby-identifier">delete</span>(<span class="ruby-identifier">:defaults</span>)
|
171
|
-
53: <span class="ruby-keyword kw">end</span>
|
172
|
-
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>
|
173
|
-
55: <span class="ruby-identifier">file</span> = <span class="ruby-identifier">file</span>.<span class="ruby-identifier">to_s</span>
|
174
|
-
56: <span class="ruby-identifier">file</span> <span class="ruby-operator"><<</span> <span class="ruby-value str">".js"</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>
|
175
|
-
57: <span class="ruby-identifier">options</span>[<span class="ruby-identifier">:src</span>] = <span class="ruby-node">"/public/javascripts/#{file}"</span>
|
176
|
-
58: <span class="ruby-identifier">script</span>( <span class="ruby-identifier">options</span> ) {}
|
177
|
-
59: <span class="ruby-keyword kw">end</span>
|
178
|
-
60: <span class="ruby-keyword kw">end</span>
|
179
|
-
</pre>
|
180
|
-
</div>
|
181
|
-
</div>
|
182
|
-
<h4 class="ruled">Public Instance method:
|
183
|
-
<strong><a name="M000041">link_to(name, address, options = {})</a></strong> <a href="#M000041"><img src="../../permalink.gif" border="0" title="Permalink to Public Instance method: link_to" /></a></h4>
|
184
|
-
|
185
|
-
<p>
|
186
|
-
Creates a link tag of the given <tt>name</tt> using <tt>address</tt> has
|
187
|
-
the href for the link
|
188
|
-
</p>
|
189
|
-
<p>
|
190
|
-
The <tt>options</tt> will accept a hash of html attributes for the link
|
191
|
-
tag. It also accepts 2 modifiers that specialize the link behavior.
|
192
|
-
</p>
|
193
|
-
<ul>
|
194
|
-
<li><tt>:confirm => ‘question?‘</tt>: This will add a JavaScript
|
195
|
-
confirm prompt with the question specified. If the user accepts, the link
|
196
|
-
is processed normally, otherwise no action is taken.
|
197
|
-
|
198
|
-
</li>
|
199
|
-
<li><tt>:popup => true || array of window options</tt>: This will force the
|
200
|
-
link to open in a popup window. By passing true, a default browser window
|
201
|
-
will be opened with the URL. You can also specify an array of options that
|
202
|
-
are passed-thru to JavaScripts window.open method.
|
203
|
-
|
204
|
-
</li>
|
205
|
-
</ul>
|
206
|
-
<p>
|
207
|
-
You can mix and match the <tt>options</tt>.
|
208
|
-
</p>
|
209
|
-
<pre>
|
210
|
-
link_to "Documentation", "http://camping.rubyforge.org/", :confirm => "Are you sure?"
|
211
|
-
link_to "Help", R( Help ), :popup => true
|
212
|
-
link_to image_tag( "thumb.png" ), "/public/images/fullsize.png", :popup => ['My house', 'height=300,width=600']
|
213
|
-
</pre>
|
214
|
-
|
215
|
-
<div class="sourcecode">
|
216
|
-
<p class="source-link">[ <a href="javascript:toggleSource('M000041_source')" id="l_M000041_source">show source</a> ]</p>
|
217
|
-
<div id="M000041_source" class="dyn-source">
|
218
|
-
<pre>
|
219
|
-
<span class="ruby-comment cmt"># File lib/bivouac/helpers/view/goh/html.rb, line 99</span>
|
220
|
-
99: <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> = {})
|
221
|
-
100: <span class="ruby-identifier">options</span> = <span class="ruby-identifier">javascript_options</span>( <span class="ruby-identifier">options</span> )
|
222
|
-
101: <span class="ruby-identifier">options</span>[<span class="ruby-identifier">:href</span>] = <span class="ruby-identifier">address</span>
|
223
|
-
102:
|
224
|
-
103: <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>
|
225
|
-
104: <span class="ruby-keyword kw">end</span>
|
226
|
-
</pre>
|
227
|
-
</div>
|
228
|
-
</div>
|
229
|
-
<h4 class="ruled">Public Instance method:
|
230
|
-
<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>
|
231
|
-
|
232
|
-
<p>
|
233
|
-
Returns a stylesheet link tag for the sources specified as arguments. If
|
234
|
-
you don‘t specify an extension, .css will be appended automatically.
|
235
|
-
You can modify the link attributes by passing a hash as the last argument.
|
236
|
-
</p>
|
237
|
-
<pre>
|
238
|
-
stylesheet_link_tag "style" # =>
|
239
|
-
<link href="/public/stylesheets/style.css" media="screen" rel="Stylesheet" type="text/css" />
|
240
|
-
|
241
|
-
stylesheet_link_tag "style", :media => "all" # =>
|
242
|
-
<link href="/public/stylesheets/style.css" media="all" rel="Stylesheet" type="text/css" />
|
243
|
-
|
244
|
-
stylesheet_link_tag "random.styles", "/css/stylish" # =>
|
245
|
-
<link href="/public/stylesheets/random.styles" media="screen" rel="Stylesheet" type="text/css" />
|
246
|
-
<link href="/public/stylesheets/css/stylish.css" media="screen" rel="Stylesheet" type="text/css" />
|
247
|
-
</pre>
|
248
|
-
|
249
|
-
<div class="sourcecode">
|
250
|
-
<p class="source-link">[ <a href="javascript:toggleSource('M000038_source')" id="l_M000038_source">show source</a> ]</p>
|
251
|
-
<div id="M000038_source" class="dyn-source">
|
252
|
-
<pre>
|
253
|
-
<span class="ruby-comment cmt"># File lib/bivouac/helpers/view/goh/html.rb, line 20</span>
|
254
|
-
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> )
|
255
|
-
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> { }
|
256
|
-
22: <span class="ruby-identifier">options</span>[<span class="ruby-identifier">:rel</span>] = <span class="ruby-value str">"Stylesheet"</span>
|
257
|
-
23: <span class="ruby-identifier">options</span>[<span class="ruby-identifier">:type</span>] = <span class="ruby-value str">"text/css"</span>
|
258
|
-
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>
|
259
|
-
25: <span class="ruby-identifier">file</span> <span class="ruby-operator"><<</span> <span class="ruby-value str">".css"</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>
|
260
|
-
26: <span class="ruby-identifier">options</span>[<span class="ruby-identifier">:href</span>] = <span class="ruby-node">"/public/stylesheets/#{file}"</span>
|
261
|
-
27: <span class="ruby-identifier">link</span>( <span class="ruby-identifier">options</span> )
|
262
|
-
28: <span class="ruby-keyword kw">end</span>
|
263
|
-
29: <span class="ruby-keyword kw">end</span>
|
264
|
-
</pre>
|
265
|
-
</div>
|
266
|
-
</div>
|
267
|
-
|
268
|
-
</div>
|
269
|
-
</div>
|
270
|
-
|
271
|
-
|
272
|
-
</div>
|
273
|
-
</body>
|
274
|
-
</html>
|