Class: Wizrb::Lighting::Events::SetRgbEvent
- Inherits:
-
Shared::Events::Base
- Object
- Shared::Events::Base
- Wizrb::Lighting::Events::SetRgbEvent
- Defined in:
- lib/wizrb/lighting/events/set_rgb_event.rb
Constant Summary collapse
- MIN_VALUE =
1
- MAX_VALUE =
255
Instance Attribute Summary
Attributes inherited from Shared::Events::Base
Instance Method Summary collapse
-
#initialize(red, green, blue) ⇒ SetRgbEvent
constructor
A new instance of SetRgbEvent.
Methods inherited from Shared::Events::Base
Constructor Details
#initialize(red, green, blue) ⇒ SetRgbEvent
Returns a new instance of SetRgbEvent.
12 13 14 15 16 17 |
# File 'lib/wizrb/lighting/events/set_rgb_event.rb', line 12 def initialize(red, green, blue) validate_color!("Red", red) validate_color!("Green", green) validate_color!("Blue", blue) super(method: "setState", params: {r: red, g: green, b: blue}) end |