Class methods to add to classes with templating.
Extension callback – add instance variables to extending objects.
# 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
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
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