Class: SwipeTrigger

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 = {}) ⇒ SwipeTrigger

Returns a new instance of SwipeTrigger.



2750
2751
2752
2753
2754
2755
2756
2757
2758
2759
2760
# File 'lib/ruby-macrodroid.rb', line 2750

def initialize(h={})

  options = {
    swipe_start_area: 0,
    swipe_motion: 0,
    cleared: true
  }

  super(options.merge h)

end

Instance Method Details

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



2762
2763
2764
# File 'lib/ruby-macrodroid.rb', line 2762

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