module Roda::RodaPlugins::Assets::ClassMethods

def compress_asset(content, type)

configured compressor, or trying the supported compressors.
Compress the given content for the given type by using the
def compress_asset(content, type)
  case compressor = assets_opts[:"#{type}_compressor"]
  when :none
    return content
  when nil
    # default, try different compressors
  else
    # Allow calling private compress methods
    return send("compress_#{type}_#{compressor}", content)
  end
  compressors = if type == :js
    [:yui, :closure, :uglifier, :minjs]
  else
    [:yui]
  end
  compressors.each do |comp|
    begin
    # Allow calling private compress methods
      if c = send("compress_#{type}_#{comp}", content)
        return c
      end
    rescue LoadError, CompressorNotFound
    end
  end
  content
end