Sha256: 176c9cb35bc4b779d43c54d355f0272c975b7b631647d561260df59ebab39fc2
Contents?: true
Size: 956 Bytes
Versions: 18
Compression:
Stored size: 956 Bytes
Contents
# Copyright (c) 2008 Michael Fellinger m.fellinger@gmail.com # All files in this distribution are subject to the terms of the Ruby license. require 'sass/engine' module Ramaze module Template # Is responsible for compiling a template using the Sass CSS templating engine. # Can be found at: http://haml.hamptoncatlin.com/ class Sass < Template ENGINES[self] = %w[ sass ] class << self # Transform via Sass templating engine def transform action if response = Response.current response['Content-Type'] = "text/css" end sass = wrap_compile(action) sass.to_css() end # Instantiates Sass::Engine with the template and sass_options trait from # the controller. def compile(action, template) ::Sass::Engine.new(template, action.controller.trait[:sass_options] || {}) end end end end end
Version data entries
18 entries across 18 versions & 4 rubygems