Module: Notifier::Snarl

Extended by:
Snarl
Included in:
Snarl
Defined in:
lib/notifier/snarl.rb

Instance Method Summary collapse

Instance Method Details

#notify(options) ⇒ Object



16
17
18
# File 'lib/notifier/snarl.rb', line 16

def notify(options)
  ::Snarl.show_message(options[:title], options[:message], options[:image])
end

#supported?Boolean

Returns:

  • (Boolean)


5
6
7
8
9
10
11
12
13
14
# File 'lib/notifier/snarl.rb', line 5

def supported?
  return false unless Notifier.os?(/(mswin|mingw)/)

  begin
    require "snarl" unless defined?(::Snarl)
    true
  rescue LoadError
    false
  end
end