class MusicPlayingTrigger

Category: Device Events

Public Class Methods

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

  options = {
    option: 0
  }

  super(options.merge h)

end

Public Instance Methods

to_s(colour: false) click to toggle source
Calls superclass method Trigger#to_s
# File lib/ruby-macrodroid/triggers.rb, line 1027
def to_s(colour: false)
  
  event = @h[:option] == 0 ? 'Started' : 'Stopped'
  @s = 'Music/Sound Playing' + "\n%s" % event #+ @h.inspect
  super()
  
end
to_summary(colour: false) click to toggle source
# File lib/ruby-macrodroid/triggers.rb, line 1035
def to_summary(colour: false)
  event = @h[:option] == 0 ? 'Started' : 'Stopped'
  @s = 'Music/Sound Playing' + " (%s)" % event #+ @h.inspect
end