Parent

Tilt::CoffeeScriptTemplate

CoffeeScript template implementation. See: coffeescript.org/

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

Public Instance Methods

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

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

[Validate]

Generated with the Darkfish Rdoc Generator 2.