Module: ColorRotator
- Defined in:
- lib/pcol.rb
Constant Summary collapse
- PCOL_COLORS =
[:red, :green, :yellow, :blue, :light_red, :light_green, :light_blue].to_enum
Class Method Summary collapse
Class Method Details
.next(color = nil) ⇒ Object
7 8 9 10 11 12 13 14 |
# File 'lib/pcol.rb', line 7 def self.next(color=nil) begin color = PCOL_COLORS.next rescue PCOL_COLORS.rewind color = PCOL_COLORS.next end end |