Sha256: 6b9c053d0563fdb421a2733db53b708190704b003d9debf6097709fac57edb62

Contents?: true

Size: 366 Bytes

Versions: 6

Compression:

Stored size: 366 Bytes

Contents

module TestNotifier
  module Notifier
    module NotifySend
      extend self

      def supported?
        RUBY_PLATFORM =~ /(linux|freebsd)/ && `which notify-send` && $? == 0
      end

      def notify(options)
        Thread.new do
          `notify-send -i #{options[:image]} #{options[:title]} \"#{options[:message]}\"`
        end
      end
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
test_notifier-0.3.3 lib/test_notifier/notifier/notify_send.rb
test_notifier-0.3.2 lib/test_notifier/notifier/notify_send.rb
test_notifier-0.3.1 lib/test_notifier/notifier/notify_send.rb
test_notifier-0.3.0 lib/test_notifier/notifier/notify_send.rb
test_notifier-0.2.1 lib/test_notifier/notifier/notify_send.rb
test_notifier-0.2.0 lib/test_notifier/notifier/notify_send.rb