diff options
author | Ralph Amissah <ralph@amissah.com> | 2014-01-06 23:05:26 -0500 |
---|---|---|
committer | Ralph Amissah <ralph@amissah.com> | 2014-01-06 23:05:26 -0500 |
commit | 4075d476731a7a1c29e399d60f6baa210f3d1cb4 (patch) | |
tree | b0fab3d856f64f0562b7b7da317cf79c3b3e05f1 /lib/sisu/v5/utils.rb | |
parent | debian/changelog (4.2.16-1) (diff) | |
parent | v5: heading recalibration, code (downstream) changes (diff) |
Merge tag 'sisu_4.2.17' into debian/sid
SiSU 4.2.17
Diffstat (limited to 'lib/sisu/v5/utils.rb')
-rw-r--r-- | lib/sisu/v5/utils.rb | 41 |
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}") |