class Tilt::StringTemplate
The template source is evaluated as a Ruby string. The #{} interpolation syntax can be used to generated dynamic output.
Public Instance Methods
precompiled(locals)
click to toggle source
Calls superclass method
# File lib/tilt/string.rb 17 def precompiled(locals) 18 source, offset = super 19 [source, offset + 1] 20 end
precompiled_template(locals)
click to toggle source
# File lib/tilt/string.rb 13 def precompiled_template(locals) 14 @code 15 end
prepare()
click to toggle source
# File lib/tilt/string.rb 8 def prepare 9 hash = "TILT#{@data.hash.abs}" 10 @code = String.new("<<#{hash}.chomp\n#{@data}\n#{hash}") 11 end