Class: StopwatchTrigger

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

Overview

Category: Date/Time

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

Returns a new instance of StopwatchTrigger.



727
728
729
730
731
732
733
734
735
736
# File 'lib/ruby-macrodroid/triggers.rb', line 727

def initialize(h={})

  options = {
    stopwatch_name: 'timer1',
    seconds: 240
  }

  super(options.merge h)

end

Instance Method Details

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



738
739
740
# File 'lib/ruby-macrodroid/triggers.rb', line 738

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