DocumentJS.types.class  class     

Documents a 'Class'.

A class is typically a collection of static and prototype functions.

DocumentJS can automatically detect classes created with jQuery.Class.

However, you can make anything a class with the @class ClassName directive.

Example:

/**
 * @class 
 * Person represents a human with a name.  Read about the 
 * animal class [Animal | here]. 
 */
Person = Animal.extend(
/* @Static */
{
   /* Number of People */
   count: 0
},
/* @Prototype */
{
   init : function(name){
     this.name = name
     this._super({warmblood: true})
   },
   /* Returns a formal name 
    * @return {String} the name with "Mrs." added
    */
  fancyName : function(){
     return "Mrs. "+this.name;
  }
})
© Jupiter IT - JavaScriptMVC Training and Support