Skip to content

Instantly share code, notes, and snippets.

@chevdor
Created January 5, 2014 11:42
Show Gist options
  • Save chevdor/8267342 to your computer and use it in GitHub Desktop.
Save chevdor/8267342 to your computer and use it in GitHub Desktop.
/Users/.../nmanotifier.js:15 this.setup(); ^ TypeError: Object #<Object> has no method 'setup'
var nma = require("nma");
var _ = require('lodash');
var log = require('../core/log.js');
var util = require('../core/util.js');
var config = util.getConfig();
var nmaConfig = config.nmanotifier;
log.debug('Loading NMA notifier');
var NMA = function() {
_.bindAll(this);
this.setup();
}
NMA.prototype.setup = function() {
if(nmaConfig.notifyOnStart) {
this.notify("blabla","blabla");
}
}
module.exports = NMA;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment