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 605
605:     def self.default_no_wrap
606:       @@default_no_wrap
607:     end

[Source]

     # File lib/tilt.rb, line 609
609:     def self.default_no_wrap=(value)
610:       @@default_no_wrap = value
611:     end

Public Instance methods

[Source]

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

[Source]

     # File lib/tilt.rb, line 613
613:     def initialize_engine
614:       return if defined? ::CoffeeScript
615:       require_template_library 'coffee_script'
616:     end

[Source]

     # File lib/tilt.rb, line 618
618:     def prepare
619:       @no_wrap = options.key?(:no_wrap) ? options[:no_wrap] :
620:         self.class.default_no_wrap
621:     end

[Validate]