Sha256: 5d99c297ac962f6f322b27ff48cc1323d1715340480a2e0f1913b92f343e8d93

Contents?: true

Size: 451 Bytes

Versions: 1

Compression:

Stored size: 451 Bytes

Contents

module Notifier
  module TerminalNotifier
    extend self

    def supported?
      Notifier.os?(/darwin/) && `which terminal-notifier` && $? == 0
    end

    def notify(options)
      command = [
        "terminal-notifier",
        "-group", "notifier-rubygems",
        "-title", options[:title],
        "-appIcon", options.fetch(:image, ""),
        "-message", options[:message]
      ]

      Thread.new { system(*command) }
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
notifier-0.5.0 lib/notifier/terminal_notifier.rb