Class: Tilt::RadiusTemplate

### Home Classes Methods

### In Files

- lib/tilt/radius.rb

### Parent

Template

### Methods

- ::context_class
- ::engine_initialized?
- #allows_script?
- #dup
- #evaluate
- #initialize_engine
- #prepare
- #tag_missing

### 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::RadiusTemplate

Radius Template github.com/jlong/radius/

### Public Class Methods

context_class() click to toggle source

    # File lib/tilt/radius.rb, line 11
    def self.context_class
      @context_class ||= Class.new(Radius::Context) do
        attr_accessor :tilt_scope

        def tag_missing(name, attributes)
          tilt_scope.__send__(name)
        end

        def dup
          i = super
          i.tilt_scope = tilt_scope
          i
        end
      end
    end

engine_initialized?() click to toggle source

    # File lib/tilt/radius.rb, line 7
    def self.engine_initialized?
      defined? ::Radius
    end

### Public Instance Methods

allows_script?() click to toggle source

    # File lib/tilt/radius.rb, line 51
    def allows_script?
      false
    end

dup() click to toggle source

    # File lib/tilt/radius.rb, line 19
    def dup
      i = super
      i.tilt_scope = tilt_scope
      i
    end

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

    # File lib/tilt/radius.rb, line 34
    def evaluate(scope, locals, &block)
      context = self.class.context_class.new
      context.tilt_scope = scope
      context.define_tag("yield") do
        block.call
      end
      locals.each do |tag, value|
        context.define_tag(tag) do
          value
        end
      end

      options = {:tag_prefix => 'r'}.merge(@options)
      parser = Radius::Parser.new(context, options)
      parser.parse(data)
    end

initialize_engine() click to toggle source

    # File lib/tilt/radius.rb, line 27
    def initialize_engine
      require_template_library 'radius'
    end

prepare() click to toggle source

    # File lib/tilt/radius.rb, line 31
    def prepare
    end

tag_missing(name, attributes) click to toggle source

    # File lib/tilt/radius.rb, line 15
    def tag_missing(name, attributes)
      tilt_scope.__send__(name)
    end

[Validate]

Generated with the Darkfish Rdoc Generator 2.