Class: Spirit::Render::Template

Inherits:
Object
  • Object
show all
Defined in:
lib/spirit/render/templates/template.rb

Overview

Base class for all templates. Class classes should override the template class attribute.

Direct Known Subclasses

Header, Image, Navigation, Problem

Instance Method Summary collapse

Instance Method Details

#render(locals = {}) ⇒ Object

Renders the given problem using #view.

Parameters:

  • locals (Hash) (defaults to: {})

    local variables to pass to the template



15
16
17
# File 'lib/spirit/render/templates/template.rb', line 15

def render(locals={})
  view.render self, locals
end