Class: ScssFilter
- Inherits:
-
TextFilter
- Object
- TextFilter
- ScssFilter
- Defined in:
- lib/scss_filter.rb
Instance Method Summary collapse
Instance Method Details
#filter(text) ⇒ Object
7 8 9 10 11 12 13 14 15 16 17 18 |
# File 'lib/scss_filter.rb', line 7 def filter(text) begin = Compass. || {:load_paths => []} [:load_paths].unshift "#{Rails.root}/public/stylesheets/scss" [:syntax] = :scss # 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 |