function Template(config, logger) {
  var dir, that;

  this.config = config[name];
  this.templates = {};

  this.logger = logger;

  dir = __dirname + '/templates';

  that = this;
  _.each(fs.readdirSync(dir), function(file) {
    var basename = path.basename(file, '.ejs');
    var relname = dir + '/' + file;
    that.templates[basename] = fs.readFileSync(relname, 'utf8');
  });
}
/**
 * Constructs a template cache for reading a directory of templates
 * and providing named render functionality.
 *
 * @constructor
 * @param {Ojbect} config     - a template configuration object
 * @param {String} config.dir - a directory containing templates
 */
Constructs a template cache for reading a directory of templates
and providing named render functionality.

@constructor
@param {Ojbect} config     - a template configuration object
@param {String} config.dir - a directory containing templates
Constructs a template cache for reading a directory of templates and providing named render functionality . @constructor @param { Ojbect } config - a template configuration object @param { String } config . dir - a directory containing templates
function Template(config, logger) {
  var dir, that;
  this.config = config[name];
  this.templates = {};
  this.logger = logger;
  dir = __dirname + '/templates';
  that = this;
  _.each(fs.readdirSync(dir), function(file) {
    var basename = path.basename(file, '.ejs');
    var relname = dir + '/' + file;
    that.templates[basename] = fs.readFileSync(relname, 'utf8');
  });
}
function Template ( config , logger ) { var dir , that ; this . config = config [ name ] ; this . templates = { } ; this . logger = logger ; dir = __dirname + '/templates' ; that = this ; _ . each ( fs . readdirSync ( dir ) , function ( file ) { var basename = path . basename ( file , '.ejs' ) ; var relname = dir + '/' + file ; that . templates [ basename ] = fs . readFileSync ( relname , 'utf8' ) ; } ) ; }
Constructs a template cache for reading a directory of templates
 and providing named render functionality.
Constructs a template cache for reading a directory of templates and providing named render functionality .