Builder template implementation. See: builder.rubyforge.org/
# File lib/tilt/builder.rb, line 14 def evaluate(scope, locals, &block) xml = (locals[:xml] || ::Builder::XmlMarkup.new(options)) if data.respond_to?(:to_str) if !locals[:xml] locals = locals.merge(:xml => xml) end return super(scope, locals, &block) end data.call(xml) xml.target! end
# File lib/tilt/builder.rb, line 28 def precompiled_postamble(locals) "xml.target!" end
# File lib/tilt/builder.rb, line 32 def precompiled_template(locals) data.to_str end
# File lib/tilt/builder.rb, line 10 def prepare options[:indent] ||= 2 end