Class: Focus::ChangeBlinkColor
- Inherits:
-
Action
- Object
- Action
- Focus::ChangeBlinkColor
show all
- Defined in:
- lib/focus/actions/change_blink_color.rb
Instance Method Summary
collapse
Methods inherited from Action
#call, #config, #error_message
Instance Method Details
3
4
5
6
7
|
# File 'lib/focus/actions/change_blink_color.rb', line 3
def perform
url = "#{config.blink_server}/fadeToRGB?rgb=%#{context.color}"
res = Utils::WebClient.get(url)
fail_action!(error: "Could not change blink(1) color.") unless res.success?
end
|