Class: Tilt::ErubisTemplate
- Inherits:
-
ERBTemplate
- Object
- Template
- ERBTemplate
- Tilt::ErubisTemplate
- Defined in:
- lib/sinatra/tilt.rb
Overview
Erubis template implementation. See: www.kuwata-lab.com/erubis/
Instance Attribute Summary
Attributes inherited from Template
Instance Method Summary collapse
Methods inherited from ERBTemplate
Methods inherited from Template
#basename, #compile, #eval_file, #initialize, #name, #render
Constructor Details
This class inherits a constructor from Tilt::Template
Instance Method Details
#compile! ⇒ Object
261 262 263 264 |
# File 'lib/sinatra/tilt.rb', line 261 def compile! Erubis::Eruby.class_eval(%Q{def add_preamble(src) src << "@_out_buf = _buf = '';" end}) @engine = ::Erubis::Eruby.new(data, ) end |
#initialize_engine ⇒ Object
257 258 259 |
# File 'lib/sinatra/tilt.rb', line 257 def initialize_engine require_template_library 'erubis' unless defined? ::Erubis end |