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

Version Path
eac_tools-0.76.1 sub/eac_ruby_base0/lib/eac_ruby_base0/jobs_runner.rb
eac_tools-0.76.0 sub/eac_ruby_base0/lib/eac_ruby_base0/jobs_runner.rb
eac_tools-0.75.2 sub/eac_ruby_base0/lib/eac_ruby_base0/jobs_runner.rb
eac_tools-0.75.1 sub/eac_ruby_base0/lib/eac_ruby_base0/jobs_runner.rb
eac_tools-0.75.0 sub/eac_ruby_base0/lib/eac_ruby_base0/jobs_runner.rb
eac_tools-0.74.1 sub/eac_ruby_base0/lib/eac_ruby_base0/jobs_runner.rb
eac_tools-0.74.0 sub/eac_ruby_base0/lib/eac_ruby_base0/jobs_runner.rb
eac_tools-0.73.0 sub/eac_ruby_base0/lib/eac_ruby_base0/jobs_runner.rb
eac_tools-0.72.0 sub/eac_ruby_base0/lib/eac_ruby_base0/jobs_runner.rb
eac_tools-0.70.1 sub/eac_ruby_base0/lib/eac_ruby_base0/jobs_runner.rb
eac_tools-0.70.0 sub/eac_ruby_base0/lib/eac_ruby_base0/jobs_runner.rb
eac_tools-0.69.1 sub/eac_ruby_base0/lib/eac_ruby_base0/jobs_runner.rb
eac_tools-0.69.0 sub/eac_ruby_base0/lib/eac_ruby_base0/jobs_runner.rb
eac_tools-0.68.0 sub/eac_ruby_base0/lib/eac_ruby_base0/jobs_runner.rb
eac_tools-0.67.1 sub/eac_ruby_base0/lib/eac_ruby_base0/jobs_runner.rb
eac_ruby_base0-0.19.0 lib/eac_ruby_base0/jobs_runner.rb
eac_tools-0.67.0 sub/eac_ruby_base0/lib/eac_ruby_base0/jobs_runner.rb
eac_tools-0.66.0 sub/eac_ruby_base0/lib/eac_ruby_base0/jobs_runner.rb
eac_tools-0.65.1 sub/eac_ruby_base0/lib/eac_ruby_base0/jobs_runner.rb
eac_tools-0.65.0 sub/eac_ruby_base0/lib/eac_ruby_base0/jobs_runner.rb