Template rendering methods. Each method takes a the name of a template to render as a Symbol and returns a String with the rendered output, as well as an optional hash with additional options.
`template` is either the name or path of the template as symbol (Use `:’subdir/myview’` for views in subdirectories), or a string that will be rendered.
Possible options are:
:layout If set to false, no layout is rendered, otherwise
the specified layout is used (Ignored for `sass`)
:locals A hash with local variables that should be available
in the template
Methods
Instance Public methods
# File lib/sinatra/base.rb, line 244 244: def builder(template=nil, options={}, locals={}, &block) 245: require_warn('Builder') unless defined?(::Builder) 246: 247: options, template = template, nil if template.is_a?(Hash) 248: template = lambda { block } if template.nil? 249: render :builder, template, options, locals 250: end