Class: Rack::Pack::Stylesheet

Inherits:
Package
  • Object
show all
Defined in:
lib/rack/pack/stylesheet.rb

Instance Attribute Summary

Attributes inherited from Package

#file

Instance Method Summary collapse

Methods inherited from Package

[], #compile, #compress?, #initialize, mappings, register, #source_files, #stale?, #update

Constructor Details

This class inherits a constructor from Rack::Pack::Package

Instance Method Details

#compress(source) ⇒ Object



4
5
6
7
8
9
10
11
12
# File 'lib/rack/pack/stylesheet.rb', line 4

def compress(source)
  if defined?(Rainpress)
    Rainpress.compress(source, compression_options)
  elsif defined?(YUI) and defined?(YUI::CssCompressor)
    YUI::CssCompressor.new(compression_options).compress(source)
  else
    source
  end
end