asset_hat 0.1.5 → 0.2.0
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.
- data/HISTORY +13 -14
- data/README.rdoc +171 -0
- data/Rakefile +24 -2
- data/VERSION.yml +3 -3
- data/app/helpers/asset_hat_helper.rb +67 -61
- data/asset_hat.gemspec +42 -8
- data/doc/classes/AssetHat/CSS/Engines.html +118 -0
- data/doc/classes/AssetHat/CSS.html +194 -0
- data/doc/classes/AssetHat/JS/Engines.html +122 -0
- data/doc/classes/AssetHat/JS/Vendors.html +110 -0
- data/doc/classes/AssetHat/JS.html +151 -0
- data/doc/classes/AssetHat.html +446 -0
- data/doc/classes/AssetHatHelper.html +161 -0
- data/doc/created.rid +1 -0
- data/doc/files/HISTORY.html +116 -0
- data/doc/files/LICENSE.html +76 -0
- data/doc/files/README_rdoc.html +234 -0
- data/doc/files/app/helpers/asset_hat_helper_rb.html +55 -0
- data/doc/files/lib/asset_hat/capistrano_rb.html +49 -0
- data/doc/files/lib/asset_hat/css_rb.html +57 -0
- data/doc/files/lib/asset_hat/js/vendors_rb.html +49 -0
- data/doc/files/lib/asset_hat/js_rb.html +57 -0
- data/doc/files/lib/asset_hat/tasks/css_rb.html +49 -0
- data/doc/files/lib/asset_hat/tasks/js_rb.html +49 -0
- data/doc/files/lib/asset_hat/tasks_rb.html +58 -0
- data/doc/files/lib/asset_hat/vcs_rb.html +49 -0
- data/doc/files/lib/asset_hat/version_rb.html +49 -0
- data/doc/files/lib/asset_hat_rb.html +49 -0
- data/doc/fr_class_index.html +23 -0
- data/doc/fr_file_index.html +33 -0
- data/doc/fr_method_index.html +4455 -0
- data/doc/index.html +15 -0
- data/doc/rdoc-style.css +328 -0
- data/lib/asset_hat/capistrano.rb +14 -0
- data/lib/asset_hat/css.rb +40 -10
- data/lib/asset_hat/js/vendors.rb +85 -0
- data/lib/asset_hat/js.rb +28 -29
- data/lib/asset_hat/tasks/css.rb +151 -0
- data/lib/asset_hat/tasks/js.rb +100 -0
- data/lib/asset_hat/tasks.rb +4 -272
- data/lib/asset_hat/vcs.rb +23 -20
- data/lib/asset_hat/version.rb +2 -0
- data/lib/asset_hat.rb +94 -19
- data/tasks/asset_hat.rake +1 -1
- data/test/asset_hat_helper_test.rb +63 -9
- data/test/test_helper.rb +5 -1
- metadata +94 -26
- data/README.markdown +0 -154
@@ -0,0 +1,194 @@
|
|
1
|
+
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
|
2
|
+
<html lang='en'>
|
3
|
+
<head>
|
4
|
+
<title>: AssetHat::CSS [AssetHat]</title>
|
5
|
+
<meta content='text/html; charset=UTF-8' http-equiv='Content-Type'>
|
6
|
+
<link href='../../rdoc-style.css' media='screen' rel='stylesheet' type='text/css'>
|
7
|
+
<script type='text/javascript'>
|
8
|
+
//<![CDATA[
|
9
|
+
function popupCode(url) {
|
10
|
+
window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
|
11
|
+
}
|
12
|
+
|
13
|
+
function toggleCode(id) {
|
14
|
+
var code = document.getElementById(id)
|
15
|
+
|
16
|
+
code.style.display = code.style.display != 'block' ? 'block' : 'none'
|
17
|
+
return true
|
18
|
+
}
|
19
|
+
|
20
|
+
// Make codeblocks hidden by default
|
21
|
+
document.writeln('<' + 'style type="text/css">.method .source pre { display: none }<\/style>')
|
22
|
+
//]]>
|
23
|
+
</script>
|
24
|
+
</head>
|
25
|
+
<body class='page'>
|
26
|
+
<div class='class' id='wrapper'>
|
27
|
+
<div class='header'>
|
28
|
+
<h1 class='name'>
|
29
|
+
<span class='type'>Module</span>
|
30
|
+
AssetHat::CSS
|
31
|
+
</h1>
|
32
|
+
<ol class='paths'>
|
33
|
+
<li>
|
34
|
+
<a href="../../files/lib/asset_hat/css_rb.html">lib/asset_hat/css.rb</a>
|
35
|
+
</li>
|
36
|
+
</ol>
|
37
|
+
</div>
|
38
|
+
<div id='content'>
|
39
|
+
<div id='text'>
|
40
|
+
<div id='description'>
|
41
|
+
<p>
|
42
|
+
Methods for minifying and optimizing <a href="CSS.html">CSS</a>.
|
43
|
+
</p>
|
44
|
+
</div>
|
45
|
+
<div id='method-list'>
|
46
|
+
<h2>Methods</h2>
|
47
|
+
<h3>public class</h3>
|
48
|
+
<ol>
|
49
|
+
<li><a href="#M000014">add_asset_commit_ids</a></li>
|
50
|
+
<li><a href="#M000015">add_asset_hosts</a></li>
|
51
|
+
<li><a href="#M000012">min_filepath</a></li>
|
52
|
+
<li><a href="#M000013">minify</a></li>
|
53
|
+
</ol>
|
54
|
+
</div>
|
55
|
+
<div id='section'>
|
56
|
+
<div id='class-list'>
|
57
|
+
<h2>Classes and Modules</h2>
|
58
|
+
Module <a href="CSS/Engines.html" class="link">AssetHat::CSS::Engines</a><br />
|
59
|
+
</div>
|
60
|
+
<div id='constants-list'>
|
61
|
+
<h2>Constants</h2>
|
62
|
+
<div class='name-list'>
|
63
|
+
<table summary='Constants'>
|
64
|
+
<tr class='top-aligned-row context-row'>
|
65
|
+
<td class='context-item-name'>ENGINES</td>
|
66
|
+
<td>=</td>
|
67
|
+
<td class='context-item-value'>[:weak, :cssmin]</td>
|
68
|
+
<td> </td>
|
69
|
+
<td class='context-item-desc'>
|
70
|
+
|
71
|
+
A list of supported minification <a href=CSS/Engines.html>engine</a> names.
|
72
|
+
</td>
|
73
|
+
</tr>
|
74
|
+
</table>
|
75
|
+
</div>
|
76
|
+
</div>
|
77
|
+
<div id='methods'>
|
78
|
+
<h2>Public class methods</h2>
|
79
|
+
<div class='method public-class' id='method-M000014'>
|
80
|
+
<a name='M000014'></a>
|
81
|
+
<div class='synopsis'>
|
82
|
+
<span class='name'>add_asset_commit_ids</span>
|
83
|
+
<span class='arguments'>(css)</span>
|
84
|
+
</div>
|
85
|
+
<div class='description'>
|
86
|
+
<p>
|
87
|
+
Given a string containing <a href="CSS.html">CSS</a>, appends each
|
88
|
+
referenced asset’s last commit ID to its URL, e.g., <tt>background:
|
89
|
+
url(/images/foo.png?ab12cd34e)</tt>. This enables cache busting: If the
|
90
|
+
user’s browser has cached a copy of foo.png from a previous
|
91
|
+
deployment, this new URL forces the browser to ignore that cache and
|
92
|
+
request the latest version.
|
93
|
+
</p>
|
94
|
+
</div>
|
95
|
+
<div class='source'>
|
96
|
+
<a class='source-toggle' href='#' onclick="toggleCode('M000014-source'); return false">
|
97
|
+
[show source]
|
98
|
+
</a>
|
99
|
+
<pre id='M000014-source'> <span class="ruby-comment cmt"># File lib/asset_hat/css.rb, line 43</span>
43: <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">add_asset_commit_ids</span>(<span class="ruby-identifier">css</span>)
44: <span class="ruby-identifier">css</span>.<span class="ruby-identifier">gsub</span>(<span class="ruby-regexp re">/url[\s]*\((\/(images|htc)\/[^)]+)\)/</span>) <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">match</span><span class="ruby-operator">|</span>
45: <span class="ruby-identifier">src</span> = <span class="ruby-identifier">$1</span>
46: 
47: <span class="ruby-comment cmt"># Get absolute path</span>
48: <span class="ruby-identifier">filepath</span> = <span class="ruby-constant">File</span>.<span class="ruby-identifier">join</span>(<span class="ruby-constant">ASSETS_DIR</span>, <span class="ruby-identifier">src</span>)
49: 
50: <span class="ruby-comment cmt"># Convert to relative path</span>
51: <span class="ruby-identifier">filepath</span>.<span class="ruby-identifier">sub!</span>(<span class="ruby-node">/^#{FileUtils.pwd}#{File::SEPARATOR}/</span>, <span class="ruby-value str">''</span>)
52: 
53: <span class="ruby-identifier">commit_id</span> = <span class="ruby-constant">AssetHat</span>.<span class="ruby-identifier">last_commit_id</span>(<span class="ruby-identifier">filepath</span>)
54: <span class="ruby-identifier">commit_id</span>.<span class="ruby-identifier">present?</span> <span class="ruby-value">? </span><span class="ruby-node">"url(#{src}?#{commit_id})"</span> <span class="ruby-operator">:</span> <span class="ruby-node">"url(#{src})"</span>
55: <span class="ruby-keyword kw">end</span>
56: <span class="ruby-keyword kw">end</span></pre>
|
100
|
+
</div>
|
101
|
+
</div>
|
102
|
+
<div class='method public-class' id='method-M000015'>
|
103
|
+
<a name='M000015'></a>
|
104
|
+
<div class='synopsis'>
|
105
|
+
<span class='name'>add_asset_hosts</span>
|
106
|
+
<span class='arguments'>(css, asset_host)</span>
|
107
|
+
</div>
|
108
|
+
<div class='description'>
|
109
|
+
<p>
|
110
|
+
Arguments:
|
111
|
+
</p>
|
112
|
+
<ul>
|
113
|
+
<li>A string containing <a href="CSS.html">CSS</a>;
|
114
|
+
|
115
|
+
</li>
|
116
|
+
<li>A string containing the app’s asset host, e.g.,
|
117
|
+
‘http://assets%d.example.com’. This value is typically taken
|
118
|
+
from <tt>config.action_controller.asset_host</tt> in the app’s
|
119
|
+
<tt>config/environments/production.rb</tt>.
|
120
|
+
|
121
|
+
</li>
|
122
|
+
</ul>
|
123
|
+
<p>
|
124
|
+
An asset host is added to every asset URL in the <a
|
125
|
+
href="CSS.html">CSS</a>, e.g., <tt>background:
|
126
|
+
url(http://assets2.example.com/images/foo.png)</tt>; if <tt>%d</tt> in the
|
127
|
+
asset host, it is replaced with an arbitrary number in 0-3, inclusive.
|
128
|
+
</p>
|
129
|
+
</div>
|
130
|
+
<div class='source'>
|
131
|
+
<a class='source-toggle' href='#' onclick="toggleCode('M000015-source'); return false">
|
132
|
+
[show source]
|
133
|
+
</a>
|
134
|
+
<pre id='M000015-source'> <span class="ruby-comment cmt"># File lib/asset_hat/css.rb, line 70</span>
70: <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">add_asset_hosts</span>(<span class="ruby-identifier">css</span>, <span class="ruby-identifier">asset_host</span>)
71: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">asset_host</span>.<span class="ruby-identifier">blank?</span>
72: <span class="ruby-identifier">css</span>.<span class="ruby-identifier">gsub</span>(<span class="ruby-regexp re">/url[\s]*\((\/(images|htc)\/[^)]+)\)/</span>) <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">match</span><span class="ruby-operator">|</span>
73: <span class="ruby-identifier">src</span> = <span class="ruby-identifier">$1</span>
74: <span class="ruby-node">"url(#{(asset_host =~ /%d/) ? asset_host % (src.hash % 4) : asset_host}#{src})"</span>
75: <span class="ruby-keyword kw">end</span>
76: <span class="ruby-keyword kw">end</span></pre>
|
135
|
+
</div>
|
136
|
+
</div>
|
137
|
+
<div class='method public-class' id='method-M000012'>
|
138
|
+
<a name='M000012'></a>
|
139
|
+
<div class='synopsis'>
|
140
|
+
<span class='name'>min_filepath</span>
|
141
|
+
<span class='arguments'>(filepath)</span>
|
142
|
+
</div>
|
143
|
+
<div class='description'>
|
144
|
+
<p>
|
145
|
+
Returns the expected path for the minified version of a <a
|
146
|
+
href="CSS.html">CSS</a> asset:
|
147
|
+
</p>
|
148
|
+
<pre>AssetHat::CSS.min_filepath('public/stylesheets/bundles/application.css')
 # => 'public/stylesheets/bundles/application.min.css'</pre>
|
149
|
+
</div>
|
150
|
+
<div class='source'>
|
151
|
+
<a class='source-toggle' href='#' onclick="toggleCode('M000012-source'); return false">
|
152
|
+
[show source]
|
153
|
+
</a>
|
154
|
+
<pre id='M000012-source'> <span class="ruby-comment cmt"># File lib/asset_hat/css.rb, line 14</span>
14: <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">min_filepath</span>(<span class="ruby-identifier">filepath</span>)
15: <span class="ruby-constant">AssetHat</span>.<span class="ruby-identifier">min_filepath</span>(<span class="ruby-identifier">filepath</span>, <span class="ruby-value str">'css'</span>)
16: <span class="ruby-keyword kw">end</span></pre>
|
155
|
+
</div>
|
156
|
+
</div>
|
157
|
+
<div class='method public-class' id='method-M000013'>
|
158
|
+
<a name='M000013'></a>
|
159
|
+
<div class='synopsis'>
|
160
|
+
<span class='name'>minify</span>
|
161
|
+
<span class='arguments'>(input_string, options={})</span>
|
162
|
+
</div>
|
163
|
+
<div class='description'>
|
164
|
+
<p>
|
165
|
+
Accepts a string of <a href="CSS.html">CSS</a>, and returns that <a
|
166
|
+
href="CSS.html">CSS</a> minified. Options:
|
167
|
+
</p>
|
168
|
+
<dl>
|
169
|
+
<dt>engine</dt><dd>Default is <tt>:cssmin</tt>; see <a
|
170
|
+
href=CSS/Engines.html#method-c-cssmin><a
|
171
|
+
href="CSS/Engines.html#M000017">Engines.cssmin</a></a>. Allowed values are
|
172
|
+
in ENGINES.
|
173
|
+
|
174
|
+
</dd>
|
175
|
+
</dl>
|
176
|
+
</div>
|
177
|
+
<div class='source'>
|
178
|
+
<a class='source-toggle' href='#' onclick="toggleCode('M000013-source'); return false">
|
179
|
+
[show source]
|
180
|
+
</a>
|
181
|
+
<pre id='M000013-source'> <span class="ruby-comment cmt"># File lib/asset_hat/css.rb, line 23</span>
23: <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">minify</span>(<span class="ruby-identifier">input_string</span>, <span class="ruby-identifier">options</span>={})
24: <span class="ruby-identifier">options</span>.<span class="ruby-identifier">reverse_merge!</span>(<span class="ruby-identifier">:engine</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">:cssmin</span>)
25: 
26: <span class="ruby-identifier">engine</span> = <span class="ruby-identifier">options</span>[<span class="ruby-identifier">:engine</span>].<span class="ruby-identifier">to_sym</span>
27: <span class="ruby-keyword kw">unless</span> <span class="ruby-constant">ENGINES</span>.<span class="ruby-identifier">include?</span>(<span class="ruby-identifier">engine</span>)
28: <span class="ruby-identifier">raise</span> <span class="ruby-node">%Q{
29: Unknown CSS minification engine '#{engine}'.
30: Allowed: #{ENGINES.map{ |e| "'#{e}'" }.join(', ')}
31: }</span>.<span class="ruby-identifier">strip</span>.<span class="ruby-identifier">gsub</span>(<span class="ruby-regexp re">/\s+/</span>, <span class="ruby-value str">' '</span>) <span class="ruby-keyword kw">and</span> <span class="ruby-keyword kw">return</span>
32: <span class="ruby-keyword kw">end</span>
33: 
34: <span class="ruby-constant">AssetHat</span><span class="ruby-operator">::</span><span class="ruby-constant">CSS</span><span class="ruby-operator">::</span><span class="ruby-constant">Engines</span>.<span class="ruby-identifier">send</span>(<span class="ruby-identifier">engine</span>, <span class="ruby-identifier">input_string</span>)
35: <span class="ruby-keyword kw">end</span></pre>
|
182
|
+
</div>
|
183
|
+
</div>
|
184
|
+
</div>
|
185
|
+
</div>
|
186
|
+
</div>
|
187
|
+
</div>
|
188
|
+
<div id='footer-push'></div>
|
189
|
+
</div>
|
190
|
+
<div id='footer'>
|
191
|
+
<a href="http://github.com/mislav/hanna/tree/master"><strong>Hanna</strong> RDoc template</a>
|
192
|
+
</div>
|
193
|
+
</body>
|
194
|
+
</html>
|
@@ -0,0 +1,122 @@
|
|
1
|
+
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
|
2
|
+
<html lang='en'>
|
3
|
+
<head>
|
4
|
+
<title>: AssetHat::JS::Engines [AssetHat]</title>
|
5
|
+
<meta content='text/html; charset=UTF-8' http-equiv='Content-Type'>
|
6
|
+
<link href='../../../rdoc-style.css' media='screen' rel='stylesheet' type='text/css'>
|
7
|
+
<script type='text/javascript'>
|
8
|
+
//<![CDATA[
|
9
|
+
function popupCode(url) {
|
10
|
+
window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
|
11
|
+
}
|
12
|
+
|
13
|
+
function toggleCode(id) {
|
14
|
+
var code = document.getElementById(id)
|
15
|
+
|
16
|
+
code.style.display = code.style.display != 'block' ? 'block' : 'none'
|
17
|
+
return true
|
18
|
+
}
|
19
|
+
|
20
|
+
// Make codeblocks hidden by default
|
21
|
+
document.writeln('<' + 'style type="text/css">.method .source pre { display: none }<\/style>')
|
22
|
+
//]]>
|
23
|
+
</script>
|
24
|
+
</head>
|
25
|
+
<body class='page'>
|
26
|
+
<div class='class' id='wrapper'>
|
27
|
+
<div class='header'>
|
28
|
+
<h1 class='name'>
|
29
|
+
<span class='type'>Module</span>
|
30
|
+
AssetHat::JS::Engines
|
31
|
+
</h1>
|
32
|
+
<ol class='paths'>
|
33
|
+
<li>
|
34
|
+
<a href="../../../files/lib/asset_hat/js_rb.html">lib/asset_hat/js.rb</a>
|
35
|
+
</li>
|
36
|
+
</ol>
|
37
|
+
</div>
|
38
|
+
<div id='content'>
|
39
|
+
<div id='text'>
|
40
|
+
<div id='description'>
|
41
|
+
<p>
|
42
|
+
Swappable JavaScript minification engines.
|
43
|
+
</p>
|
44
|
+
</div>
|
45
|
+
<div id='method-list'>
|
46
|
+
<h2>Methods</h2>
|
47
|
+
<h3>public class</h3>
|
48
|
+
<ol>
|
49
|
+
<li><a href="#M000022">jsmin</a></li>
|
50
|
+
<li><a href="#M000021">weak</a></li>
|
51
|
+
</ol>
|
52
|
+
</div>
|
53
|
+
<div id='section'>
|
54
|
+
<div id='methods'>
|
55
|
+
<h2>Public class methods</h2>
|
56
|
+
<div class='method public-class' id='method-M000022'>
|
57
|
+
<a name='M000022'></a>
|
58
|
+
<div class='synopsis'>
|
59
|
+
<span class='name'>jsmin</span>
|
60
|
+
<span class='arguments'>(input_string)</span>
|
61
|
+
</div>
|
62
|
+
<div class='description'>
|
63
|
+
<p>
|
64
|
+
JavaScript minification engine that simply uses the JSMin gem, a Ruby port
|
65
|
+
of Crockford’s JSMin.
|
66
|
+
</p>
|
67
|
+
<p>
|
68
|
+
Sources:
|
69
|
+
</p>
|
70
|
+
<ul>
|
71
|
+
<li><a href="http://github.com/rgrove/jsmin">github.com/rgrove/jsmin</a>
|
72
|
+
|
73
|
+
</li>
|
74
|
+
<li><a href="http://rubygems.org/gems/jsmin">rubygems.org/gems/jsmin</a>
|
75
|
+
|
76
|
+
</li>
|
77
|
+
</ul>
|
78
|
+
</div>
|
79
|
+
<div class='source'>
|
80
|
+
<a class='source-toggle' href='#' onclick="toggleCode('M000022-source'); return false">
|
81
|
+
[show source]
|
82
|
+
</a>
|
83
|
+
<pre id='M000022-source'> <span class="ruby-comment cmt"># File lib/asset_hat/js.rb, line 79</span>
79: <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">jsmin</span>(<span class="ruby-identifier">input_string</span>)
80: <span class="ruby-constant">JSMin</span>.<span class="ruby-identifier">minify</span>(<span class="ruby-identifier">input_string</span>)
81: <span class="ruby-keyword kw">end</span></pre>
|
84
|
+
</div>
|
85
|
+
</div>
|
86
|
+
<div class='method public-class' id='method-M000021'>
|
87
|
+
<a name='M000021'></a>
|
88
|
+
<div class='synopsis'>
|
89
|
+
<span class='name'>weak</span>
|
90
|
+
<span class='arguments'>(input_string)</span>
|
91
|
+
</div>
|
92
|
+
<div class='description'>
|
93
|
+
<p>
|
94
|
+
Barebones JavaScript minification engine that:
|
95
|
+
</p>
|
96
|
+
<ul>
|
97
|
+
<li>Skips leading/trailing whitespace for each line, excluding line breaks; and
|
98
|
+
|
99
|
+
</li>
|
100
|
+
<li>Removes one-line comments that had no actual code on that line.
|
101
|
+
|
102
|
+
</li>
|
103
|
+
</ul>
|
104
|
+
</div>
|
105
|
+
<div class='source'>
|
106
|
+
<a class='source-toggle' href='#' onclick="toggleCode('M000021-source'); return false">
|
107
|
+
[show source]
|
108
|
+
</a>
|
109
|
+
<pre id='M000021-source'> <span class="ruby-comment cmt"># File lib/asset_hat/js.rb, line 48</span>
48: <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">weak</span>(<span class="ruby-identifier">input_string</span>)
49: <span class="ruby-identifier">input</span> = <span class="ruby-constant">StringIO</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">input_string</span>)
50: <span class="ruby-identifier">output</span> = <span class="ruby-constant">StringIO</span>.<span class="ruby-identifier">new</span>
51: 
52: <span class="ruby-identifier">input</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">line</span><span class="ruby-operator">|</span>
53: <span class="ruby-comment cmt"># Remove indentation and trailing whitespace</span>
54: <span class="ruby-identifier">line</span>.<span class="ruby-identifier">strip!</span>
55: <span class="ruby-keyword kw">next</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">line</span>.<span class="ruby-identifier">blank?</span>
56: 
57: <span class="ruby-comment cmt"># Skip single-line comments</span>
58: <span class="ruby-keyword kw">next</span> <span class="ruby-keyword kw">if</span> <span class="ruby-operator">!</span>(<span class="ruby-identifier">line</span> <span class="ruby-operator">=~</span> <span class="ruby-regexp re">/^\/\//</span>).<span class="ruby-identifier">nil?</span>
59: <span class="ruby-comment cmt"># TODO: Also skip single-line comments that began mid-line, but not</span>
60: <span class="ruby-comment cmt"># inside a string or regex</span>
61: 
62: <span class="ruby-comment cmt"># TODO: Skip multi-line comments</span>
63: <span class="ruby-comment cmt"># - Should not strip from within a string or regex</span>
64: <span class="ruby-comment cmt"># - Should not strip comments that begin with `/*!` (e.g., licenses)</span>
65: 
66: <span class="ruby-identifier">output</span>.<span class="ruby-identifier">write</span>(<span class="ruby-identifier">line</span> <span class="ruby-operator">+</span> <span class="ruby-value str">"\n"</span>)
67: <span class="ruby-keyword kw">end</span>
68: 
69: <span class="ruby-identifier">output</span>.<span class="ruby-identifier">rewind</span>
70: <span class="ruby-identifier">output</span>.<span class="ruby-identifier">read</span>
71: <span class="ruby-keyword kw">end</span></pre>
|
110
|
+
</div>
|
111
|
+
</div>
|
112
|
+
</div>
|
113
|
+
</div>
|
114
|
+
</div>
|
115
|
+
</div>
|
116
|
+
<div id='footer-push'></div>
|
117
|
+
</div>
|
118
|
+
<div id='footer'>
|
119
|
+
<a href="http://github.com/mislav/hanna/tree/master"><strong>Hanna</strong> RDoc template</a>
|
120
|
+
</div>
|
121
|
+
</body>
|
122
|
+
</html>
|
@@ -0,0 +1,110 @@
|
|
1
|
+
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
|
2
|
+
<html lang='en'>
|
3
|
+
<head>
|
4
|
+
<title>: AssetHat::JS::Vendors [AssetHat]</title>
|
5
|
+
<meta content='text/html; charset=UTF-8' http-equiv='Content-Type'>
|
6
|
+
<link href='../../../rdoc-style.css' media='screen' rel='stylesheet' type='text/css'>
|
7
|
+
<script type='text/javascript'>
|
8
|
+
//<![CDATA[
|
9
|
+
function popupCode(url) {
|
10
|
+
window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
|
11
|
+
}
|
12
|
+
|
13
|
+
function toggleCode(id) {
|
14
|
+
var code = document.getElementById(id)
|
15
|
+
|
16
|
+
code.style.display = code.style.display != 'block' ? 'block' : 'none'
|
17
|
+
return true
|
18
|
+
}
|
19
|
+
|
20
|
+
// Make codeblocks hidden by default
|
21
|
+
document.writeln('<' + 'style type="text/css">.method .source pre { display: none }<\/style>')
|
22
|
+
//]]>
|
23
|
+
</script>
|
24
|
+
</head>
|
25
|
+
<body class='page'>
|
26
|
+
<div class='class' id='wrapper'>
|
27
|
+
<div class='header'>
|
28
|
+
<h1 class='name'>
|
29
|
+
<span class='type'>Module</span>
|
30
|
+
AssetHat::JS::Vendors
|
31
|
+
</h1>
|
32
|
+
<ol class='paths'>
|
33
|
+
<li>
|
34
|
+
<a href="../../../files/lib/asset_hat/js/vendors_rb.html">lib/asset_hat/js/vendors.rb</a>
|
35
|
+
</li>
|
36
|
+
</ol>
|
37
|
+
</div>
|
38
|
+
<div id='content'>
|
39
|
+
<div id='text'>
|
40
|
+
<div id='description'>
|
41
|
+
<p>
|
42
|
+
For working with supported 3rd-party JavaScript plugin/framework/library
|
43
|
+
vendors.
|
44
|
+
</p>
|
45
|
+
</div>
|
46
|
+
<div id='method-list'>
|
47
|
+
<h2>Methods</h2>
|
48
|
+
<h3>public class</h3>
|
49
|
+
<ol>
|
50
|
+
<li><a href="#M000020">source_for</a></li>
|
51
|
+
</ol>
|
52
|
+
</div>
|
53
|
+
<div id='section'>
|
54
|
+
<div id='constants-list'>
|
55
|
+
<h2>Constants</h2>
|
56
|
+
<div class='name-list'>
|
57
|
+
<table summary='Constants'>
|
58
|
+
<tr class='top-aligned-row context-row'>
|
59
|
+
<td class='context-item-name'>VENDORS</td>
|
60
|
+
<td>=</td>
|
61
|
+
<td class='context-item-value'>[ :jquery, :jquery_ui, :prototype, :scriptaculous, :mootools, :dojo, :swfobject, :yui, :ext_core ]</td>
|
62
|
+
<td> </td>
|
63
|
+
<td class='context-item-desc'>
|
64
|
+
|
65
|
+
A list of supported 3rd-party JavaScript plugin/vendor names.
|
66
|
+
</td>
|
67
|
+
</tr>
|
68
|
+
</table>
|
69
|
+
</div>
|
70
|
+
</div>
|
71
|
+
<div id='methods'>
|
72
|
+
<h2>Public class methods</h2>
|
73
|
+
<div class='method public-class' id='method-M000020'>
|
74
|
+
<a name='M000020'></a>
|
75
|
+
<div class='synopsis'>
|
76
|
+
<span class='name'>source_for</span>
|
77
|
+
<span class='arguments'>(vendor, options={})</span>
|
78
|
+
</div>
|
79
|
+
<div class='description'>
|
80
|
+
<p>
|
81
|
+
Accepts an item from VENDORS, and returns the URL at which that vendor
|
82
|
+
asset can be found. The URL is either local (relative) or external
|
83
|
+
depending on the environment configuration. Options:
|
84
|
+
</p>
|
85
|
+
<dl>
|
86
|
+
<dt>version</dt><dd>The vendor version, e.g., ‘1.4.0’ for jQuery 1.4. By default,
|
87
|
+
each vendor version is taken from <tt>config/assets.yml</tt>; use this
|
88
|
+
option to override the configuration.
|
89
|
+
|
90
|
+
</dd>
|
91
|
+
</dl>
|
92
|
+
</div>
|
93
|
+
<div class='source'>
|
94
|
+
<a class='source-toggle' href='#' onclick="toggleCode('M000020-source'); return false">
|
95
|
+
[show source]
|
96
|
+
</a>
|
97
|
+
<pre id='M000020-source'> <span class="ruby-comment cmt"># File lib/asset_hat/js/vendors.rb, line 25</span>
25: <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">source_for</span>(<span class="ruby-identifier">vendor</span>, <span class="ruby-identifier">options</span>={})
26: <span class="ruby-identifier">vendor_config</span> =
27: <span class="ruby-constant">AssetHat</span>.<span class="ruby-identifier">config</span>[<span class="ruby-value str">'js'</span>][<span class="ruby-value str">'vendors'</span>][<span class="ruby-identifier">vendor</span>.<span class="ruby-identifier">to_s</span>] <span class="ruby-keyword kw">rescue</span> <span class="ruby-keyword kw">nil</span>
28: <span class="ruby-identifier">use_local</span> = <span class="ruby-constant">ActionController</span><span class="ruby-operator">::</span><span class="ruby-constant">Base</span>.<span class="ruby-identifier">consider_all_requests_local</span>
29: <span class="ruby-identifier">version</span> = <span class="ruby-identifier">options</span>[<span class="ruby-identifier">:version</span>] <span class="ruby-operator">||</span> <span class="ruby-identifier">vendor_config</span>[<span class="ruby-value str">'version'</span>] <span class="ruby-keyword kw">rescue</span> <span class="ruby-keyword kw">nil</span>
30: 
31: <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">use_local</span>
32: <span class="ruby-identifier">src</span> = <span class="ruby-identifier">vendor_config</span>[<span class="ruby-value str">'remote_url'</span>] <span class="ruby-keyword kw">rescue</span> <span class="ruby-keyword kw">nil</span>
33: <span class="ruby-keyword kw">end</span>
34: 
35: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">src</span>.<span class="ruby-identifier">blank?</span>
36: <span class="ruby-keyword kw">case</span> <span class="ruby-identifier">vendor</span>
37: <span class="ruby-keyword kw">when</span> <span class="ruby-identifier">:jquery</span>
38: <span class="ruby-identifier">src</span> = <span class="ruby-identifier">use_local</span> <span class="ruby-operator">||</span> <span class="ruby-identifier">version</span>.<span class="ruby-identifier">blank?</span> <span class="ruby-value">?
39: </span> <span class="ruby-node">"#{['jquery', version].compact.join('-')}.min.js"</span> <span class="ruby-operator">:</span>
40: <span class="ruby-node">"http://ajax.googleapis.com/ajax/libs/jquery/#{version}/jquery.min.js"</span>
41: <span class="ruby-keyword kw">when</span> <span class="ruby-identifier">:jquery_ui</span>
42: <span class="ruby-identifier">src</span> = <span class="ruby-identifier">use_local</span> <span class="ruby-operator">||</span> <span class="ruby-identifier">version</span>.<span class="ruby-identifier">blank?</span> <span class="ruby-value">?
43: </span> <span class="ruby-node">"#{['jquery-ui', version].compact.join('-')}.min.js"</span> <span class="ruby-operator">:</span>
44: <span class="ruby-node">"http://ajax.googleapis.com/ajax/libs/jqueryui/#{version}/jquery-ui.min.js"</span>
45: <span class="ruby-keyword kw">when</span> <span class="ruby-identifier">:prototype</span>
46: <span class="ruby-comment cmt"># Prototype currently doesn't provide an official minified version.</span>
47: <span class="ruby-identifier">src</span> = <span class="ruby-identifier">use_local</span> <span class="ruby-operator">||</span> <span class="ruby-identifier">version</span>.<span class="ruby-identifier">blank?</span> <span class="ruby-value">?
48: </span> <span class="ruby-node">"#{['prototype', version].compact.join('-')}.js"</span> <span class="ruby-operator">:</span>
49: <span class="ruby-node">"http://ajax.googleapis.com/ajax/libs/prototype/#{version}/prototype.js"</span>
50: <span class="ruby-keyword kw">when</span> <span class="ruby-identifier">:scriptaculous</span>
51: <span class="ruby-comment cmt"># script.aculo.us currently doesn't provide an official minified version.</span>
52: <span class="ruby-identifier">src</span> = <span class="ruby-identifier">use_local</span> <span class="ruby-operator">||</span> <span class="ruby-identifier">version</span>.<span class="ruby-identifier">blank?</span> <span class="ruby-value">?
53: </span> <span class="ruby-node">"#{['scriptaculous', version].compact.join('-')}.js"</span> <span class="ruby-operator">:</span>
54: <span class="ruby-node">"http://ajax.googleapis.com/ajax/libs/scriptaculous/#{version}/scriptaculous.js"</span>
55: <span class="ruby-keyword kw">when</span> <span class="ruby-identifier">:mootools</span>
56: <span class="ruby-identifier">src</span> = <span class="ruby-identifier">use_local</span> <span class="ruby-operator">||</span> <span class="ruby-identifier">version</span>.<span class="ruby-identifier">blank?</span> <span class="ruby-value">?
57: </span> <span class="ruby-node">"#{['mootools', version].compact.join('-')}.min.js"</span> <span class="ruby-operator">:</span>
58: <span class="ruby-node">"http://ajax.googleapis.com/ajax/libs/mootools/#{version}/mootools-yui-compressed.js"</span>
59: <span class="ruby-keyword kw">when</span> <span class="ruby-identifier">:dojo</span>
60: <span class="ruby-identifier">src</span> = <span class="ruby-identifier">use_local</span> <span class="ruby-operator">||</span> <span class="ruby-identifier">version</span>.<span class="ruby-identifier">blank?</span> <span class="ruby-value">?
61: </span> <span class="ruby-node">"#{['dojo', version].compact.join('-')}.min.js"</span> <span class="ruby-operator">:</span>
62: <span class="ruby-node">"http://ajax.googleapis.com/ajax/libs/dojo/#{version}/dojo/dojo.xd.js"</span>
63: <span class="ruby-keyword kw">when</span> <span class="ruby-identifier">:swfobject</span>
64: <span class="ruby-identifier">src</span> = <span class="ruby-identifier">use_local</span> <span class="ruby-operator">||</span> <span class="ruby-identifier">version</span>.<span class="ruby-identifier">blank?</span> <span class="ruby-value">?
65: </span> <span class="ruby-node">"#{['swfobject', version].compact.join('-')}.min.js"</span> <span class="ruby-operator">:</span>
66: <span class="ruby-node">"http://ajax.googleapis.com/ajax/libs/swfobject/#{version}/swfobject.js"</span>
67: <span class="ruby-keyword kw">when</span> <span class="ruby-identifier">:yui</span>
68: <span class="ruby-identifier">src</span> = <span class="ruby-identifier">use_local</span> <span class="ruby-operator">||</span> <span class="ruby-identifier">version</span>.<span class="ruby-identifier">blank?</span> <span class="ruby-value">?
69: </span> <span class="ruby-node">"#{['yui', version].compact.join('-')}.min.js"</span> <span class="ruby-operator">:</span>
70: <span class="ruby-node">"http://ajax.googleapis.com/ajax/libs/yui/#{version}/build/yuiloader/yuiloader-min.js"</span>
71: <span class="ruby-keyword kw">when</span> <span class="ruby-identifier">:ext_core</span>
72: <span class="ruby-identifier">src</span> = <span class="ruby-identifier">use_local</span> <span class="ruby-operator">||</span> <span class="ruby-identifier">version</span>.<span class="ruby-identifier">blank?</span> <span class="ruby-value">?
73: </span> <span class="ruby-node">"#{['ext_core', version].compact.join('-')}.min.js"</span> <span class="ruby-operator">:</span>
74: <span class="ruby-node">"http://ajax.googleapis.com/ajax/libs/ext-core/#{version}/ext-core.js"</span>
75: <span class="ruby-keyword kw">else</span> <span class="ruby-keyword kw">nil</span> <span class="ruby-comment cmt"># TODO: Write to log</span>
76: <span class="ruby-keyword kw">end</span>
77: <span class="ruby-keyword kw">end</span>
78: 
79: <span class="ruby-identifier">src</span>
80: <span class="ruby-keyword kw">end</span></pre>
|
98
|
+
</div>
|
99
|
+
</div>
|
100
|
+
</div>
|
101
|
+
</div>
|
102
|
+
</div>
|
103
|
+
</div>
|
104
|
+
<div id='footer-push'></div>
|
105
|
+
</div>
|
106
|
+
<div id='footer'>
|
107
|
+
<a href="http://github.com/mislav/hanna/tree/master"><strong>Hanna</strong> RDoc template</a>
|
108
|
+
</div>
|
109
|
+
</body>
|
110
|
+
</html>
|
@@ -0,0 +1,151 @@
|
|
1
|
+
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
|
2
|
+
<html lang='en'>
|
3
|
+
<head>
|
4
|
+
<title>: AssetHat::JS [AssetHat]</title>
|
5
|
+
<meta content='text/html; charset=UTF-8' http-equiv='Content-Type'>
|
6
|
+
<link href='../../rdoc-style.css' media='screen' rel='stylesheet' type='text/css'>
|
7
|
+
<script type='text/javascript'>
|
8
|
+
//<![CDATA[
|
9
|
+
function popupCode(url) {
|
10
|
+
window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
|
11
|
+
}
|
12
|
+
|
13
|
+
function toggleCode(id) {
|
14
|
+
var code = document.getElementById(id)
|
15
|
+
|
16
|
+
code.style.display = code.style.display != 'block' ? 'block' : 'none'
|
17
|
+
return true
|
18
|
+
}
|
19
|
+
|
20
|
+
// Make codeblocks hidden by default
|
21
|
+
document.writeln('<' + 'style type="text/css">.method .source pre { display: none }<\/style>')
|
22
|
+
//]]>
|
23
|
+
</script>
|
24
|
+
</head>
|
25
|
+
<body class='page'>
|
26
|
+
<div class='class' id='wrapper'>
|
27
|
+
<div class='header'>
|
28
|
+
<h1 class='name'>
|
29
|
+
<span class='type'>Module</span>
|
30
|
+
AssetHat::JS
|
31
|
+
</h1>
|
32
|
+
<ol class='paths'>
|
33
|
+
<li>
|
34
|
+
<a href="../../files/lib/asset_hat/js/vendors_rb.html">lib/asset_hat/js/vendors.rb</a>
|
35
|
+
</li>
|
36
|
+
<li class='other'>
|
37
|
+
<a href="../../files/lib/asset_hat/js_rb.html">lib/asset_hat/js.rb</a>
|
38
|
+
</li>
|
39
|
+
<li>
|
40
|
+
<a class='show' href='#' onclick='this.parentNode.parentNode.className += " expanded"; this.parentNode.removeChild(this); return false'>show all</a>
|
41
|
+
</li>
|
42
|
+
</ol>
|
43
|
+
</div>
|
44
|
+
<div id='content'>
|
45
|
+
<div id='text'>
|
46
|
+
<div id='description'>
|
47
|
+
<p>
|
48
|
+
Methods for minifying JavaScript.
|
49
|
+
</p>
|
50
|
+
</div>
|
51
|
+
<div id='method-list'>
|
52
|
+
<h2>Methods</h2>
|
53
|
+
<h3>public class</h3>
|
54
|
+
<ol>
|
55
|
+
<li><a href="#M000018">min_filepath</a></li>
|
56
|
+
<li><a href="#M000019">minify</a></li>
|
57
|
+
</ol>
|
58
|
+
</div>
|
59
|
+
<div id='section'>
|
60
|
+
<div id='class-list'>
|
61
|
+
<h2>Classes and Modules</h2>
|
62
|
+
Module <a href="JS/Engines.html" class="link">AssetHat::JS::Engines</a><br />
|
63
|
+
Module <a href="JS/Vendors.html" class="link">AssetHat::JS::Vendors</a><br />
|
64
|
+
</div>
|
65
|
+
<div id='constants-list'>
|
66
|
+
<h2>Constants</h2>
|
67
|
+
<div class='name-list'>
|
68
|
+
<table summary='Constants'>
|
69
|
+
<tr class='top-aligned-row context-row'>
|
70
|
+
<td class='context-item-name'>ENGINES</td>
|
71
|
+
<td>=</td>
|
72
|
+
<td class='context-item-value'>[:weak, :jsmin]</td>
|
73
|
+
<td> </td>
|
74
|
+
<td class='context-item-desc'>
|
75
|
+
|
76
|
+
A list of supported minification <a href=JS/Engines.html>engine</a> names.
|
77
|
+
</td>
|
78
|
+
</tr>
|
79
|
+
<tr class='top-aligned-row context-row'>
|
80
|
+
<td class='context-item-name'>VENDORS</td>
|
81
|
+
<td>=</td>
|
82
|
+
<td class='context-item-value'>Vendors::VENDORS</td>
|
83
|
+
<td> </td>
|
84
|
+
<td class='context-item-desc'>
|
85
|
+
|
86
|
+
A list of supported <a href=JS/Vendors.html>3rd-party JavaScript
|
87
|
+
plugin/vendor</a> names.
|
88
|
+
</td>
|
89
|
+
</tr>
|
90
|
+
</table>
|
91
|
+
</div>
|
92
|
+
</div>
|
93
|
+
<div id='methods'>
|
94
|
+
<h2>Public class methods</h2>
|
95
|
+
<div class='method public-class' id='method-M000018'>
|
96
|
+
<a name='M000018'></a>
|
97
|
+
<div class='synopsis'>
|
98
|
+
<span class='name'>min_filepath</span>
|
99
|
+
<span class='arguments'>(filepath)</span>
|
100
|
+
</div>
|
101
|
+
<div class='description'>
|
102
|
+
<p>
|
103
|
+
Returns the expected path for the minified version of a <a
|
104
|
+
href="JS.html">JS</a> asset:
|
105
|
+
</p>
|
106
|
+
<pre>AssetHat::JS.min_filepath('public/javascripts/bundles/application.js')
 # => 'public/javascripts/bundles/application.min.js'</pre>
|
107
|
+
</div>
|
108
|
+
<div class='source'>
|
109
|
+
<a class='source-toggle' href='#' onclick="toggleCode('M000018-source'); return false">
|
110
|
+
[show source]
|
111
|
+
</a>
|
112
|
+
<pre id='M000018-source'> <span class="ruby-comment cmt"># File lib/asset_hat/js.rb, line 19</span>
19: <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">min_filepath</span>(<span class="ruby-identifier">filepath</span>)
20: <span class="ruby-constant">AssetHat</span>.<span class="ruby-identifier">min_filepath</span>(<span class="ruby-identifier">filepath</span>, <span class="ruby-value str">'js'</span>)
21: <span class="ruby-keyword kw">end</span></pre>
|
113
|
+
</div>
|
114
|
+
</div>
|
115
|
+
<div class='method public-class' id='method-M000019'>
|
116
|
+
<a name='M000019'></a>
|
117
|
+
<div class='synopsis'>
|
118
|
+
<span class='name'>minify</span>
|
119
|
+
<span class='arguments'>(input_string, options={})</span>
|
120
|
+
</div>
|
121
|
+
<div class='description'>
|
122
|
+
<p>
|
123
|
+
Accepts a string of <a href="JS.html">JS</a>, and returns that <a
|
124
|
+
href="JS.html">JS</a> minified. Options:
|
125
|
+
</p>
|
126
|
+
<dl>
|
127
|
+
<dt>engine</dt><dd>Default is <tt>:jsmin</tt>; see <a href=JS/Engines.html#method-c-jsmin><a
|
128
|
+
href="JS/Engines.html#M000022">Engines.jsmin</a></a>. Allowed values are in
|
129
|
+
ENGINES.
|
130
|
+
|
131
|
+
</dd>
|
132
|
+
</dl>
|
133
|
+
</div>
|
134
|
+
<div class='source'>
|
135
|
+
<a class='source-toggle' href='#' onclick="toggleCode('M000019-source'); return false">
|
136
|
+
[show source]
|
137
|
+
</a>
|
138
|
+
<pre id='M000019-source'> <span class="ruby-comment cmt"># File lib/asset_hat/js.rb, line 28</span>
28: <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">minify</span>(<span class="ruby-identifier">input_string</span>, <span class="ruby-identifier">options</span>={})
29: <span class="ruby-identifier">options</span>.<span class="ruby-identifier">reverse_merge!</span>(<span class="ruby-identifier">:engine</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">:jsmin</span>)
30: 
31: <span class="ruby-identifier">engine</span> = <span class="ruby-identifier">options</span>[<span class="ruby-identifier">:engine</span>].<span class="ruby-identifier">to_sym</span>
32: <span class="ruby-keyword kw">unless</span> <span class="ruby-constant">ENGINES</span>.<span class="ruby-identifier">include?</span>(<span class="ruby-identifier">engine</span>)
33: <span class="ruby-identifier">raise</span> <span class="ruby-node">%Q{
34: Unknown JS minification engine '#{engine}'.
35: Allowed: #{ENGINES.map{ |e| "'#{e}'" }.join(', ')}
36: }</span>.<span class="ruby-identifier">strip</span>.<span class="ruby-identifier">gsub</span>(<span class="ruby-regexp re">/\s+/</span>, <span class="ruby-value str">' '</span>) <span class="ruby-keyword kw">and</span> <span class="ruby-keyword kw">return</span>
37: <span class="ruby-keyword kw">end</span>
38: 
39: <span class="ruby-constant">AssetHat</span><span class="ruby-operator">::</span><span class="ruby-constant">JS</span><span class="ruby-operator">::</span><span class="ruby-constant">Engines</span>.<span class="ruby-identifier">send</span>(<span class="ruby-identifier">engine</span>, <span class="ruby-identifier">input_string</span>)
40: <span class="ruby-keyword kw">end</span></pre>
|
139
|
+
</div>
|
140
|
+
</div>
|
141
|
+
</div>
|
142
|
+
</div>
|
143
|
+
</div>
|
144
|
+
</div>
|
145
|
+
<div id='footer-push'></div>
|
146
|
+
</div>
|
147
|
+
<div id='footer'>
|
148
|
+
<a href="http://github.com/mislav/hanna/tree/master"><strong>Hanna</strong> RDoc template</a>
|
149
|
+
</div>
|
150
|
+
</body>
|
151
|
+
</html>
|