lib/guard/notifier.rb
def turn_on
      auto_detect_notification if notifications.empty? && (!::Guard.options || ::Guard.options[:notify])

      if notifications.empty?
        ENV['GUARD_NOTIFY'] = 'false'
      else
        notifications.each do |notification|
          ::Guard::UI.info "Guard is using #{ get_notifier_module(notification[:name]).to_s.split('::').last } to send notifications."
          notifier = get_notifier_module(notification[:name])
          notifier.turn_on(notification[:options]) if notifier.respond_to?(:turn_on)
        end

        ENV['GUARD_NOTIFY'] = 'true'
      end
    end
# Turn notifications on. If no notifications are defined
# in the `Guardfile` Guard auto detects the first available
# library.
#
Turn notifications on. If no notifications are defined
in the `Guardfile` Guard auto detects the first available
library.
Turn notifications on . If no notifications are defined in the ` Guardfile ` Guard auto detects the first available library .
def turn_on
      auto_detect_notification if notifications.empty? && (!::Guard.options || ::Guard.options[:notify])
      if notifications.empty?
        ENV['GUARD_NOTIFY'] = 'false'
      else
        notifications.each do |notification|
          ::Guard::UI.info "Guard is using #{ get_notifier_module(notification[:name]).to_s.split('::').last } to send notifications."
          notifier = get_notifier_module(notification[:name])
          notifier.turn_on(notification[:options]) if notifier.respond_to?(:turn_on)
        end
        ENV['GUARD_NOTIFY'] = 'true'
      end
    end
def turn_on auto_detect_notification if notifications . empty? && ( ! :: Guard . options || :: Guard . options [ :notify ] ) if notifications . empty? ENV [ 'GUARD_NOTIFY' ] = 'false' else notifications . each do | notification | :: Guard :: UI . info "Guard is using #{ get_notifier_module(notification[:name]).to_s.split('::').last } to send notifications." notifier = get_notifier_module ( notification [ :name ] ) notifier . turn_on ( notification [ :options ] ) if notifier . respond_to? ( :turn_on ) end ENV [ 'GUARD_NOTIFY' ] = 'true' end end
Turn notifications on.
Turn notifications on .