class Object
Public Instance Methods
end(activity)
click to toggle source
# File lib/time-tracker.rb, line 8 def end activity end
finish_up(activity)
click to toggle source
# File lib/time-tracker.rb, line 18 def finish_up activity `notify-send "Finish up #{activity}" "Time's up"` puts "Time is up" `aplay -q #{File.expand_path(File.dirname(__FILE__))}/time-tracker/bell.wav` end
loop!(time)
click to toggle source
# File lib/time-tracker.rb, line 11 def loop! time time.times do |index| `sleep 60` puts "You've worked #{"minute".pluralize(index + 1)} out of #{time}" end end
start(time, activity)
click to toggle source
# File lib/time-tracker.rb, line 4 def start time, activity `notify-send -t #{time} "Starting work on #{activity}" "#{"minute".pluralize(time)} left"` end