module Strelka::App::Templating::ClassMethods
Class methods to add to classes with templating.
Attributes
layout_template[RW]
template_map[R]
Public Instance Methods
inherited( subclass )
click to toggle source
Extension callback – add instance variables to extending objects.
Calls superclass method
# File lib/strelka/app/templating.rb, line 165 def inherited( subclass ) super subclass.instance_variable_set( :@template_map, @template_map.dup ) subclass.instance_variable_set( :@layout_template, @layout_template.dup ) if @layout_template end
layout( tmplpath=nil )
click to toggle source
Declare a template that will act as a wrapper for all other templates
# File lib/strelka/app/templating.rb, line 183 def layout( tmplpath=nil ) self.layout_template = tmplpath if tmplpath return self.layout_template end
templates( newhash=nil )
click to toggle source
Get/set the templates declared for the App
.
# File lib/strelka/app/templating.rb, line 173 def templates( newhash=nil ) if newhash self.template_map.merge!( newhash ) end return self.template_map end