summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorJérémy Zurcher <jeremy@asynk.ch>2012-01-03 17:23:18 +0100
committerJérémy Zurcher <jeremy@asynk.ch>2012-01-03 17:23:18 +0100
commiteee3d11a9a6518ddba74a486c3a3b6e4569407ba (patch)
treeceb44a156b7b73e73bd12807974ead6888f183f2 /lib
parentafb8f59b9333dadd5129c0862e5677c100c803a5 (diff)
downloadzorglub-eee3d11a9a6518ddba74a486c3a3b6e4569407ba.zip
zorglub-eee3d11a9a6518ddba74a486c3a3b6e4569407ba.tar.gz
config: simpify #view_base_path and #layout_base_path
Diffstat (limited to 'lib')
-rw-r--r--lib/zorglub/config.rb14
1 files changed, 4 insertions, 10 deletions
diff --git a/lib/zorglub/config.rb b/lib/zorglub/config.rb
index 44574a9..e4804fd 100644
--- a/lib/zorglub/config.rb
+++ b/lib/zorglub/config.rb
@@ -23,19 +23,13 @@ module Zorglub
end
#
def view_base_path
- if @options.has_key? :view_path
- @options[:view_path]
- else
- File.join @options[:root], @options[:view_dir]
- end
+ p = @options[:view_path]
+ ( p.nil? ? File.join(@options[:root], @options[:view_dir]) : p )
end
#
def layout_base_path
- if @options.has_key? :layout_path
- @options[:layout_path]
- else
- File.join @options[:root], @options[:layout_dir]
- end
+ p = @options[:layout_path]
+ ( p.nil? ? File.join(@options[:root], @options[:layout_dir]) : p )
end
#
def register_engine name, ext, proc