diff options
author | Jérémy Zurcher <jeremy@asynk.ch> | 2012-01-03 17:23:18 +0100 |
---|---|---|
committer | Jérémy Zurcher <jeremy@asynk.ch> | 2012-01-03 17:23:18 +0100 |
commit | eee3d11a9a6518ddba74a486c3a3b6e4569407ba (patch) | |
tree | ceb44a156b7b73e73bd12807974ead6888f183f2 /lib | |
parent | afb8f59b9333dadd5129c0862e5677c100c803a5 (diff) | |
download | zorglub-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.rb | 14 |
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 |