Module: Erector::Sass
- Included in:
- Widget
- Defined in:
- lib/erector/sass.rb
Overview
Adds sass support to Erector widgets. Note that sass is provided inside the gem named “haml”, not the gem named “sass”. To get sass support into your Erector project, install the haml gem – see sass-lang.com/download.html – and then do something like this:
require 'rubygems'
require 'sass'
Current support is barebones. Please offer suggestions (or better yet, patches) for whether and how to support, e.g., caching, loading from files, precompilation, etc.
Instance Method Summary collapse
Instance Method Details
#sass(sass_text) ⇒ Object
17 18 19 |
# File 'lib/erector/sass.rb', line 17 def sass(sass_text) style ::Sass::Engine.new(sass_text, :cache => false).render end |