summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorJérémy Zurcher <jeremy@asynk.ch>2012-01-16 14:17:37 +0100
committerJérémy Zurcher <jeremy@asynk.ch>2012-01-16 14:17:37 +0100
commitcddb168e3188a0d4c04f900898f77ad9584c2f4e (patch)
tree398323e1c80e88bbc61d674ef653a2345812de2f /lib
parent71907c734febd304333be1c921402f155dcaa11d (diff)
downloadzorglub-cddb168e3188a0d4c04f900898f77ad9584c2f4e.zip
zorglub-cddb168e3188a0d4c04f900898f77ad9584c2f4e.tar.gz
Node: set view\!
Diffstat (limited to 'lib')
-rw-r--r--lib/zorglub/node.rb7
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/zorglub/node.rb b/lib/zorglub/node.rb
index ad4408c..7f81c2e 100644
--- a/lib/zorglub/node.rb
+++ b/lib/zorglub/node.rb
@@ -213,8 +213,11 @@ module Zorglub
File.join(Config.static_base_path, @options[:view])+ext
end
#
- def view view=nil
- @options[:view] = view unless view.nil? or view.empty?
+ def view! view
+ @options[:view] = view
+ end
+ #
+ def view
return '' if @options[:view].nil?
File.join(Config.view_base_path, @options[:view])+ext
end