class UniformNotifier::TerminalNotifier

Public Class Methods

active?() click to toggle source
# File lib/uniform_notifier/terminal_notifier.rb, line 6
def active?
  !!UniformNotifier.terminal_notifier
end

Protected Class Methods

_out_of_channel_notify(data) click to toggle source
# File lib/uniform_notifier/terminal_notifier.rb, line 12
def _out_of_channel_notify(data)
  unless defined?(::TerminalNotifier)
    begin
      require 'terminal-notifier'
    rescue LoadError
      raise NotificationError,
            'You must install the terminal-notifier gem to use terminal_notifier: `gem install terminal-notifier`'
    end
  end

  ::TerminalNotifier.notify(data[:body], title: data[:title])
end