Module: EacRubyBase0::JobsRunner
- Defined in:
- lib/eac_ruby_base0/jobs_runner.rb
Instance Method Summary collapse
Instance Method Details
#run_job(job) ⇒ Object
13 14 15 16 17 18 |
# File 'lib/eac_ruby_base0/jobs_runner.rb', line 13 def run_job(job) return unless run_job?(job) infom "Running job \"#{job}\"..." send(job) end |
#run_job?(job) ⇒ Boolean
20 21 22 23 |
# File 'lib/eac_ruby_base0/jobs_runner.rb', line 20 def run_job?(job) the_method = "run_#{job}?" respond_to?(the_method, true) ? send(the_method) : true end |
#run_jobs(*jobs) ⇒ Object
25 26 27 28 29 |
# File 'lib/eac_ruby_base0/jobs_runner.rb', line 25 def run_jobs(*jobs) jobs = setting_value(:jobs) if jobs.empty? jobs.each { |job| run_job(job) } success 'Done' end |