class Tilt::StringTemplate

  1. lib/tilt/string.rb
Superclass: Template

Public Instance methods

freeze_string_literals?()
[show source]
   # File lib/tilt/string.rb
31 def freeze_string_literals?
32   @freeze_string_literals
33 end
precompiled(locals)
[show source]
   # File lib/tilt/string.rb
26 def precompiled(locals)
27   source, offset = super
28   [source, offset + 1]
29 end
precompiled_template(locals)
[show source]
   # File lib/tilt/string.rb
22 def precompiled_template(locals)
23   @code
24 end
prepare()
[show source]
   # File lib/tilt/string.rb
16 def prepare
17   hash = "TILT#{@data.hash.abs}"
18   @freeze_string_literals = !!@options[:freeze]
19   @code = String.new("<<#{hash}.chomp\n#{@data}\n#{hash}")
20 end