Sha256: 47f8e00864e2dca7a55c4a1aa96871c2344a6e778cd30428fbbdabfe39589a46
Contents?: true
Size: 680 Bytes
Versions: 1
Compression:
Stored size: 680 Bytes
Contents
require "tilt" require "sass" require "coffee_script" module Tilt class JavascriptTemplate < PlainTemplate self.default_mime_type = 'application/javascript' end class CSSTemplate < PlainTemplate self.default_mime_type = 'text/css' end Tilt.register Tilt::CSSTemplate, "css" Tilt.register Tilt::JavascriptTemplate, "js" end module Linner class Template class << self def template_for_script?(path) [Tilt::JavascriptTemplate, Tilt::CoffeeScriptTemplate].include? Tilt[path] end def template_for_style?(path) [Tilt::CSSTemplate, Tilt::SassTemplate, Tilt::ScssTemplate].include? Tilt[path] end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
linner-0.1.1 | lib/linner/template.rb |