Class: Kuroko2::Workflow::Notifier::Mail
- Inherits:
-
Object
- Object
- Kuroko2::Workflow::Notifier::Mail
- Defined in:
- lib/autoload/kuroko2/workflow/notifier/mail.rb
Instance Method Summary collapse
-
#initialize(job_instance) ⇒ Mail
constructor
A new instance of Mail.
- #notify_cancellation ⇒ Object
- #notify_critical ⇒ Object
- #notify_failure ⇒ Object
- #notify_finished ⇒ Object
- #notify_long_elapsed_time ⇒ Object
- #notify_working ⇒ Object
Constructor Details
#initialize(job_instance) ⇒ Mail
Returns a new instance of Mail.
5 6 7 8 |
# File 'lib/autoload/kuroko2/workflow/notifier/mail.rb', line 5 def initialize(job_instance) @job_instance = job_instance @definition = job_instance.job_definition end |
Instance Method Details
#notify_cancellation ⇒ Object
14 15 16 17 18 |
# File 'lib/autoload/kuroko2/workflow/notifier/mail.rb', line 14 def notify_cancellation if @definition.notify_cancellation deliver_job_failure end end |
#notify_critical ⇒ Object
24 25 26 |
# File 'lib/autoload/kuroko2/workflow/notifier/mail.rb', line 24 def notify_critical deliver_job_failure end |
#notify_failure ⇒ Object
20 21 22 |
# File 'lib/autoload/kuroko2/workflow/notifier/mail.rb', line 20 def notify_failure deliver_job_failure end |
#notify_finished ⇒ Object
28 29 30 |
# File 'lib/autoload/kuroko2/workflow/notifier/mail.rb', line 28 def notify_finished # do nothing end |
#notify_long_elapsed_time ⇒ Object
32 33 34 |
# File 'lib/autoload/kuroko2/workflow/notifier/mail.rb', line 32 def notify_long_elapsed_time Kuroko2::Notifications.notify_long_elapsed_time(@job_instance).deliver_now end |
#notify_working ⇒ Object
10 11 12 |
# File 'lib/autoload/kuroko2/workflow/notifier/mail.rb', line 10 def notify_working # do nothing end |