Skip to content

Commit

Permalink
add ability to get the lB object (getParent) - perhaps a bit messy bu…
Browse files Browse the repository at this point in the history
…t allows us to overwrite a renderer with the same name
  • Loading branch information
terrbearCodes committed Oct 8, 2011
1 parent 63904b9 commit b3abef3
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions lib/lazyBum.js
Expand Up @@ -476,13 +476,17 @@ var getLocal = function(str){
return require('./' + str);
}
}
var getParent = function(str){
return require('./' + str)
}

exports.getHelper = function(str) {
return getLocal('helpers/' + str);
}

exports.getRenderer = function(str) {
return getLocal('renderers/' + str);
exports.getRenderer = function(str, parent) {
if(parent){ return getParent('renderers/' + str); }
else{ return getLocal('renderers/' + str); }
}

exports.getLogger = function(mod) {
Expand Down

0 comments on commit b3abef3

Please sign in to comment.