Class: AutotestNotification::Doom
- Inherits:
-
Object
- Object
- AutotestNotification::Doom
- Defined in:
- lib/autotest_notification/doom.rb
Class Method Summary collapse
Class Method Details
.image(total, failures) ⇒ Object
4 5 6 |
# File 'lib/autotest_notification/doom.rb', line 4 def image(total, failures) "#{IMAGES_DIRECTORY}/doom/doom_#{percent(total, failures)}.png" end |
.play_sound(total, failures) ⇒ Object
8 9 10 11 12 13 14 15 16 17 |
# File 'lib/autotest_notification/doom.rb', line 8 def play_sound(total, failures) sound_file = "#{File.(File.dirname(__FILE__) + "/../../sounds/doom/")}/#{percent(total, failures)}.wav" case RUBY_PLATFORM when /darwin/ `#{File.(File.dirname(__FILE__) + "/../../bin/")}/playsound #{sound_file}` when /linux/ system("/usr/bin/mplayer #{sound_file} > /dev/null 2> /dev/null") end end |