From 7d4665f60be31a0481416cfc152bac4442cc6e74 Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Mon, 1 Oct 2012 15:33:55 -0400 Subject: v3: cosmetic code, true ? x : y --- lib/sisu/v3/sitemaps.rb | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'lib/sisu/v3/sitemaps.rb') diff --git a/lib/sisu/v3/sitemaps.rb b/lib/sisu/v3/sitemaps.rb index 86a8e2fb..d45af899 100644 --- a/lib/sisu/v3/sitemaps.rb +++ b/lib/sisu/v3/sitemaps.rb @@ -97,10 +97,9 @@ module SiSU_Sitemaps end end def make_file(path,filename) - if File.writable?("#{path}/."); File.new("#{path}/#{filename}",'w+') - else - SiSU_Screen::Ansi.new('',"is the file or directory writable?, could not create #{filename}").warn - end + (File.writable?("#{path}/.")) \ + ? (File.new("#{path}/#{filename}",'w+')) + : (SiSU_Screen::Ansi.new('',"is the file or directory writable?, could not create #{filename}").warn) end def output_map(sitemap) path=@md.file.output_path.sitemaps.dir -- cgit v1.2.3