Class Tilt::CoffeeScriptTemplate
In: lib/tilt.rb
Parent: Template

CoffeeScript template implementation. See: coffeescript.org/

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

Methods

Public Class methods

[Source]

     # File lib/tilt.rb, line 599
599:     def self.default_no_wrap
600:       @@default_no_wrap
601:     end

[Source]

     # File lib/tilt.rb, line 603
603:     def self.default_no_wrap=(value)
604:       @@default_no_wrap = value
605:     end

Public Instance methods

[Source]

     # File lib/tilt.rb, line 617
617:     def evaluate(scope, locals, &block)
618:       @output ||= CoffeeScript.compile(data, :no_wrap => @no_wrap)
619:     end

[Source]

     # File lib/tilt.rb, line 607
607:     def initialize_engine
608:       return if defined? ::CoffeeScript
609:       require_template_library 'coffee_script'
610:     end

[Source]

     # File lib/tilt.rb, line 612
612:     def prepare
613:       @no_wrap = options.key?(:no_wrap) ? options[:no_wrap] :
614:         self.class.default_no_wrap
615:     end

[Validate]