Sha256: f359619682f9ed2c358e7c44ab534bd31ae4a873d9dc749d949639b0701bb103
Contents?: true
Size: 835 Bytes
Versions: 1
Compression:
Stored size: 835 Bytes
Contents
require 'malt/engines/abstract' module Malt::Engine # Sass Malt Engine # class Sass < Abstract default :sass, :scss # def render(params, &yld) text = params[:text] file = params[:file] format = params[:format] case format when :css, nil engine = intermediate(params) engine.render else super(params, &yld) end end # def intermediate(params) text = params[:text] file = params[:file] type = params[:type] ::Sass::Engine.new(text, :filename=>file, :syntax=>type) end private # Load Sass library if not already loaded. def initialize_engine return if defined? ::Sass::Engine require_library 'sass' end def engine_options opts = {} opts end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
malt-0.1.1 | lib/malt/engines/sass.rb |