{"size": 1297, "ext": "js", "max_stars_repo_path": "app/scripts/libs/Polymorphism.js", "max_stars_repo_name": "dillontcordova/AngularTemplate", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "app/scripts/libs/Polymorphism.js", "max_issues_repo_name": "dillontcordova/AngularTemplate", "max_issues_repo_issues_event_min_datetime": "2017-08-25T06:47:42.000Z", "max_issues_repo_issues_event_max_datetime": "2017-08-25T06:56:34.000Z", "max_forks_repo_path": "app/scripts/libs/Polymorphism.js", "max_forks_repo_name": "dillontcordova/AngularTemplate", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": 1, "max_forks_count": null, "avg_line_length": 39.303030303, "max_line_length": 155, "alphanum_fraction": 0.7116422513}
/**
 * Created by dillon_cordova on 1/4/2016.
 */
var Polymorphism = (function() {
	return {
		/*Called at the beginning of a Singleton Class*/
		singletonClass: function(_staticInstanceVar) {
			Assert.is( !_staticInstanceVar, 'Can not re-instantiate a singleton!');
		},

		/*Called at the beginning of an Abstract Class*/
		abstractClass: function(_instance, _arguments) {
			var constructor = _instance.constructor;
			Assert.is( constructor != _arguments.callee, '"' + constructor.caller.name + ' can not instantiate abstract class: "' + _arguments.callee.name + '"!' );
		},

		/*Called at the beginning of an Abstract Method*/
		abstractMethod: function(_instance) {
			var constructor = _instance.constructor;
			throw new Error('Function-Class "' + constructor.name + '" has not overriden all parent abstract methods!');
		},

		/*Called at the beginning of the file; of which the class is inheriting from the parent*/
		inherits: function(_child, _parent) {
			Assert.is( !!_child && !!_parent, 'Both a Child and a Parent Function-Class must be present in order to properly call the inherits method!');
			function TempConstructor() {}
			TempConstructor.prototype = _parent.prototype;
			_child.prototype = new TempConstructor();
			_child.prototype.constructor = _child;
		}
	};
})();
