Module: Notifier::OsxNotification

Extended by:
OsxNotification
Included in:
OsxNotification
Defined in:
lib/git/background/notifier_ext/osx_notification.rb

Instance Method Summary collapse

Instance Method Details

#notify(options) ⇒ Object



12
13
14
15
16
# File 'lib/git/background/notifier_ext/osx_notification.rb', line 12

def notify(options)
  notifier_opts = { title: options[:title], group: Process.pid }
  notifier_opts[:subtitle] = options[:subtitle] if options[:subtitle]
  TerminalNotifier.notify options[:message], notifier_opts
end

#supported?Boolean

Returns:

  • (Boolean)


8
9
10
# File 'lib/git/background/notifier_ext/osx_notification.rb', line 8

def supported?
  TerminalNotifier::available?
end