Code coverage report for lib\AbstractPlugin.js

Statements: 100% (11 / 11)      Branches: 50% (1 / 2)      Functions: 100% (4 / 4)      Lines: 100% (11 / 11)      Ignored: none     

All files » lib\ » AbstractPlugin.js
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23        1 1884   1   1 1 1884   4 4     1 1884 2748      
/*
	MIT License http://www.opensource.org/licenses/mit-license.php
	Author Tobias Koppers @sokra
*/
function AbstractPlugin(plugins) {
	this._plugins = plugins || {};
};
module.exports = AbstractPlugin;
 
AbstractPlugin.create = function(plugins) {
	function Plugin() {
		AbstractPlugin.call(this, plugins)
	}
	Plugin.prototype = Object.create(AbstractPlugin.prototype);
	return Plugin;
};
 
AbstractPlugin.prototype.apply = function(object) {
	for(var name in this._plugins) {
		object.plugin(name, this._plugins[name]);
	}
};