Class: Boxafe::Notifier::NotificationCenter
- Inherits:
-
Boxafe::Notifier
- Object
- Boxafe::Notifier
- Boxafe::Notifier::NotificationCenter
- Defined in:
- lib/boxafe/notifier/notification_center.rb
Constant Summary collapse
- METHODS =
{ info: :notify, success: :success, failure: :failed }
Constants inherited from Boxafe::Notifier
Class Method Summary collapse
Instance Method Summary collapse
Methods inherited from Boxafe::Notifier
#initialize, notifier, notifier_instance, platform_notifier
Constructor Details
This class inherits a constructor from Boxafe::Notifier
Class Method Details
.available? ⇒ Boolean
11 12 13 |
# File 'lib/boxafe/notifier/notification_center.rb', line 11 def self.available? TerminalNotifier::Guard.available? end |
Instance Method Details
#notify(msg, options = {}) ⇒ Object
15 16 17 18 |
# File 'lib/boxafe/notifier/notification_center.rb', line 15 def notify msg, = {} method = METHODS[.delete(:type)] || :notify TerminalNotifier::Guard.send method, msg, () end |