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
Source
# File lib/tilt/string.rb 23 def freeze_string_literals? 24 @freeze_string_literals 25 end
Source
# File lib/tilt/string.rb 18 def precompiled(locals) 19 source, offset = super 20 [source, offset + 1] 21 end
Calls superclass method
Source
# File lib/tilt/string.rb 14 def precompiled_template(locals) 15 @code 16 end
Source
# File lib/tilt/string.rb 8 def prepare 9 hash = "TILT#{@data.hash.abs}" 10 @freeze_string_literals = !!@options[:freeze] 11 @code = String.new("<<#{hash}.chomp\n#{@data}\n#{hash}") 12 end