Class: Crush::YUI::CssCompressor
- Inherits:
-
Engine
- Object
- Tilt::Template
- Engine
- Crush::YUI::CssCompressor
show all
- Defined in:
- lib/crush/yui.rb
Overview
Class Method Summary
collapse
Instance Method Summary
collapse
Methods inherited from Engine
compile, compress, #compress, #initialize, #render
Constructor Details
This class inherits a constructor from Crush::Engine
Class Method Details
.engine_initialized? ⇒ Boolean
37
38
39
|
# File 'lib/crush/yui.rb', line 37
def self.engine_initialized?
!!(defined?(::YUI) && defined?(::YUI::CssCompressor))
end
|
Instance Method Details
#evaluate(scope, locals, &block) ⇒ Object
50
51
52
|
# File 'lib/crush/yui.rb', line 50
def evaluate(scope, locals, &block)
@output ||= @engine.compress(data)
end
|
#initialize_engine ⇒ Object
41
42
43
|
# File 'lib/crush/yui.rb', line 41
def initialize_engine
require_template_library "yui/compressor"
end
|
#prepare ⇒ Object
45
46
47
48
|
# File 'lib/crush/yui.rb', line 45
def prepare
@engine = ::YUI::CssCompressor.new(options)
@output = nil
end
|