Class: Primadoro::Views::Sound
Instance Method Summary collapse
Methods inherited from Base
Instance Method Details
#break_time ⇒ Object
80 81 82 |
# File 'lib/primadoro.rb', line 80 def break_time play(File.join(File.dirname(__FILE__), "..", "resources", "bell.mp3")) end |
#play(file) ⇒ Object
66 67 68 69 70 71 72 73 74 |
# File 'lib/primadoro.rb', line 66 def play(file) if RUBY_PLATFORM =~ /darwin/ `afplay #{file}` elsif RUBY_PLATFORM =~ /mswin32/ `sndrec32 /play /close "#{file}"` else `play #{file}` end end |
#pomodoro ⇒ Object
76 77 78 |
# File 'lib/primadoro.rb', line 76 def pomodoro play(File.join(File.dirname(__FILE__), "..", "resources", "windup.wav")) end |