From 0e42ce6f34c3cfdf370f439f58c4e3de8b05ea92 Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Mon, 6 Jan 2014 22:42:31 -0500 Subject: v5: cosmetic code, case statement --- lib/sisu/v5/utils.rb | 38 +++++++++++++++++++------------------- 1 file changed, 19 insertions(+), 19 deletions(-) (limited to 'lib/sisu/v5/utils.rb') diff --git a/lib/sisu/v5/utils.rb b/lib/sisu/v5/utils.rb index ecdbc395..97ca24be 100644 --- a/lib/sisu/v5/utils.rb +++ b/lib/sisu/v5/utils.rb @@ -69,25 +69,25 @@ module SiSU_Utils @color=color ? color : @color c={} c[:on]=case @color - when :red; ANSI_C[:red] - when :green; ANSI_C[:green] - when :yellow; ANSI_C[:yellow] - when :blue; ANSI_C[:blue] - when :fuchsia; ANSI_C[:fuchsia] - when :cyan; ANSI_C[:cyan] - when :inv_red; ANSI_C[:inv_red] - when :inv_green; ANSI_C[:inv_green] - when :inv_yellow; ANSI_C[:inv_yellow] - when :inv_blue; ANSI_C[:inv_blue] - when :inv_fuchsia; ANSI_C[:inv_fuchsia] - when :inv_cyan; ANSI_C[:inv_cyan] - when :b_red; ANSI_C[:b_red] - when :b_green; ANSI_C[:b_green] - when :b_yellow; ANSI_C[:b_yellow] - when :b_blue; ANSI_C[:b_blue] - when :b_fuchsia; ANSI_C[:b_fuchsia] - when :b_cyan; ANSI_C[:b_cyan] - else ANSI_C[:red] + when :red then ANSI_C[:red] + when :green then ANSI_C[:green] + when :yellow then ANSI_C[:yellow] + when :blue then ANSI_C[:blue] + when :fuchsia then ANSI_C[:fuchsia] + when :cyan then ANSI_C[:cyan] + when :inv_red then ANSI_C[:inv_red] + when :inv_green then ANSI_C[:inv_green] + when :inv_yellow then ANSI_C[:inv_yellow] + when :inv_blue then ANSI_C[:inv_blue] + when :inv_fuchsia then ANSI_C[:inv_fuchsia] + when :inv_cyan then ANSI_C[:inv_cyan] + when :b_red then ANSI_C[:b_red] + when :b_green then ANSI_C[:b_green] + when :b_yellow then ANSI_C[:b_yellow] + when :b_blue then ANSI_C[:b_blue] + when :b_fuchsia then ANSI_C[:b_fuchsia] + when :b_cyan then ANSI_C[:b_cyan] + else ANSI_C[:red] end c[:off]= ANSI_C[:off] #ansi_color + @line.to_s + ansi_color_off + ' ' + @file.gsub(/([^\/]+$)/,"#{ansi_color}\\1#{ansi_color_off}") -- cgit v1.2.3