Class: RemindMeTo::Notifier

Inherits:
Object
  • Object
show all
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

Constructor Details

#initializeNotifier

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(message, opts = {})
  @notifier.notify(message, opts)
end