Skip to content

Instantly share code, notes, and snippets.

@marcusbesjes
Created May 8, 2014 12:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save marcusbesjes/f210f64c82ff8765b634 to your computer and use it in GitHub Desktop.
Save marcusbesjes/f210f64c82ff8765b634 to your computer and use it in GitHub Desktop.
var Hub = module.exports = function(options) {
this.options = options;
this.view.init(this);
};
require('./view');
require('./log');
var Hub = require('./hub');
var hub = new Hub({
logging: true
});
hub.log()
var Hub = require('./hub');
Hub.prototype.log = function() {
console.log('I am a Hub!\n', this);
};
var Hub = require('./hub');
Hub.prototype.view = {
init: function(H) {
H.view = {
id: Math.random()
};
}
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment