class StopWatchAction
Category: Date/Time
Public Class Methods
new(h={})
click to toggle source
Calls superclass method
DateTimeAction::new
# File lib/ruby-macrodroid/actions.rb, line 986 def initialize(h={}) options = { stopwatch_name: 'timer1', option: 0 } super(options.merge h) end
Public Instance Methods
to_s(colour: false, indent: 0)
click to toggle source
Calls superclass method
MacroObject#to_s
# File lib/ruby-macrodroid/actions.rb, line 997 def to_s(colour: false, indent: 0) option = ['Start', 'Pause','Reset','Reset and Restart'][@h[:option]] name = @h[:stopwatch_name] @s = "StopWatch (%s)" % option + "\n" + name #+ ' ' + @h.inspect super() end
Also aliased as: to_summary