Class: Notiffany::Notifier::GNTP
- Defined in:
- lib/notiffany/notifier/gntp.rb
Overview
System notifications using the [ruby_gntp](github.com/snaka/ruby_gntp) gem.
This gem is available for OS X, Linux and Windows and sends system notifications to the following system notification frameworks through the
[Growl Network Transport Protocol](www.growlforwindows.com/gfw/help/gntp.aspx):
-
[Growl](growl.info)
-
[Growl for Windows](www.growlforwindows.com)
-
[Growl for Linux](mattn.github.com/growl-for-linux)
-
[Snarl](sites.google.com/site/snarlapp)
Constant Summary collapse
- DEFAULTS =
{ sticky: false }
- CLIENT_DEFAULTS =
Default options for the ruby gtnp client.
{ host: "127.0.0.1", password: "", port: 23_053 }
Constants inherited from Base
Base::ERROR_ADD_GEM_AND_RUN_BUNDLE, Base::HOSTS
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
- #_check_available(_opts) ⇒ Object
- #_gem_name ⇒ Object
-
#_perform_notify(message, opts = {}) ⇒ Object
Shows a system notification.
- #_supported_hosts ⇒ Object
Methods inherited from Base
#_image_path, #initialize, #name, #notify, #title
Constructor Details
This class inherits a constructor from Notiffany::Notifier::Base
Instance Method Details
#_check_available(_opts) ⇒ Object
39 40 |
# File 'lib/notiffany/notifier/gntp.rb', line 39 def _check_available(_opts) end |
#_gem_name ⇒ Object
35 36 37 |
# File 'lib/notiffany/notifier/gntp.rb', line 35 def _gem_name "ruby_gntp" end |
#_perform_notify(message, opts = {}) ⇒ Object
Shows a system notification.
57 58 59 60 61 62 63 64 65 |
# File 'lib/notiffany/notifier/gntp.rb', line 57 def _perform_notify(, opts = {}) opts = { name: opts[:type].to_s, text: , icon: opts[:image] }.merge(opts) _gntp_client(opts).notify(opts) end |
#_supported_hosts ⇒ Object
30 31 32 33 |
# File 'lib/notiffany/notifier/gntp.rb', line 30 def _supported_hosts %w(darwin linux linux-gnu freebsd openbsd sunos solaris mswin mingw cygwin) end |