class SetVolumeAction

Category: Volume

Public Class Methods

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

  options = {
    variables: [nil, nil, nil, nil, nil, nil, nil],
    stream_index_array: [false, false, false, false, false, false, true],
    stream_volume_array: [0, 0, 0, 0, 0, 0, 66],
    force_vibrate_off: false,
    volume: -1
  }

  super(options.merge h)

end

Public Instance Methods

to_s(colour: false, indent: 0) click to toggle source
# File lib/ruby-macrodroid/actions.rb, line 3141
def to_s(colour: false, indent: 0)
  volume = @h[:stream_index_array].zip(@h[:stream_volume_array]).to_h[true]
  'Volume Change ' + "Notification = %s%%" % volume    
end