Sha256: 574f66fe84b38464c02f497df0a91cdd5251e0a7be2af1b5dbd7448fc8f36a4b
Contents?: true
Size: 438 Bytes
Versions: 2
Compression:
Stored size: 438 Bytes
Contents
[:base, :growl, :knotify, :notify_send, :notifier_not_found].each do |notifier| require "notifiers/#{notifier}" end module Notifiers def growl Growl.new end def knotify Knotify.new end def notify_send NotifySend.new end alias :lib_notify :notify_send def auto_discover notifier = Notifiers::Base.subclasses.find { |notifier| notifier.installed? } or raise NotifierNotFound notifier.new end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
notifiers-1.2.2 | lib/notifiers.rb |
notifiers-1.2.1 | lib/notifiers.rb |