Class: StopwatchTrigger

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



1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
# File 'lib/ruby-macrodroid.rb', line 1939

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



1950
1951
1952
# File 'lib/ruby-macrodroid.rb', line 1950

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