Class: CSSminify
- Inherits:
-
Object
- Object
- CSSminify
- Defined in:
- lib/cssminify.rb,
lib/cssminify/version.rb
Constant Summary collapse
- VERSION =
"1.0.2"
Class Method Summary collapse
-
.compress(source, length = 5000) ⇒ String
Compress CSS with YUI.
Instance Method Summary collapse
-
#compress(source = '', length = 5000) ⇒ String
Compress CSS with YUI.
-
#initialize ⇒ CSSminify
constructor
A new instance of CSSminify.
Constructor Details
#initialize ⇒ CSSminify
Returns a new instance of CSSminify.
8 9 |
# File 'lib/cssminify.rb', line 8 def initialize end |
Class Method Details
.compress(source, length = 5000) ⇒ String
Compress CSS with YUI
18 19 20 |
# File 'lib/cssminify.rb', line 18 def self.compress(source, length = 5000) self.new.compress(source, length) end |
Instance Method Details
#compress(source = '', length = 5000) ⇒ String
Compress CSS with YUI
29 30 31 32 33 |
# File 'lib/cssminify.rb', line 29 def compress(source = '', length = 5000) source = source.respond_to?(:read) ? source.read : source.to_s CssCompressor.compress(source, length) end |