Tilt::BuilderTemplate

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

Public Class Methods

engine_initialized?() click to toggle source
    # File lib/tilt/builder.rb, line 9
 9:     def self.engine_initialized?
10:       defined? ::Builder
11:     end

Public Instance Methods

evaluate(scope, locals, &block) click to toggle source
    # File lib/tilt/builder.rb, line 19
19:     def evaluate(scope, locals, &block)
20:       return super(scope, locals, &block) if data.respond_to?(:to_str)
21:       xml = ::Builder::XmlMarkup.new(:indent => 2)
22:       data.call(xml)
23:       xml.target!
24:     end
initialize_engine() click to toggle source
    # File lib/tilt/builder.rb, line 13
13:     def initialize_engine
14:       require_template_library 'builder'
15:     end
precompiled_postamble(locals) click to toggle source
    # File lib/tilt/builder.rb, line 31
31:     def precompiled_postamble(locals)
32:       "xml.target!"
33:     end
precompiled_preamble(locals) click to toggle source
    # File lib/tilt/builder.rb, line 26
26:     def precompiled_preamble(locals)
27:       return super if locals.include? :xml
28:       "xml = ::Builder::XmlMarkup.new(:indent => 2)\n#{super}"
29:     end
precompiled_template(locals) click to toggle source
    # File lib/tilt/builder.rb, line 35
35:     def precompiled_template(locals)
36:       data.to_str
37:     end
prepare() click to toggle source
    # File lib/tilt/builder.rb, line 17
17:     def prepare; end

Disabled; run with --debug to generate this.

[Validate]

Generated with the Darkfish Rdoc Generator 1.1.6.