this.directives = _.reduce(this.directives, function (directives, fn, ns) { // fn may be either a function by itself or // a string that refers to a method of the view object. directives[aux.camelCase(ns)] = _.isString(fn) ? this[fn] : fn; // return the directives. return directives; }, {}, this);
function buildDirectiveKey(namespace, directiveNamespace) { return aux.camelCase(namespace + '-' + directiveNamespace); }