Skip to content

Instantly share code, notes, and snippets.

@qoelet
Created August 5, 2010 18:25
Show Gist options
  • Save qoelet/510146 to your computer and use it in GitHub Desktop.
Save qoelet/510146 to your computer and use it in GitHub Desktop.
Dummy.prototype.cooking = function(chicken) {
var self = this;
self.chicken = chicken;
self.cook = cook(); // assume dummy function that'll do the cooking
self.cook(chicken, function(cooked_chicken) {
self.chicken = cooked_chicken;
self.emit('cooked', self.chicken);
});
return self;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment