Skip to content

Instantly share code, notes, and snippets.

@solsolomon
Created May 3, 2011 20:29
Show Gist options
  • Save solsolomon/954157 to your computer and use it in GitHub Desktop.
Save solsolomon/954157 to your computer and use it in GitHub Desktop.
module pattern stub
var stub = function (settings) {
var _settings = {
$container: $('#container')
};
if (settings) {
$.extend(_settings, settings);
}
_returnObject = {
initialize: function () {
this.doSomething();
this.doSomethingElse();
},
doSomething: function () {
},
doSomethingElse: function () {
}
};
return _returnObject;
};
var instance = stub.initialize();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment