Class: TriggerThatInvokedConstraint
- Inherits:
-
Constraint
- Object
- MacroObject
- Constraint
- TriggerThatInvokedConstraint
- Defined in:
- lib/ruby-macrodroid.rb
Overview
Category: MacroDroid Specific
Instance Attribute Summary
Attributes inherited from MacroObject
Instance Method Summary collapse
-
#initialize(h = {}) ⇒ TriggerThatInvokedConstraint
constructor
A new instance of TriggerThatInvokedConstraint.
- #to_s ⇒ Object
Methods inherited from Constraint
Methods inherited from MacroObject
Constructor Details
#initialize(h = {}) ⇒ TriggerThatInvokedConstraint
Returns a new instance of TriggerThatInvokedConstraint.
4725 4726 4727 4728 4729 4730 4731 4732 4733 4734 4735 4736 4737 4738 |
# File 'lib/ruby-macrodroid.rb', line 4725 def initialize(h={}) puts ('h: ' + h.inspect).green @trigger = h[:macro].triggers.find {|x| x.siguid == h[:si_guid_that_invoked] } = { not: false, si_guid_that_invoked: -4951291100076165433, trigger_name: 'Shake Device' } super(.merge filter(,h)) end |
Instance Method Details
#to_s ⇒ Object
4740 4741 4742 |
# File 'lib/ruby-macrodroid.rb', line 4740 def to_s() 'Trigger Fired: ' + @trigger.to_s end |