module Haml::Filters::TiltFilter
def self.extended(base)
def self.extended(base) base.options = {} base.instance_eval do include Base def render_with_options(text, compiler_options) text = template_class.new(nil, 1, options) {text}.render super(text, compiler_options) end end end
def render_with_options(text, compiler_options)
def render_with_options(text, compiler_options) text = template_class.new(nil, 1, options) {text}.render super(text, compiler_options) end
def template_class
def template_class (@template_class if defined? @template_class) or begin @template_class = Tilt["t.#{tilt_extension}"] or raise Error.new(Error.message(:cant_run_filter, tilt_extension)) rescue LoadError => e dep = e.message.split('--').last.strip raise Error.new(Error.message(:gem_install_filter_deps, tilt_extension, dep)) end end