Skip to content

Instantly share code, notes, and snippets.

@mikob
Created August 13, 2014 18:47
Show Gist options
  • Save mikob/ef4a7d765ce86a324f36 to your computer and use it in GitHub Desktop.
Save mikob/ef4a7d765ce86a324f36 to your computer and use it in GitHub Desktop.
function Messenger() {
}
Messenger.prototype.send = function(parcel) {
console.log("Handle auditing here");
this._send(parcel);
};
function TextMessenger(){
this._send = function(parcel) {
console.log("Handle sending text message here: " + parcel);
};
}
TextMessenger.prototype = new Messenger();
var textMessenger = new TextMessenger();
textMessenger.send("hello there");
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment