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
    # File lib/tilt/string.rb, line 16
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, line 12
12:     def precompiled_template(locals)
13:       @code
14:     end
prepare() click to toggle source
    # File lib/tilt/string.rb, line 7
 7:     def prepare
 8:       hash = "TILT#{data.hash.abs}"
 9:       @code = "<<#{hash}.chomp\n#{data}\n#{hash}"
10:     end

Disabled; run with --debug to generate this.

[Validate]

Generated with the Darkfish Rdoc Generator 1.1.6.