Class: SetVibrateAction
- Inherits:
-
VolumeAction
- Object
- MacroObject
- Action
- VolumeAction
- SetVibrateAction
- Defined in:
- lib/ruby-macrodroid.rb
Overview
Category: Volume
Instance Attribute Summary
Attributes inherited from Action
Attributes inherited from MacroObject
Instance Method Summary collapse
-
#initialize(h = {}) ⇒ SetVibrateAction
constructor
A new instance of SetVibrateAction.
- #to_s(colour: false) ⇒ Object
- #to_summary(colour: false) ⇒ Object
Methods inherited from Action
Methods inherited from MacroObject
Constructor Details
#initialize(h = {}) ⇒ SetVibrateAction
Returns a new instance of SetVibrateAction.
4639 4640 4641 4642 4643 4644 4645 4646 4647 4648 |
# File 'lib/ruby-macrodroid.rb', line 4639 def initialize(h={}) = { option: 'Silent (Vibrate On)', option_int: -1 } super(.merge h) end |
Instance Method Details
#to_s(colour: false) ⇒ Object
4650 4651 4652 4653 4654 4655 4656 4657 4658 4659 4660 4661 4662 4663 4664 |
# File 'lib/ruby-macrodroid.rb', line 4650 def to_s(colour: false) a = [ 'Silent (Vibrate On)', 'Normal (Vibrate Off)', 'Vibrate when ringing On', 'Vibrate when ringing Off', 'Vibrate when ringing Toggle' ] status = a[@h[:option_int]] @s = 'Vibrate Enable/Disable ' + "\n " + status + "\n " super() end |
#to_summary(colour: false) ⇒ Object
4666 4667 4668 4669 4670 |
# File 'lib/ruby-macrodroid.rb', line 4666 def to_summary(colour: false) @s = 'Vibrate Enable/Disable' end |