aboutsummaryrefslogtreecommitdiffhomepage
path: root/lib/sisu/v5/utils.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/sisu/v5/utils.rb')
-rw-r--r--lib/sisu/v5/utils.rb41
1 files changed, 21 insertions, 20 deletions
diff --git a/lib/sisu/v5/utils.rb b/lib/sisu/v5/utils.rb
index 52ca22d0..97ca24be 100644
--- a/lib/sisu/v5/utils.rb
+++ b/lib/sisu/v5/utils.rb
@@ -8,7 +8,8 @@
* Author: Ralph Amissah
* Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2007, 2008, 2009, 2010, 2011, 2012, 2013 Ralph Amissah, All Rights Reserved.
+ 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 Ralph Amissah,
+ All Rights Reserved.
* License: GPL 3 or later:
@@ -68,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}")