Class: VibrateAction
- Inherits:
-
DeviceSettingsAction
- Object
- MacroObject
- Action
- DeviceSettingsAction
- VibrateAction
- Defined in:
- lib/ruby-macrodroid.rb
Overview
Category: Device Settings
Instance Attribute Summary
Attributes inherited from Action
Attributes inherited from MacroObject
Instance Method Summary collapse
-
#initialize(h = {}) ⇒ VibrateAction
constructor
A new instance of VibrateAction.
- #to_s(colour: false) ⇒ Object
Methods inherited from Action
Methods inherited from MacroObject
Constructor Details
#initialize(h = {}) ⇒ VibrateAction
Returns a new instance of VibrateAction.
3533 3534 3535 3536 3537 3538 3539 3540 3541 |
# File 'lib/ruby-macrodroid.rb', line 3533 def initialize(h={}) = { vibrate_pattern: 1 } super(.merge h) end |
Instance Method Details
#to_s(colour: false) ⇒ Object
3543 3544 3545 3546 3547 3548 3549 3550 3551 3552 |
# File 'lib/ruby-macrodroid.rb', line 3543 def to_s(colour: false) pattern = [ 'Blip', 'Short Buzz', 'Long Buzz', 'Rapid', 'Slow', 'Increasing', 'Constant', 'Decreasing', 'Final Fantasy', 'Game Over', 'Star Wars', 'Mini Blip', 'Micro Blip' ] 'Vibrate ' + "(%s)" % pattern[@h[:vibrate_pattern].to_i] end |