Created
August 7, 2012 23:52
-
-
Save sdesai/3290656 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
var MS = function(config) { | |
/* Whatever constructor stuff you wanted. | |
No point chaining, since there's no inheritance, | |
and Y.ModelSync.REST's constructor and initializer | |
will get called by the infrastructure | |
*/ | |
}; | |
... | |
MS.prototype.getURL : function (action, options) { | |
if (Lang.isArray(this._shelves)) { | |
return this.root; | |
} | |
// other conditions here | |
return Y.ModelSync.REST.prototype.getURL.apply(this, arguments); | |
}; | |
MS.prototype.sync = function() { | |
if (someoverridecondition) { | |
// new logic | |
} else { | |
Y.ModelSync.REST.prototype.sync.apply(this, arguments); | |
} | |
}; | |
Y.GalleryModelSync = MS; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment