Class: PowerButtonToggleTrigger

Inherits:
Trigger show all
Defined in:
lib/ruby-macrodroid/triggers.rb

Overview

Category: Battery/Power

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

Returns a new instance of PowerButtonToggleTrigger.



195
196
197
198
199
200
201
202
203
# File 'lib/ruby-macrodroid/triggers.rb', line 195

def initialize(h={})

  options = {
    num_toggles: 3
  }

  super(options.merge h)

end

Instance Method Details

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



205
206
207
# File 'lib/ruby-macrodroid/triggers.rb', line 205

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