Class: Serve::LessHandler

Inherits:
FileTypeHandler show all
Defined in:
lib/serve/handlers/less_handler.rb

Overview

TODO: Figure out how to remove the Less Handler in favor of Tilt The Less handler seems to be necessary to keep Tilt from applying a layout to Less files. Any one know how to turn this Tilt feature off?

Instance Attribute Summary

Attributes inherited from FileTypeHandler

#extension

Instance Method Summary collapse

Methods inherited from FileTypeHandler

configure, extension, extension_options, extensions, handlers, handlers_for, #initialize, #layout?, options_for, #process

Constructor Details

This class inherits a constructor from Serve::FileTypeHandler

Instance Method Details

#content_typeObject



15
16
17
# File 'lib/serve/handlers/less_handler.rb', line 15

def content_type
  'text/css'
end

#parse(string, context) ⇒ Object



10
11
12
13
# File 'lib/serve/handlers/less_handler.rb', line 10

def parse(string, context)
  require 'less'
  Less.parse(string)
end