Sha256: 4acb7849bfb95a4c31cb3b672810e1a95618c9463147dbdf3113f9ebc7649ed2
Contents?: true
Size: 444 Bytes
Versions: 28
Compression:
Stored size: 444 Bytes
Contents
module Sinatra module AssetPack # The base class for all CSS/JS compression engines. class Engine # Helper for system files. # Usage: sys('css', string, "sqwish %f") # Returns stdout. def sys(type, str, cmd) t = Tempfile.new ['', ".#{type}"] t.write(str) t.close output = `#{cmd.gsub('%f', t.path)}` FileUtils.rm t [output, t.path] end end end end
Version data entries
28 entries across 28 versions & 3 rubygems