Sha256: 804f8e370c7217ead9aaf73f8409910ccbc3d0e7276b7c9b62f9f0b5555c2da6
Contents?: true
Size: 663 Bytes
Versions: 190
Compression:
Stored size: 663 Bytes
Contents
require 'tilt/template' require 'less' module Tilt # Lessscss template implementation. See: # http://lesscss.org/ # # Less templates do not support object scopes, locals, or yield. class LessTemplate < Template self.default_mime_type = 'text/css' def prepare if ::Less.const_defined? :Engine @engine = ::Less::Engine.new(data) else parser = ::Less::Parser.new(options.merge :filename => eval_file, :line => line) @engine = parser.parse(data) end end def evaluate(scope, locals, &block) @output ||= @engine.to_css(options) end def allows_script? false end end end
Version data entries
190 entries across 151 versions & 25 rubygems