class TimerCli::Timer
Public Class Methods
new(sec)
click to toggle source
# File lib/timer_cli/timer.rb, line 3 def initialize(sec) @sec = sec end
Public Instance Methods
run()
click to toggle source
# File lib/timer_cli/timer.rb, line 7 def run puts 'Start timer ...' sleep @sec notify end
Private Instance Methods
notify()
click to toggle source
# File lib/timer_cli/timer.rb, line 17 def notify notifier = Notifier.new(@sec) notifier.notify end