Class: MediaButtonPressedTrigger

Inherits:
Trigger show all
Defined in:
lib/ruby-macrodroid.rb

Overview

Category: User Input

Instance Attribute Summary

Attributes inherited from Trigger

#constraints

Attributes inherited from MacroObject

#options, #siguid, #type

Instance Method Summary collapse

Methods inherited from Trigger

#match?

Methods inherited from MacroObject

#to_h

Constructor Details

#initialize(h = {}) ⇒ MediaButtonPressedTrigger

Returns a new instance of MediaButtonPressedTrigger.



2728
2729
2730
2731
2732
2733
2734
2735
2736
2737
# File 'lib/ruby-macrodroid.rb', line 2728

def initialize(h={})

  options = {
    option: 'Single Press',
    cancel_press: false
  }

  super(options.merge h)

end

Instance Method Details

#to_s(colour: false) ⇒ Object Also known as: to_summary



2739
2740
2741
# File 'lib/ruby-macrodroid.rb', line 2739

def to_s(colour: false)
  'MediaButtonPressedTrigger ' + @h.inspect
end