Class: Guard::Annotate::Notifier
- Inherits:
-
Object
- Object
- Guard::Annotate::Notifier
- Defined in:
- lib/guard/annotate/notifier.rb
Class Method Summary collapse
- .guard_image(result) ⇒ Object
- .guard_message(result, duration) ⇒ Object
- .notify(result, duration) ⇒ Object
Class Method Details
.guard_image(result) ⇒ Object
16 17 18 |
# File 'lib/guard/annotate/notifier.rb', line 16 def guard_image( result ) result ? :success : :failed end |
.guard_message(result, duration) ⇒ Object
7 8 9 10 11 12 13 14 |
# File 'lib/guard/annotate/notifier.rb', line 7 def ( result, duration ) case result when true "Annotate has been run successfully\nin %0.2f seconds." % [duration] else "Annotate run has failed!\nPlease check manually." end end |
.notify(result, duration) ⇒ Object
20 21 22 23 24 25 |
# File 'lib/guard/annotate/notifier.rb', line 20 def notify( result, duration ) = ( result, duration ) image = guard_image( result ) Compat::UI.notify( , :title => 'Annotate complete', :image => image ) end |