class Guard::Notifier::Notifu


notification :notifu, time: 5, nosound: true, xp: true
@example Add the ‘:notifu` notifier with configuration options to your `Guardfile`
notification :notifu
@example Add the `:notifu` notifier to your `Guardfile`
end
gem ’rb-notifu’
group :development
@example Add the ‘rb-notifu` gem to your `Gemfile`<br><br>(www.paralint.com/projects/notifu/index.html):
This gem is available for Windows and sends system notifications to<br><br>(github.com/stereobooster/rb-notifu) gem.
System notifications using the

def self.available?(opts = {})

def self.available?(opts = {})
  super and require_gem_safely(opts)
end

def self.gem_name

def self.gem_name
  'rb-notifu'
end

def self.supported_hosts

def self.supported_hosts
  %w[mswin mingw]
end

def _notifu_type(type)

Returns:
  • (Symbol) - the Notify notification type

Parameters:
  • type (String) -- the Guard notification type
def _notifu_type(type)
  case type.to_sym
  when :failed
    :error
  when :pending
    :warn
  else
    :info
  end
end

def notify(message, opts = {})

Options Hash: (**opts)
  • xp (Boolean) -- use IUserNotification interface event when
  • noquiet (Boolean) -- show the tooltip even if the user is in
  • nosound (Boolean) -- do not play a sound when the tooltip is
  • baloon (Boolean) -- enable ballon tips in the registry (for
  • icon (Boolean) -- specify an icon to use ("parent" uses the
  • time (Number) -- the number of seconds to display (0 for
  • image (String) -- the path to the notification image
  • title (String) -- the notification title
  • type (String) -- the notification type. Either 'success',

Parameters:
  • opts (Hash) -- additional notification library options
  • message (String) -- the notification message body
def notify(message, opts = {})
  super
  self.class.require_gem_safely
  opts = DEFAULTS.merge(
    type:    _notifu_type(opts.delete(:type)),
    message: message
  ).merge(opts)
  # The empty block is needed until https://github.com/stereobooster/rb-notifu/pull/1 is merged
  ::Notifu.show(opts) {}
end