summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorJérémy Zurcher <jeremy@asynk.ch>2012-01-16 15:28:40 +0100
committerJérémy Zurcher <jeremy@asynk.ch>2012-01-16 15:28:40 +0100
commitd88ac85cebf1a5f0271c490063eefd693e1aa7d1 (patch)
treedb70f52ae1a3a5c1f73bf47774a3dc829a540ff6 /lib
parent79583cd71f7b949cbe2db780ad71ee01099ce3c6 (diff)
downloadzorglub-d88ac85cebf1a5f0271c490063eefd693e1aa7d1.zip
zorglub-d88ac85cebf1a5f0271c490063eefd693e1aa7d1.tar.gz
add Node.view_base_path!
Diffstat (limited to 'lib')
-rw-r--r--lib/zorglub/node.rb10
1 files changed, 9 insertions, 1 deletions
diff --git a/lib/zorglub/node.rb b/lib/zorglub/node.rb
index 3f3b2c9..330a431 100644
--- a/lib/zorglub/node.rb
+++ b/lib/zorglub/node.rb
@@ -42,6 +42,14 @@ module Zorglub
@layout = layout
end
#
+ def view_base_path! path
+ @view_base_path = path
+ end
+ #
+ def view_base_path
+ @view_base_path ||= Config.view_base_path
+ end
+ #
def static! val
@static = val if (val==true or val==false)
@static ||= false
@@ -231,7 +239,7 @@ module Zorglub
#
def view
return '' if @options[:view].nil?
- File.join(Config.view_base_path, @options[:view])+ext
+ File.join(self.class.view_base_path, @options[:view])+ext
end
#
def ext! ext