Class: Tilt::StringTemplate

Inherits:
Template show all
Defined in:
lib/sinatra/tilt.rb

Overview

The template source is evaluated as a Ruby string. The #{} interpolation syntax can be used to generated dynamic output.

Instance Attribute Summary

Attributes inherited from Template

#data, #file, #line, #options

Instance Method Summary collapse

Methods inherited from Template

#basename, #compile, #eval_file, #initialize, #initialize_engine, #name, #render

Constructor Details

This class inherits a constructor from Tilt::Template

Instance Method Details

#compile!Object



198
199
200
# File 'lib/sinatra/tilt.rb', line 198

def compile!
  @code = "%Q{#{data}}"
end

#template_sourceObject



202
203
204
# File 'lib/sinatra/tilt.rb', line 202

def template_source
  @code
end