class CSSminify2
Constants
- VERSION
Public Class Methods
compress(source, length = 5000)
click to toggle source
Compress CSS with YUI
@param [String, read] CSS String or IO-like object that supports read @param [Integer] length Maximum line length @return [String] Compressed CSS
# File lib/cssminify2.rb, line 18 def self.compress(source, length = 5000) self.new.compress(source, length) end
new()
click to toggle source
# File lib/cssminify2.rb, line 8 def initialize end
Public Instance Methods
compress(source = '', length = 5000)
click to toggle source
Compress CSS with YUI
@param [String, read] CSS String or IO-like object that supports read @param [Integer] length Maximum line length @return [String] Compressed CSS
# File lib/cssminify2.rb, line 29 def compress(source = '', length = 5000) source = source.respond_to?(:read) ? source.read : source.to_s CssCompressor.compress(source, length) end