Module: Roda::RodaPlugins::Partials::InstanceMethods
- Defined in:
- lib/roda/plugins/partials.rb
Instance Method Summary collapse
-
#partial(template, opts = OPTS) ⇒ Object
Renders the given template without a layout, but prefixes the template filename to use with an underscore.
Instance Method Details
#partial(template, opts = OPTS) ⇒ Object
Renders the given template without a layout, but prefixes the template filename to use with an underscore.
33 34 35 36 37 38 39 40 41 |
# File 'lib/roda/plugins/partials.rb', line 33 def partial(template, opts=OPTS) opts = parse_template_opts(template, opts) if opts[:template] template = opts[:template].split(SLASH) template[-1] = "_#{template[-1]}" opts[:template] = template.join(SLASH) end render_template(opts) end |