Class: SetVibrateAction
- Inherits:
-
VolumeAction
- Object
- MacroObject
- Action
- VolumeAction
- SetVibrateAction
- Defined in:
- lib/ruby-macrodroid/actions.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, indent: 0) ⇒ Object
- #to_summary(colour: false) ⇒ Object
Methods inherited from Action
Methods included from ObjectX
#action_to_object, #object_create, #varify
Methods inherited from MacroObject
Constructor Details
#initialize(h = {}) ⇒ SetVibrateAction
Returns a new instance of SetVibrateAction.
2804 2805 2806 2807 2808 2809 2810 2811 2812 2813 |
# File 'lib/ruby-macrodroid/actions.rb', line 2804 def initialize(h={}) = { option: 'Silent (Vibrate On)', option_int: -1 } super(.merge h) end |
Instance Method Details
#to_s(colour: false, indent: 0) ⇒ Object
2815 2816 2817 2818 2819 2820 2821 2822 2823 2824 2825 2826 2827 2828 2829 |
# File 'lib/ruby-macrodroid/actions.rb', line 2815 def to_s(colour: false, indent: 0) 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 super() end |
#to_summary(colour: false) ⇒ Object
2831 2832 2833 2834 2835 |
# File 'lib/ruby-macrodroid/actions.rb', line 2831 def to_summary(colour: false) @s = 'Vibrate Enable/Disable' end |