Class: MeshChat::Notifier::Base

Inherits:
Object
  • Object
show all
Defined in:
lib/meshchat/notifier/base.rb

Overview

This is the default notification implementation

  • Uses Libnotify

Only use one notification and update continuously, so that the notification area / tray doesn’t become flooded by this app

To write your own notifier, just override the show method in a subclass of this class

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.instanceObject



20
21
22
# File 'lib/meshchat/notifier/base.rb', line 20

def instance
  @instance ||= new
end

Instance Method Details

#show(*args) ⇒ Object



25
26
27
28
29
# File 'lib/meshchat/notifier/base.rb', line 25

def show(*args)
  libnotify_message.update(*args) do |notify|
    yield(notify) if block_given?
  end
end