Class: Pomodoro
- Inherits:
-
Object
- Object
- Pomodoro
- Defined in:
- lib/PCS_pomodoro.rb
Class Method Summary collapse
Class Method Details
.timer(time_in_minutes) ⇒ Object
5 6 7 8 9 10 11 12 13 14 15 16 17 |
# File 'lib/PCS_pomodoro.rb', line 5 def self.timer(time_in_minutes) time_in_seconds = time_in_minutes * 60 if time_in_seconds > 0 notify("Your Timer: #{time_in_minutes} minute.") sleep(time_in_seconds-(time_in_seconds/10)) notify("Your time is almost up. #{time_in_seconds/10} seconds left.") sleep(time_in_seconds/10) notify("Your time is up. Take a break.") else puts "I am already awake." end end |