Module: Distil::YuiMinifiableFile
- Included in:
- CssFile, JavascriptFile
- Defined in:
- lib/distil/source-file/yui-minifiable-file.rb
Instance Method Summary collapse
Instance Method Details
#minified_content(source = content) ⇒ Object
4 5 6 7 8 9 10 11 12 13 14 15 16 |
# File 'lib/distil/source-file/yui-minifiable-file.rb', line 4 def minified_content(source=content) # Run the Y!UI Compressor return source if !content_type buffer= "" IO.popen("java -jar #{COMPRESSOR} --type #{content_type}", "r+") { |pipe| pipe.puts(source) pipe.close_write buffer= pipe.read } buffer end |