Skip to content

Instantly share code, notes, and snippets.

@mikob
Created August 13, 2014 18:47

Revisions

  1. mikob created this gist Aug 13, 2014.
    19 changes: 19 additions & 0 deletions gistfile1.txt
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,19 @@
    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");