Created
May 8, 2014 12:08
-
-
Save marcusbesjes/f210f64c82ff8765b634 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var Hub = module.exports = function(options) { | |
this.options = options; | |
this.view.init(this); | |
}; | |
require('./view'); | |
require('./log'); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var Hub = require('./hub'); | |
var hub = new Hub({ | |
logging: true | |
}); | |
hub.log() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var Hub = require('./hub'); | |
Hub.prototype.log = function() { | |
console.log('I am a Hub!\n', this); | |
}; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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