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.



2735
2736
2737
2738
2739
2740
2741
2742
2743
2744
# File 'lib/ruby-macrodroid.rb', line 2735

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



2746
2747
2748
# File 'lib/ruby-macrodroid.rb', line 2746

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