Created
July 2, 2013 17:00
-
-
Save DavidCarcamo/5911091 to your computer and use it in GitHub Desktop.
Class
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Creates an instance of ClassName. | |
* @author Author Name | |
* | |
* @constructor | |
* @this {ClassName} | |
* @param {object} The settings for this class. | |
* @version v.0.0.1 | |
*/ | |
// JSLint | |
/*global | |
VarName1:false, | |
varName2:false | |
*/ | |
var ClassName = function(){ | |
var constructor = function(settings){ | |
// SETUP | |
var _this = this; | |
var defaults; | |
// compile settings | |
defaults = {}; | |
settings = _.extend(settings || {}, defaults); | |
// METHODS | |
/** | |
* A public privilaged method. | |
* | |
* @this {ClassName} | |
*/ | |
_this.publicPrivilaged = function(){ | |
}; | |
/** | |
* A private method. | |
* | |
* @this {ClassName} | |
*/ | |
var private = function(){ | |
}; | |
// if auto initialize | |
_this.initialize(); | |
// return instance | |
return _this; | |
}; | |
// PROPERTIES | |
// Shorthand | |
var pro = constructor.prototype; | |
// Public Shared Property | |
pro.template = '<div></div>'; | |
// METHODS | |
/** | |
* Public Shared method. | |
* | |
* @this {ClassName} | |
*/ | |
pro.publicShared = function(){ | |
}; | |
return constructor; | |
}(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment