module RackPipeline::Processing
Public Instance Methods
combine(sources, target)
click to toggle source
# File lib/rack-pipeline/processing.rb, line 5 def combine(sources, target) cache_target(sources, target) do |target_path| body = sources.inject('') do |all,(source,kind)| all << "/*!\n * #{source}\n */\n\n" + File.read(prepare_file(source, static_type(target))).encode('utf-8') + "\n\n" end File.write(target_path, body) target_path end end
compile(source, target)
click to toggle source
# File lib/rack-pipeline/processing.rb, line 22 def compile(source, target) cache_target(source, target) do |target_path| Compiling.process(source, target_path) end end
compress(source, target)
click to toggle source
# File lib/rack-pipeline/processing.rb, line 15 def compress(source, target) return source unless settings[:compress] cache_target(source, target) do |target_path| Compressing.process(source, target_path) end end