/* automatically generated by JSCoverage - do not edit */
if (typeof _$jscoverage === 'undefined') _$jscoverage = {};
if (! _$jscoverage['view.js']) {
  _$jscoverage['view.js'] = [];
  _$jscoverage['view.js'][12] = 0;
  _$jscoverage['view.js'][25] = 0;
  _$jscoverage['view.js'][41] = 0;
  _$jscoverage['view.js'][42] = 0;
  _$jscoverage['view.js'][43] = 0;
  _$jscoverage['view.js'][44] = 0;
  _$jscoverage['view.js'][45] = 0;
  _$jscoverage['view.js'][46] = 0;
  _$jscoverage['view.js'][47] = 0;
  _$jscoverage['view.js'][48] = 0;
  _$jscoverage['view.js'][49] = 0;
  _$jscoverage['view.js'][50] = 0;
  _$jscoverage['view.js'][61] = 0;
  _$jscoverage['view.js'][62] = 0;
  _$jscoverage['view.js'][65] = 0;
  _$jscoverage['view.js'][66] = 0;
  _$jscoverage['view.js'][69] = 0;
  _$jscoverage['view.js'][70] = 0;
  _$jscoverage['view.js'][81] = 0;
  _$jscoverage['view.js'][82] = 0;
}
_$jscoverage['view.js'][12]++;
var path = require("path"), utils = require("./utils"), fs = require("fs"), dirname = path.dirname, basename = path.basename, extname = path.extname, exists = path.existsSync, join = path.join;
_$jscoverage['view.js'][25]++;
module.exports = View;
_$jscoverage['view.js'][41]++;
function View(name, options) {
  _$jscoverage['view.js'][42]++;
  options = options || {};
  _$jscoverage['view.js'][43]++;
  this.name = name;
  _$jscoverage['view.js'][44]++;
  this.root = options.root;
  _$jscoverage['view.js'][45]++;
  var engines = options.engines;
  _$jscoverage['view.js'][46]++;
  this.defaultEngine = options.defaultEngine;
  _$jscoverage['view.js'][47]++;
  var ext = this.ext = extname(name);
  _$jscoverage['view.js'][48]++;
  if (! ext) {
    _$jscoverage['view.js'][48]++;
    name += (ext = this.ext = "." + this.defaultEngine);
  }
  _$jscoverage['view.js'][49]++;
  this.engine = engines[ext] || (engines[ext] = require(ext.slice(1)).__express);
  _$jscoverage['view.js'][50]++;
  this.path = this.lookup(name);
}
_$jscoverage['view.js'][61]++;
View.prototype.lookup = (function (path) {
  _$jscoverage['view.js'][62]++;
  var ext = this.ext;
  _$jscoverage['view.js'][65]++;
  if (! utils.isAbsolute(path)) {
    _$jscoverage['view.js'][65]++;
    path = join(this.root, path);
  }
  _$jscoverage['view.js'][66]++;
  if (exists(path)) {
    _$jscoverage['view.js'][66]++;
    return path;
  }
  _$jscoverage['view.js'][69]++;
  path = join(dirname(path), basename(path, ext), "index" + ext);
  _$jscoverage['view.js'][70]++;
  if (exists(path)) {
    _$jscoverage['view.js'][70]++;
    return path;
  }
});
_$jscoverage['view.js'][81]++;
View.prototype.render = (function (options, fn) {
  _$jscoverage['view.js'][82]++;
  this.engine(this.path, options, fn);
});
_$jscoverage['view.js'].source = ["","/*!"," * Express - View"," * Copyright(c) 2010 TJ Holowaychuk &lt;tj@vision-media.ca&gt;"," * MIT Licensed"," */","","/**"," * Module dependencies."," */","","var path = require('path')","  , utils = require('./utils')","  , fs = require('fs')","  , dirname = path.dirname","  , basename = path.basename","  , extname = path.extname","  , exists = 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);","};"];
