lib/Remotable.js
function extend(target, options){
    options = options||{};
    var parentClass = this;
    logger.trace("Extending from ",   parentClass._angoosemeta.name, options);
    var rv = null;
    if(typeof (target) == 'function'){
        rv = target;
        mixinInstance(parentClass, rv, options);
        
        /**@todo: temp hack */
        bindMongooseMethods(rv);       
    }
    else{ 
        /** schema object */ 
        rv = parentClass.$extend( target );
    }
   
    /** mixin Angoose class level functions */       
    rv = mixinStatic(parentClass, rv, options);   
    if(rv._angoosemeta.name){
        /**  register it with Angoose */
       //require("./angoose").registerClass(rv._angoosemeta.name, rv);
    }
    return rv;
}
function extend(target, options){
    options = options||{};
    var parentClass = this;
    logger.trace("Extending from ",   parentClass._angoosemeta.name, options);
    var rv = null;
    if(typeof (target) == 'function'){
        rv = target;
        mixinInstance(parentClass, rv, options);
        
        /**@todo: temp hack */
        bindMongooseMethods(rv);       
    }
    else{ 
        /** schema object */ 
        rv = parentClass.$extend( target );
    }
   
    /** mixin Angoose class level functions */       
    rv = mixinStatic(parentClass, rv, options);   
    if(rv._angoosemeta.name){
        /**  register it with Angoose */
       //require("./angoose").registerClass(rv._angoosemeta.name, rv);
    }
    return rv;
}
** extend **  This static method is used to create Angoose model or service classes. All classes created using this method is a subclass of `Remotable`