Class: Tilt::BuilderTemplate

### Home Classes Methods

### In Files

- lib/tilt/builder.rb

### Parent

Template

### Methods

- ::engine_initialized?
- #evaluate
- #initialize_engine
- #precompiled_postamble
- #precompiled_preamble
- #precompiled_template
- #prepare

### Class/Module Index

Quicksearch

- Tilt
- Tilt::AsciidoctorTemplate
- Tilt::BlueClothTemplate
- Tilt::BuilderTemplate
- Tilt::CSVTemplate
- Tilt::Cache
- Tilt::CoffeeScriptTemplate
- Tilt::CompileSite
- Tilt::CreoleTemplate
- Tilt::ERBTemplate
- Tilt::ErubisTemplate
- Tilt::EtanniTemplate
- Tilt::HamlTemplate
- Tilt::KramdownTemplate
- Tilt::LessTemplate
- Tilt::LiquidTemplate
- Tilt::MarkabyTemplate
- Tilt::MarukuTemplate
- Tilt::NokogiriTemplate
- Tilt::PlainTemplate
- Tilt::RDiscountTemplate
- Tilt::RDocTemplate
- Tilt::RadiusTemplate
- Tilt::RedClothTemplate
- Tilt::RedcarpetTemplate
- Tilt::RedcarpetTemplate::Redcarpet1
- Tilt::RedcarpetTemplate::Redcarpet2
- Tilt::SassTemplate
- Tilt::ScssTemplate
- Tilt::StringTemplate
- Tilt::Template
- Tilt::WikiClothTemplate
- Tilt::YajlTemplate

No matching classes.

# 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
    def self.engine_initialized?
      defined? ::Builder
    end

### Public Instance Methods

evaluate(scope, locals, &block) click to toggle source

    # File lib/tilt/builder.rb, line 19
    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/builder.rb, line 13
    def initialize_engine
      require_template_library 'builder'
    end

precompiled_postamble(locals) click to toggle source

    # File lib/tilt/builder.rb, line 31
    def precompiled_postamble(locals)
      "xml.target!"
    end

precompiled_preamble(locals) click to toggle source

    # File lib/tilt/builder.rb, line 26
    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/builder.rb, line 35
    def precompiled_template(locals)
      data.to_str
    end

prepare() click to toggle source

    # File lib/tilt/builder.rb, line 17
    def prepare; end

[Validate]

Generated with the Darkfish Rdoc Generator 2.