UNPKG

mvcjs

Version:

Powerful lightweight mvc framework for nodejs

27 lines (26 loc) 773 B
"use strict"; /* global loader: true, Type: true, error: true, RouteRuleInterface: true, require: true */ var di = require('../di'), Type = di.load('typejs'), error = di.load('error'), RouteRuleInterface; /** * @license Mit Licence 2014 * @since 0.0.1 * @author Igor Ivanovic * @name RouteRuleInterface * * @constructor * @description * Route rule interface */ RouteRuleInterface = Type.create({}, { _invoke: function RouteRuleInterface() { ["parseRequest", "createUrl"].forEach(function (method) { if (!(method in this)) { throw new error.DataError({method: method}, 'RouteRuleInterface: missing method in routerRule object'); } }.bind(this)); } }); module.exports = RouteRuleInterface;