Class: Crush::Sass::Engine
- Inherits:
-
Engine
- Object
- Tilt::Template
- Engine
- Crush::Sass::Engine
show all
- Defined in:
- lib/crush/sass.rb
Overview
Constant Summary
collapse
- DEFAULT_OPTIONS =
{
:style => :compressed,
:syntax => :scss
}
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
17
18
19
|
# File 'lib/crush/sass.rb', line 17
def self.engine_initialized?
!!(defined?(::Sass) && defined?(::Sass::Engine))
end
|
Instance Method Details
#evaluate(scope, locals, &block) ⇒ Object
29
30
31
|
# File 'lib/crush/sass.rb', line 29
def evaluate(scope, locals, &block)
@output ||= ::Sass::Engine.new(data, DEFAULT_OPTIONS.dup.merge(options)).render
end
|
#initialize_engine ⇒ Object
21
22
23
|
# File 'lib/crush/sass.rb', line 21
def initialize_engine
require_template_library "sass"
end
|
#prepare ⇒ Object
25
26
27
|
# File 'lib/crush/sass.rb', line 25
def prepare
@output = nil
end
|