Sha256: 22f2e56912fa4ee634ecc9f4957d5733f73dfff81cee84514f3c54849aac9c66

Contents?: true

Size: 376 Bytes

Versions: 6

Compression:

Stored size: 376 Bytes

Contents

module Notifier
  module Snarl
    extend self

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

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

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

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
notifier-0.5.2 lib/notifier/snarl.rb
notifier-0.5.1 lib/notifier/snarl.rb
notifier-0.5.0 lib/notifier/snarl.rb
notifier-0.4.1 lib/notifier/snarl.rb
notifier-0.4.0 lib/notifier/snarl.rb
notifier-0.2.1 lib/notifier/snarl.rb