Class: FlipDeviceTrigger
- Inherits:
-
SensorsTrigger
- Object
- MacroObject
- Trigger
- SensorsTrigger
- FlipDeviceTrigger
- Defined in:
- lib/ruby-macrodroid.rb
Overview
Category: Sensors
options:
Face Up -> Face Down
Face Down -> Face Up
Any -> Face Down
Instance Attribute Summary
Attributes inherited from MacroObject
Instance Method Summary collapse
-
#initialize(h = {}) ⇒ FlipDeviceTrigger
constructor
A new instance of FlipDeviceTrigger.
- #to_pc ⇒ Object
- #to_s ⇒ Object
Methods inherited from Trigger
Methods inherited from MacroObject
Constructor Details
#initialize(h = {}) ⇒ FlipDeviceTrigger
Returns a new instance of FlipDeviceTrigger.
2180 2181 2182 2183 2184 2185 2186 2187 2188 2189 2190 |
# File 'lib/ruby-macrodroid.rb', line 2180 def initialize(h={}) = { any_start: false, face_down: true, work_with_screen_off: false } super(.merge h) end |
Instance Method Details
#to_pc ⇒ Object
2192 2193 2194 |
# File 'lib/ruby-macrodroid.rb', line 2192 def to_pc() @h[:face_down] ? 'flip_device_down?' : 'flip_device_up?' end |
#to_s ⇒ Object
2196 2197 2198 2199 2200 |
# File 'lib/ruby-macrodroid.rb', line 2196 def to_s() action = @h[:face_down] ? 'Face Up -> Face Down' : 'Face Down -> Face Up' 'Flip Device ' + action end |