Module: Gumdrop::Support::Compressor

Defined in:
lib/gumdrop/support/compressor.rb

Instance Method Summary collapse

Instance Method Details

#compress(content, opts) ⇒ Object



6
7
8
9
10
11
12
13
14
15
16
17
# File 'lib/gumdrop/support/compressor.rb', line 6

def compress(content, opts)
  case opts
  when Symbol, String
    do_compress content, opts.to_s.to_sym
  when Hash
    do_compress content, opts[:with].to_s.to_sym, opts
  else
    # UNKNOWN Compressor type!
    log.warn "Unknown javascript compressor type!"
    content
  end
end