Class: SnarlNotifier
- Inherits:
-
Object
- Object
- SnarlNotifier
- Defined in:
- lib/snarl_notifier.rb
Instance Method Summary collapse
-
#initialize(options = {}) ⇒ SnarlNotifier
constructor
valid options: application: the name of your application.
- #notify(message, options = {}) ⇒ Object
Constructor Details
#initialize(options = {}) ⇒ SnarlNotifier
valid options:
application: the name of your application
6 7 8 |
# File 'lib/snarl_notifier.rb', line 6 def initialize( = {}) @application = [:application] || 'ruby-snarl' end |
Instance Method Details
#notify(message, options = {}) ⇒ Object
11 12 13 14 |
# File 'lib/snarl_notifier.rb', line 11 def notify(, = {}) title = [:title] || "#{@application} notification" Snarl.(title,,[:icon] || nil, [:timeout] || Snarl::DEFAULT_TIMEOUT) end |