Class: Twterm::NotificationBackend::TerminalNotifierBackend
- Inherits:
-
AbstractNotificationBackend
- Object
- AbstractNotificationBackend
- Twterm::NotificationBackend::TerminalNotifierBackend
- Defined in:
- lib/twterm/notification_backend/terminal_notifier_backend.rb
Instance Method Summary collapse
Instance Method Details
#notify(notification) ⇒ Object
9 10 11 12 13 14 15 16 17 18 19 20 |
# File 'lib/twterm/notification_backend/terminal_notifier_backend.rb', line 9 def notify(notification) opts = { title: 'twterm', subtitle: notification.title, group: Process.pid, sound: 'Purr', } opts[:open] = notification.url unless notification.url.nil? TerminalNotifier.notify(notification.body, opts) end |