Method: Sinatra::Base.template
- Defined in:
- lib/sinatra/base.rb
.template(name, &block) ⇒ Object
Define a named template. The block must return the template source.
1416 1417 1418 1419 |
# File 'lib/sinatra/base.rb', line 1416 def template(name, &block) filename, line = caller_locations.first templates[name] = [block, filename, line.to_i] end |