From b3abef35cfa68fb8b39eba76f273cdd5d2c2db87 Mon Sep 17 00:00:00 2001 From: Terry Keeney Date: Sat, 8 Oct 2011 08:23:57 -0600 Subject: [PATCH] add ability to get the lB object (getParent) - perhaps a bit messy but allows us to overwrite a renderer with the same name --- lib/lazyBum.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/lib/lazyBum.js b/lib/lazyBum.js index 7224533..d7b2b69 100755 --- a/lib/lazyBum.js +++ b/lib/lazyBum.js @@ -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) {