Tilt::BuilderTemplate

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

Public Instance Methods

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

[Validate]

Generated with the Darkfish Rdoc Generator 2.