Strelka::App::Templating::

ClassMethods

module

Class methods to add to classes with templating.

Attributes

layout_template[RW]
template_map[R]

Public Instance Methods

anchor
inherited( subclass )

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
anchor
layout( tmplpath=nil )

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
anchor
templates( newhash=nil )

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