diff options
author | Ralph Amissah <ralph@amissah.com> | 2012-10-01 15:33:55 -0400 |
---|---|---|
committer | Ralph Amissah <ralph@amissah.com> | 2012-10-01 15:33:55 -0400 |
commit | 7d4665f60be31a0481416cfc152bac4442cc6e74 (patch) | |
tree | 295a7c81ace0792ab5a32427cdbb9c6b8e1a6184 /lib/sisu/v3/screen_text_color.rb | |
parent | v3: vim, ftplugin/sisu.vim (diff) |
v3: cosmetic code, true ? x : y
Diffstat (limited to 'lib/sisu/v3/screen_text_color.rb')
-rw-r--r-- | lib/sisu/v3/screen_text_color.rb | 15 |
1 files changed, 5 insertions, 10 deletions
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 |