Class: Tilt::RDocTemplate

### Home Classes Methods

### In Files

- lib/tilt/rdoc.rb

### Parent

Template

### Methods

- ::engine_initialized?
- #allows_script?
- #evaluate
- #initialize_engine
- #markup
- #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::RDocTemplate

RDoc template. See: rdoc.rubyforge.org/

It's suggested that your program `require 'rdoc/markup'` and `require 'rdoc/markup/to_html'` at load time when using this template engine in a threaded environment.

### Public Class Methods

engine_initialized?() click to toggle source

    # File lib/tilt/rdoc.rb, line 13
    def self.engine_initialized?
      defined? ::RDoc::Markup::ToHtml
    end

### Public Instance Methods

allows_script?() click to toggle source

    # File lib/tilt/rdoc.rb, line 43
    def allows_script?
      false
    end

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

    # File lib/tilt/rdoc.rb, line 39
    def evaluate(scope, locals, &block)
      @output ||= @engine.to_s
    end

initialize_engine() click to toggle source

    # File lib/tilt/rdoc.rb, line 17
    def initialize_engine
      require_template_library 'rdoc'
      require_template_library 'rdoc/markup'
      require_template_library 'rdoc/markup/to_html'
    end

markup() click to toggle source

    # File lib/tilt/rdoc.rb, line 23
    def markup
      begin
        # RDoc 4.0
        require 'rdoc/options'
        RDoc::Markup::ToHtml.new(RDoc::Options.new, nil)
      rescue ArgumentError
        # RDoc < 4.0
        RDoc::Markup::ToHtml.new
      end
    end

prepare() click to toggle source

    # File lib/tilt/rdoc.rb, line 34
    def prepare
      @engine = markup.convert(data)
      @output = nil
    end

[Validate]

Generated with the Darkfish Rdoc Generator 2.