Sha256: 6ea8c8eb4de4a61110804d5d5ee58aecf3c7bc0b6e417a58a0f0f3b3fe0c74d5
Contents?: true
Size: 646 Bytes
Versions: 179
Compression:
Stored size: 646 Bytes
Contents
# frozen_string_literal: true require 'eac_ruby_utils/core_ext' require 'eac_ruby_utils/settings_provider' module EacRubyBase0 module JobsRunner common_concern do enable_speaker include ::EacRubyUtils::SettingsProvider end def run_job(job) return unless run_job?(job) infom "Running job \"#{job}\"..." send(job) end def run_job?(job) the_method = "run_#{job}?" respond_to?(the_method, true) ? send(the_method) : true end def run_jobs(*jobs) jobs = setting_value(:jobs) if jobs.empty? jobs.each { |job| run_job(job) } success 'Done' end end end
Version data entries
179 entries across 179 versions & 4 rubygems