In Files

Files

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 663
def evaluate(scope, locals, &block)
  return super(scope, locals, &block) if data.respond_to?(:to_str)
  xml = ::Builder::XmlMarkup.new(:indent => 2)
  data.call(xml)
  xml.target!
end
initialize_engine() click to toggle source
# File lib/tilt.rb, line 656
def initialize_engine
  return if defined?(::Builder)
  require_template_library 'builder'
end
precompiled_postamble(locals) click to toggle source
# File lib/tilt.rb, line 675
def precompiled_postamble(locals)
  "xml.target!"
end
precompiled_preamble(locals) click to toggle source
# File lib/tilt.rb, line 670
def precompiled_preamble(locals)
  return super if locals.include? :xml
  "xml = ::Builder::XmlMarkup.new(:indent => 2)\n#{super}"
end
precompiled_template(locals) click to toggle source
# File lib/tilt.rb, line 679
def precompiled_template(locals)
  data.to_str
end
prepare() click to toggle source
# File lib/tilt.rb, line 661
def prepare; end

[Validate]

Generated with the Darkfish Rdoc Generator 2.