Class: Fewer::Engines::Js
Constant Summary
Constants inherited
from Abstract
Abstract::SANITISE_REGEXP
Instance Attribute Summary
Attributes inherited from Abstract
#names, #options, #root
Instance Method Summary
collapse
Methods inherited from Abstract
#encoded, #initialize, #mtime, #paths
Instance Method Details
#content_type ⇒ Object
6
7
8
|
# File 'lib/fewer/engines/js.rb', line 6
def content_type
'application/x-javascript'
end
|
#extension ⇒ Object
10
11
12
|
# File 'lib/fewer/engines/js.rb', line 10
def extension
'.js'
end
|
#read ⇒ Object
14
15
16
17
18
19
20
|
# File 'lib/fewer/engines/js.rb', line 14
def read
if options[:min]
::Closure::Compiler.new.compress(super)
else
super
end
end
|