Class: TomatoPaste::Notification
- Inherits:
-
Object
- Object
- TomatoPaste::Notification
- Defined in:
- lib/tomato_paste/notification.rb
Constant Summary collapse
- NOTIFICATION_SOUND =
File.join(TomatoPaste.sounds, "brass-bell.mp3")
Class Method Summary collapse
Class Method Details
.audio_alert_command ⇒ Object
8 9 10 |
# File 'lib/tomato_paste/notification.rb', line 8 def self.audio_alert_command "afplay #{NOTIFICATION_SOUND}" end |
.display_visual_alert(message) ⇒ Object
16 17 18 19 |
# File 'lib/tomato_paste/notification.rb', line 16 def self.display_visual_alert() return false if .nil? || .empty? TerminalNotifier.notify(, title: "Tomato Paste") end |
.play_audio_alert ⇒ Object
12 13 14 |
# File 'lib/tomato_paste/notification.rb', line 12 def self.play_audio_alert system(self.audio_alert_command) end |