Wrap around to the first colour when all the colours are used
This commit is contained in:
1 parent
c1f279aa6f
commit
7132cacbf6
1 file changed
+2
-1
@@ -184,7 +184,8 @@ private ######################################################################
|
|||||||
def next_color
|
def next_color
|
||||||
@current_color ||= -1
|
@current_color ||= -1
|
||||||
@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
|
end
|
||||||
|
|
||||||
module Env
|
module Env
|
||||||
|
|||||||
Reference in new issue
Block a user