Class: StopWatchAction

Inherits:
DateTimeAction show all
Defined in:
lib/ruby-macrodroid/actions.rb

Overview

Category: Date/Time

Instance Attribute Summary

Attributes inherited from Action

#constraints

Attributes inherited from MacroObject

#options, #siguid, #type

Instance Method Summary collapse

Methods inherited from Action

#invoke

Methods inherited from MacroObject

#to_h

Constructor Details

#initialize(h = {}) ⇒ StopWatchAction

Returns a new instance of StopWatchAction.



646
647
648
649
650
651
652
653
654
655
# File 'lib/ruby-macrodroid/actions.rb', line 646

def initialize(h={})

  options = {
    stopwatch_name: 'timer1',
    option: 0
  }

  super(options.merge h)

end

Instance Method Details

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



657
658
659
# File 'lib/ruby-macrodroid/actions.rb', line 657

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