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/screen_text_color.rb | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) (limited to 'lib/sisu/v3/screen_text_color.rb') diff --git a/lib/sisu/v3/screen_text_color.rb b/lib/sisu/v3/screen_text_color.rb index 67022087..cef15585 100644 --- a/lib/sisu/v3/screen_text_color.rb +++ b/lib/sisu/v3/screen_text_color.rb @@ -69,16 +69,11 @@ module SiSU_Screen @color_instruct=txt[0] flag=SiSU_Env::InfoProcessingFlag.new if @cmd - if flag.color #set default colors on or off -c acts as toggle against this default, if default is off -c turns on, if default is on -c turns off - @use_color=if @cmd =~/c/; false - else true - end - else - @use_color=if @cmd =~/c/; true - else false - end - end - if @cmd =~/k/; @use_color=false + #set default colors on or off -c acts as toggle against this default, if default is off -c turns on, if default is on -c turns off + @use_color=(flag.color) \ + ? ((@cmd =~/c/) ? false : true) + : ((@cmd =~/c/) ? true : false) + if @cmd =~/k/ then @use_color=false end else @use_color=false end -- cgit v1.2.3