Module: Ramaze::View::Sass

Defined in:
lib/ramaze/view/sass.rb

Class Method Summary collapse

Class Method Details

.call(action, string) ⇒ Object



8
9
10
11
12
13
14
15
16
17
18
19
# File 'lib/ramaze/view/sass.rb', line 8

def self.call(action, string)
  options = action.options

  if sass_options = action.instance.ancestral_trait[:sass_options]
    options = options.merge(sass_options)
  end

  sass = View.compile(string){|s| ::Sass::Engine.new(s, options) }
  css = sass.to_css

  return css, 'text/css'
end