class Tilt::CoffeeScriptTemplate
CoffeeScript template implementation. See: coffeescript.org/
CoffeeScript templates do not support object scopes, locals, or yield.
Attributes
default_bare[RW]
Public Class Methods
default_no_wrap()
click to toggle source
:nocov:
# File lib/tilt/coffee.rb 19 def self.default_no_wrap 20 warn "#{self.class}.default_no_wrap is deprecated and will be removed in Tilt 2.3. Switch to #{self.class}.default_bare." 21 default_bare 22 end
default_no_wrap=(value)
click to toggle source
# File lib/tilt/coffee.rb 24 def self.default_no_wrap=(value) 25 warn "#{self.class}.default_no_wrap= is deprecated and will be removed in Tilt 2.3. Switch to #{self.class}.default_bare=." 26 self.default_bare = value 27 end
literate?()
click to toggle source
:nocov:
# File lib/tilt/coffee.rb 30 def self.literate? 31 false 32 end
Public Instance Methods
prepare()
click to toggle source
# File lib/tilt/coffee.rb 34 def prepare 35 if !@options.key?(:bare) and !@options.key?(:no_wrap) 36 @options[:bare] = self.class.default_bare 37 end 38 @options[:literate] ||= self.class.literate? 39 @output = CoffeeScript.compile(@data, @options) 40 end