Class: RemindMeTo::Notifier
- Inherits:
-
Object
- Object
- RemindMeTo::Notifier
- Defined in:
- lib/remindmeto/notifier.rb,
lib/remindmeto/notifier/libnotify_notifier.rb,
lib/remindmeto/notifier/notification_center_notifier.rb
Defined Under Namespace
Classes: LibnotifyNotifier, NotificationCenterNotifier
Instance Method Summary collapse
-
#initialize ⇒ Notifier
constructor
A new instance of Notifier.
- #notify(message, opts = {}) ⇒ Object
Constructor Details
#initialize ⇒ Notifier
Returns a new instance of Notifier.
6 7 8 9 10 11 12 |
# File 'lib/remindmeto/notifier.rb', line 6 def initialize() if RemindMeTo::OS.mac? @notifier = NotificationCenterNotifier.new else RemindMeTo::OS.linux? @notifier = LibnotifyNotifier.new end end |
Instance Method Details
#notify(message, opts = {}) ⇒ Object
14 15 16 |
# File 'lib/remindmeto/notifier.rb', line 14 def notify(, opts = {}) @notifier.notify(, opts) end |