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
549:     def evaluate(scope, locals, &block)
550:       xml = ::Builder::XmlMarkup.new(:indent => 2)
551:       if data.respond_to?(:to_str)
552:         locals[:xml] = xml
553:         super(scope, locals, &block)
554:       elsif data.kind_of?(Proc)
555:         data.call(xml)
556:       end
557:       xml.target!
558:     end
initialize_engine() click to toggle source
     # File lib/sinatra/tilt.rb, line 541
541:     def initialize_engine
542:       return if defined?(::Builder)
543:       require_template_library 'builder'
544:     end
precompiled_template(locals) click to toggle source
     # File lib/sinatra/tilt.rb, line 560
560:     def precompiled_template(locals)
561:       data.to_str
562:     end
prepare() click to toggle source
     # File lib/sinatra/tilt.rb, line 546
546:     def prepare
547:     end

Disabled; run with --debug to generate this.

[Validate]

Generated with the Darkfish Rdoc Generator 1.1.6.