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
Template#precompiled
# File lib/tilt/string.rb 16 def precompiled(locals) 17 source, offset = super 18 [source, offset + 1] 19 end
precompiled_template(locals)
click to toggle source
# File lib/tilt/string.rb 12 def precompiled_template(locals) 13 @code 14 end
prepare()
click to toggle source
# File lib/tilt/string.rb 7 def prepare 8 hash = "TILT#{data.hash.abs}" 9 @code = String.new("<<#{hash}.chomp\n#{data}\n#{hash}") 10 end