lib/roda/plugins/render.rb
# Render the given template. See Render for details.
Render the given template. See Render for details.
Render the given template . See Render for details .
def render(template, opts = (no_opts = true; optimized_template = _cached_template_method(template); OPTS), &block)
          if optimized_template
            send(optimized_template, OPTS, &block)
          elsif !no_opts && opts.length == 1 && (locals = opts[:locals]) && (optimized_template = _optimized_render_method_for_locals(template, locals))
            send(optimized_template, locals, &block)
          else
            opts = render_template_opts(template, opts)
            retrieve_template(opts).render((opts[:scope]||self), (opts[:locals]||OPTS), &block)
          end
        end
def render ( template , opts = ( no_opts = true ; optimized_template = _cached_template_method ( template ) ; OPTS ) , & block ) if optimized_template send ( optimized_template , OPTS , & block ) elsif ! no_opts && opts . length == 1 && ( locals = opts [ :locals ] ) && ( optimized_template = _optimized_render_method_for_locals ( template , locals ) ) send ( optimized_template , locals , & block ) else opts = render_template_opts ( template , opts ) retrieve_template ( opts ) . render ( ( opts [ :scope ] || self ) , ( opts [ :locals ] || OPTS ) , & block ) end end
Render the given template.
Render the given template .
template
opts
no_opts
optimized_template
_cached_template_method
block