aboutsummaryrefslogtreecommitdiffhomepage
path: root/lib/sisu/v5/utils.rb
diff options
context:
space:
mode:
authorRalph Amissah <ralph@amissah.com>2014-01-06 22:42:31 -0500
committerRalph Amissah <ralph@amissah.com>2014-01-06 22:42:31 -0500
commit0e42ce6f34c3cfdf370f439f58c4e3de8b05ea92 (patch)
tree6fc9ffb3f627a91138a1479d6fa144687b7b45e3 /lib/sisu/v5/utils.rb
parentv5: docbook, fictionbook, some tidying (diff)
v5: cosmetic code, case statement
Diffstat (limited to 'lib/sisu/v5/utils.rb')
-rw-r--r--lib/sisu/v5/utils.rb38
1 files changed, 19 insertions, 19 deletions
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}")