Wrap around to the first colour when all the colours are used
This commit is contained in:
committed by
David Dollar
parent
c1f279aa6f
commit
7132cacbf6
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user