Class: Guard::Bosh::Notifier

Inherits:
Object
  • Object
show all
Defined in:
lib/guard/bosh/notifier.rb

Overview

Report success or failure to the user

Instance Method Summary collapse

Instance Method Details

#notify(errors) ⇒ Object



7
8
9
10
11
12
13
14
15
16
# File 'lib/guard/bosh/notifier.rb', line 7

def notify(errors)
  if errors.empty?
    Guard::Compat::UI.notify(
      'Succeeded', title: 'BOSH', image: :success, priority: -2)
  else
    Guard::Compat::UI.error(error_line(errors))
    Guard::Compat::UI.notify(
      'Failed', title: 'BOSH', image: :failed, priority: 2)
  end
end