Wrap around to the first colour when all the colours are used

This commit is contained in:
Craig R Webster
2012-01-16 09:35:51 -05:00
committed by David Dollar
parent c1f279aa6f
commit 7132cacbf6
+2 -1
View File
@@ -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