Module: Api::ColorExtension::ClassMethods
- Included in:
- Api::Color
- Defined in:
- lib/sc2ai/protocol/extensions/color.rb
Overview
Adds additional functionality to message class Api::Color
Instance Method Summary collapse
-
#random ⇒ Api::Color
Creates a new Api::Color object with random rgb values.
Instance Method Details
#random ⇒ Api::Color
Creates a new Api::Color object with random rgb values
13 14 15 |
# File 'lib/sc2ai/protocol/extensions/color.rb', line 13 def random Api::Color.new(r: rand(0..255), g: rand(0..255), b: rand(0..255)) end |