Sha256: 3305ab31dc80a6bb04394fd84cbf08775ee9f50deafc746e7e4ca1e1f6396a45
Contents?: true
Size: 521 Bytes
Versions: 10
Compression:
Stored size: 521 Bytes
Contents
require 'tilt' # Load tilt/haml only when haml is available begin require 'haml' rescue LoadError else require 'tilt/haml' end require_relative 'engine' module Faml class Tilt < Tilt::Template def prepare filename = nil if file filename = File.expand_path(file) end @code = Engine.new(options.merge(filename: filename)).call(data) end def precompiled_template(_locals = {}) @code end end ::Tilt.register(Tilt, 'haml') ::Tilt.register(Tilt, 'faml') end
Version data entries
10 entries across 10 versions & 1 rubygems