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 "Can't run #{self} filter; you must require its dependencies first" rescue LoadError raise Error.new("Can't run #{self} filter; required dependencies not available") end end