class MediaButtonPressedTrigger
Category: User Input
Public Class Methods
new(obj=nil)
click to toggle source
Calls superclass method
Trigger::new
# File lib/ruby-macrodroid/triggers.rb, line 1698 def initialize(obj=nil) h = if obj.is_a? Hash then obj elsif obj.is_a? Array e, macro = obj {option: e.text('item/description').to_s} end options = { option: 'Single Press', cancel_press: false } 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 1716 def to_s(colour: false) @s = 'Media Button Pressed ' #+ @h.inspect @s += "\n" + @h[:option] super() end
Also aliased as: to_summary