Builder template implementation. See: builder.rubyforge.org/
# File lib/tilt.rb, line 662 def evaluate(scope, locals, &block) xml = ::Builder::XmlMarkup.new(:indent => 2) if data.respond_to?(:to_str) locals[:xml] = xml super(scope, locals, &block) elsif data.kind_of?(Proc) data.call(xml) end xml.target! end
# File lib/tilt.rb, line 654 def initialize_engine return if defined?(::Builder) require_template_library 'builder' end
# File lib/tilt.rb, line 673 def precompiled_template(locals) data.to_str end
# File lib/tilt.rb, line 659 def prepare end