Class: Tilt::CoffeeScriptTemplate

### Home Classes Methods

### In Files

- lib/tilt/coffee.rb

### Parent

Template

### Methods

- ::default_bare
- ::default_bare=
- ::default_no_wrap
- ::default_no_wrap=
- ::engine_initialized?
- #allows_script?
- #evaluate
- #initialize_engine
- #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::CoffeeScriptTemplate

CoffeeScript template implementation. See: coffeescript.org/

CoffeeScript templates do not support object scopes, locals, or yield.

### Public Class Methods

default_bare() click to toggle source

    # File lib/tilt/coffee.rb, line 13
    def self.default_bare
      @@default_bare
    end

default_bare=(value) click to toggle source

    # File lib/tilt/coffee.rb, line 17
    def self.default_bare=(value)
      @@default_bare = value
    end

default_no_wrap() click to toggle source

DEPRECATED

    # File lib/tilt/coffee.rb, line 22
    def self.default_no_wrap
      @@default_bare
    end

default_no_wrap=(value) click to toggle source

DEPRECATED

    # File lib/tilt/coffee.rb, line 27
    def self.default_no_wrap=(value)
      @@default_bare = value
    end

engine_initialized?() click to toggle source

    # File lib/tilt/coffee.rb, line 31
    def self.engine_initialized?
      defined? ::CoffeeScript
    end

### Public Instance Methods

allows_script?() click to toggle source

    # File lib/tilt/coffee.rb, line 49
    def allows_script?
      false
    end

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

    # File lib/tilt/coffee.rb, line 45
    def evaluate(scope, locals, &block)
      @output ||= CoffeeScript.compile(data, options)
    end

initialize_engine() click to toggle source

    # File lib/tilt/coffee.rb, line 35
    def initialize_engine
      require_template_library 'coffee_script'
    end

prepare() click to toggle source

    # File lib/tilt/coffee.rb, line 39
    def prepare
      if !options.key?(:bare) and !options.key?(:no_wrap)
        options[:bare] = self.class.default_bare
      end
    end

[Validate]

Generated with the Darkfish Rdoc Generator 2.