Class: Serve::SassHandler
- Inherits:
-
FileTypeHandler
- Object
- FileTypeHandler
- Serve::SassHandler
- Defined in:
- lib/serve/handlers/sass_handler.rb
Overview
:nodoc:
Instance Method Summary collapse
Methods inherited from FileTypeHandler
extension, find, handlers, #initialize, #process
Constructor Details
This class inherits a constructor from Serve::FileTypeHandler
Instance Method Details
#content_type ⇒ Object
15 16 17 |
# File 'lib/serve/handlers/sass_handler.rb', line 15 def content_type 'text/css' end |
#parse(string) ⇒ Object
5 6 7 8 9 10 11 12 13 |
# File 'lib/serve/handlers/sass_handler.rb', line 5 def parse(string) require 'sass' engine = Sass::Engine.new(string, :load_paths => [@root_path], :style => :expanded, :filename => @script_filename ) engine.render end |