Class: SwipeTrigger

Inherits:
Trigger show all
Defined in:
lib/ruby-macrodroid/triggers.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.



1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
# File 'lib/ruby-macrodroid/triggers.rb', line 1653

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



1665
1666
1667
# File 'lib/ruby-macrodroid/triggers.rb', line 1665

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