class ColorPicker
Public Class Methods
new()
click to toggle source
# File lib/smartos-manager/cli.rb, line 10 def initialize @colors = {} @available_colors = %w(green yellow cyan magenta blue red gray white) end
Public Instance Methods
get(str)
click to toggle source
# File lib/smartos-manager/cli.rb, line 15 def get(str) @colors[str] ||= @available_colors.shift() end