class Tilt::BuilderTemplate

Builder template implementation. See: builder.rubyforge.org/

Public Instance Methods

evaluate(scope, locals, &block) click to toggle source
# 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
initialize_engine() click to toggle source
# File lib/tilt.rb, line 654
def initialize_engine
  return if defined?(::Builder)
  require_template_library 'builder'
end
precompiled_template(locals) click to toggle source
# File lib/tilt.rb, line 673
def precompiled_template(locals)
  data.to_str
end
prepare() click to toggle source
# File lib/tilt.rb, line 659
def prepare
end