Module: Zorglub::Engines::Sass
- Defined in:
- lib/zorglub/engines/sass.rb
Class Method Summary collapse
Class Method Details
.proc(path, obj) ⇒ Object
8 9 10 11 12 13 14 15 16 17 |
# File 'lib/zorglub/engines/sass.rb', line 8 def self.proc path,obj if obj.app.opt(:engines_cache_enabled) key = path.sub obj.app.opt(:root),'' sass = obj.app.engines_cache[key] ||= ::Sass::Engine.new( ::File.open(path,'r'){|f| f.read }, obj.app.opt(:sass_options) ) else sass = ::Sass::Engine.new( ::File.open(path,'r'){|f| f.read }, obj.app.opt(:sass_options) ) end css = sass.render return css, 'text/css' end |