From 7132cacbf605d2a89a1e815f0f586c9bcab0365c Mon Sep 17 00:00:00 2001 From: Craig R Webster Date: Thu, 24 Nov 2011 15:58:53 +0000 Subject: [PATCH] Wrap around to the first colour when all the colours are used --- lib/foreman/engine.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/foreman/engine.rb b/lib/foreman/engine.rb index 8d71bf2..c9191b4 100644 --- a/lib/foreman/engine.rb +++ b/lib/foreman/engine.rb @@ -184,7 +184,8 @@ private ###################################################################### def next_color @current_color ||= -1 @current_color += 1 - @current_color >= COLORS.length ? "" : COLORS[@current_color] + @current_color = 0 if COLORS.length < @current_color + COLORS[@current_color] end module Env