class SetVibrateAction

Category: Volume

Public Class Methods

new(h={}) click to toggle source
Calls superclass method VolumeAction::new
# File lib/ruby-macrodroid/actions.rb, line 3046
def initialize(h={})

  options = {
    option: 'Silent (Vibrate On)',
    option_int: -1
  }

  super(options.merge h)

end

Public Instance Methods

to_s(colour: false, indent: 0) click to toggle source
Calls superclass method MacroObject#to_s
# File lib/ruby-macrodroid/actions.rb, line 3057
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) click to toggle source
# File lib/ruby-macrodroid/actions.rb, line 3073
def to_summary(colour: false)
  
  @s = 'Vibrate Enable/Disable'
  
end