/* automatically generated by JSCoverage - do not edit */
if (typeof _$jscoverage === 'undefined') _$jscoverage = {};
if (! _$jscoverage['express 3.0.6/view.js']) {
  _$jscoverage['express 3.0.6/view.js'] = [];
  _$jscoverage['express 3.0.6/view.js'][5] = 0;
  _$jscoverage['express 3.0.6/view.js'][18] = 0;
  _$jscoverage['express 3.0.6/view.js'][34] = 0;
  _$jscoverage['express 3.0.6/view.js'][35] = 0;
  _$jscoverage['express 3.0.6/view.js'][36] = 0;
  _$jscoverage['express 3.0.6/view.js'][37] = 0;
  _$jscoverage['express 3.0.6/view.js'][38] = 0;
  _$jscoverage['express 3.0.6/view.js'][39] = 0;
  _$jscoverage['express 3.0.6/view.js'][40] = 0;
  _$jscoverage['express 3.0.6/view.js'][41] = 0;
  _$jscoverage['express 3.0.6/view.js'][42] = 0;
  _$jscoverage['express 3.0.6/view.js'][43] = 0;
  _$jscoverage['express 3.0.6/view.js'][54] = 0;
  _$jscoverage['express 3.0.6/view.js'][55] = 0;
  _$jscoverage['express 3.0.6/view.js'][58] = 0;
  _$jscoverage['express 3.0.6/view.js'][59] = 0;
  _$jscoverage['express 3.0.6/view.js'][62] = 0;
  _$jscoverage['express 3.0.6/view.js'][63] = 0;
  _$jscoverage['express 3.0.6/view.js'][74] = 0;
  _$jscoverage['express 3.0.6/view.js'][75] = 0;
}
_$jscoverage['express 3.0.6/view.js'][5]++;
var path = require("path"), fs = require("fs"), utils = require("./utils"), dirname = path.dirname, basename = path.basename, extname = path.extname, exists = fs.existsSync || path.existsSync, join = path.join;
_$jscoverage['express 3.0.6/view.js'][18]++;
module.exports = View;
_$jscoverage['express 3.0.6/view.js'][34]++;
function View(name, options) {
  _$jscoverage['express 3.0.6/view.js'][35]++;
  options = options || {};
  _$jscoverage['express 3.0.6/view.js'][36]++;
  this.name = name;
  _$jscoverage['express 3.0.6/view.js'][37]++;
  this.root = options.root;
  _$jscoverage['express 3.0.6/view.js'][38]++;
  var engines = options.engines;
  _$jscoverage['express 3.0.6/view.js'][39]++;
  this.defaultEngine = options.defaultEngine;
  _$jscoverage['express 3.0.6/view.js'][40]++;
  var ext = this.ext = extname(name);
  _$jscoverage['express 3.0.6/view.js'][41]++;
  if (! ext) {
    _$jscoverage['express 3.0.6/view.js'][41]++;
    name += (ext = this.ext = "." + this.defaultEngine);
  }
  _$jscoverage['express 3.0.6/view.js'][42]++;
  this.engine = engines[ext] || (engines[ext] = require(ext.slice(1)).__express);
  _$jscoverage['express 3.0.6/view.js'][43]++;
  this.path = this.lookup(name);
}
_$jscoverage['express 3.0.6/view.js'][54]++;
View.prototype.lookup = (function (path) {
  _$jscoverage['express 3.0.6/view.js'][55]++;
  var ext = this.ext;
  _$jscoverage['express 3.0.6/view.js'][58]++;
  if (! utils.isAbsolute(path)) {
    _$jscoverage['express 3.0.6/view.js'][58]++;
    path = join(this.root, path);
  }
  _$jscoverage['express 3.0.6/view.js'][59]++;
  if (exists(path)) {
    _$jscoverage['express 3.0.6/view.js'][59]++;
    return path;
  }
  _$jscoverage['express 3.0.6/view.js'][62]++;
  path = join(dirname(path), basename(path, ext), "index" + ext);
  _$jscoverage['express 3.0.6/view.js'][63]++;
  if (exists(path)) {
    _$jscoverage['express 3.0.6/view.js'][63]++;
    return path;
  }
});
_$jscoverage['express 3.0.6/view.js'][74]++;
View.prototype.render = (function (options, fn) {
  _$jscoverage['express 3.0.6/view.js'][75]++;
  this.engine(this.path, options, fn);
});
_$jscoverage['express 3.0.6/view.js'].source = ["/**"," * Module dependencies."," */","","var path = require('path')","  , fs = require('fs')","  , utils = require('./utils')","  , dirname = path.dirname","  , basename = path.basename","  , extname = path.extname","  , exists = fs.existsSync || path.existsSync ","  , join = path.join;","","/**"," * Expose `View`."," */","","module.exports = View;","","/**"," * Initialize a new `View` with the given `name`."," *"," * Options:"," *"," *   - `defaultEngine` the default template engine name "," *   - `engines` template engine require() cache "," *   - `root` root path for view lookup "," *"," * @param {String} name"," * @param {Object} options"," * @api private"," */","","function View(name, options) {","  options = options || {};","  this.name = name;","  this.root = options.root;","  var engines = options.engines;","  this.defaultEngine = options.defaultEngine;","  var ext = this.ext = extname(name);","  if (!ext) name += (ext = this.ext = '.' + this.defaultEngine);","  this.engine = engines[ext] || (engines[ext] = require(ext.slice(1)).__express);","  this.path = this.lookup(name);","}","","/**"," * Lookup view by the given `path`"," *"," * @param {String} path"," * @return {String}"," * @api private"," */","","View.prototype.lookup = function(path){","  var ext = this.ext;","","  // &lt;path&gt;.&lt;engine&gt;","  if (!utils.isAbsolute(path)) path = join(this.root, path);","  if (exists(path)) return path;","","  // &lt;path&gt;/index.&lt;engine&gt;","  path = join(dirname(path), basename(path, ext), 'index' + ext);","  if (exists(path)) return path;","};","","/**"," * Render with the given `options` and callback `fn(err, str)`."," *"," * @param {Object} options"," * @param {Function} fn"," * @api private"," */","","View.prototype.render = function(options, fn){","  this.engine(this.path, options, fn);","};"];
