Class: SassFilter
- Inherits:
-
TextFilter
- Object
- TextFilter
- SassFilter
- Defined in:
- lib/sass_filter.rb
Instance Method Summary collapse
Instance Method Details
#filter(text) ⇒ Object
6 7 8 9 10 11 12 13 14 15 16 17 |
# File 'lib/sass_filter.rb', line 6 def filter(text) begin = Compass. || {:load_paths => []} [:load_paths].unshift "#{RADIANT_ROOT}/public/stylesheets/sass" [:load_paths].unshift "#{Rails.root}/public/stylesheets/sass" # this would need some substitions (as in paperclip) to be useful # options[:load_paths] += Radiant::Config['sheets.sass_template_paths'].split(',').map(&:strip) if Radiant::Config['sheets.sass_template_paths'] Sass::Engine.new(text, ).render rescue Sass::SyntaxError "Syntax Error at line #{$!.sass_line}: " + $!.to_s end end |