lib/gruff/base.rb
# Uses the next color in your color list.
Uses the next color in your color list.
Uses the next color in your color list .
def increment_color
      if @color_index == 0
        @color_index += 1
        return @colors[0]
      else
        if @color_index < @colors.length
          @color_index += 1
          return @colors[@color_index - 1]
        else
          @color_index = 0
          return @colors[-1]
        end
      end
    end
def increment_color if @color_index == 0 @color_index += 1 return @colors [ 0 ] else if @color_index < @colors . length @color_index += 1 return @colors [ @color_index - 1 ] else @color_index = 0 return @colors [ - 1 ] end end end
Uses the next color in your color list.
Uses the next color in your color list .
# Start over