Module: Kiba::Extend::Jobs::TellMeJob
- Defined in:
- lib/kiba/extend/jobs/tell_me_job.rb
Overview
Mixin to activate having computer say (out loud!) that the job is complete
Useful for long-running jobs
Instance Method Summary collapse
Instance Method Details
#decorate ⇒ Object
13 14 15 16 17 |
# File 'lib/kiba/extend/jobs/tell_me_job.rb', line 13 def decorate context.instance_variable_set(:@job_key, job_data.key.to_s.delete("_")) parse_job(control, context, [tell]) end |
#tell ⇒ Object
19 20 21 22 23 24 25 |
# File 'lib/kiba/extend/jobs/tell_me_job.rb', line 19 def tell Kiba.job_segment do post_process do `say #{@job_key} job is complete` end end end |