Sha256: 91f4239536162d5f2bc68c6d2d091768c1e756be39abb4238ca6d711d2a5eb41

Contents?: true

Size: 679 Bytes

Versions: 13

Compression:

Stored size: 679 Bytes

Contents

# frozen_string_literal: true

require 'eac_ruby_utils/console/speaker'
require 'eac_ruby_utils/settings_provider'

module EacRubyBase0
  module JobsRunner
    common_concern do
      include ::EacRubyUtils::Console::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

13 entries across 13 versions & 3 rubygems

Version Path
avm-tools-0.98.0 vendor/eac_ruby_base0/lib/eac_ruby_base0/jobs_runner.rb
avm-tools-0.97.0 vendor/eac_ruby_base0/lib/eac_ruby_base0/jobs_runner.rb
avm-tools-0.96.0 vendor/eac_ruby_base0/lib/eac_ruby_base0/jobs_runner.rb
eac_ruby_base0-0.7.1 lib/eac_ruby_base0/jobs_runner.rb
avm-tools-0.95.0 vendor/eac_ruby_base0/lib/eac_ruby_base0/jobs_runner.rb
eac_ruby_base0-0.7.0 lib/eac_ruby_base0/jobs_runner.rb
avm-tools-0.94.3 vendor/eac_ruby_base0/lib/eac_ruby_base0/jobs_runner.rb
eac_ruby_base0-0.6.0 lib/eac_ruby_base0/jobs_runner.rb
avm-tools-0.94.2 vendor/eac_ruby_base0/lib/eac_ruby_base0/jobs_runner.rb
avm-tools-0.94.1 vendor/eac_ruby_base0/lib/eac_ruby_base0/jobs_runner.rb
eac_ruby_base0-0.5.0 lib/eac_ruby_base0/jobs_runner.rb
eac_ruby_base0-0.4.0 lib/eac_ruby_base0/jobs_runner.rb
ehbrs-tools-0.20.0 vendor/eac_ruby_base0/lib/eac_ruby_base0/jobs_runner.rb