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.55.3 sub/eac_ruby_base0/lib/eac_ruby_base0/jobs_runner.rb
eac_tools-0.55.2 sub/eac_ruby_base0/lib/eac_ruby_base0/jobs_runner.rb
eac_ruby_base0-0.17.3 lib/eac_ruby_base0/jobs_runner.rb
eac_ruby_base0-0.17.2 lib/eac_ruby_base0/jobs_runner.rb
eac_tools-0.55.1 sub/eac_ruby_base0/lib/eac_ruby_base0/jobs_runner.rb
eac_tools-0.55.0 sub/eac_ruby_base0/lib/eac_ruby_base0/jobs_runner.rb
eac_tools-0.54.0 sub/eac_ruby_base0/lib/eac_ruby_base0/jobs_runner.rb
eac_tools-0.53.0 sub/eac_ruby_base0/lib/eac_ruby_base0/jobs_runner.rb
eac_tools-0.52.0 sub/eac_ruby_base0/lib/eac_ruby_base0/jobs_runner.rb
eac_tools-0.51.0 sub/eac_ruby_base0/lib/eac_ruby_base0/jobs_runner.rb
eac_tools-0.50.0 sub/eac_ruby_base0/lib/eac_ruby_base0/jobs_runner.rb
eac_tools-0.49.0 sub/eac_ruby_base0/lib/eac_ruby_base0/jobs_runner.rb
eac_tools-0.48.1 sub/eac_ruby_base0/lib/eac_ruby_base0/jobs_runner.rb
eac_tools-0.48.0 sub/eac_ruby_base0/lib/eac_ruby_base0/jobs_runner.rb
eac_tools-0.47.2 sub/eac_ruby_base0/lib/eac_ruby_base0/jobs_runner.rb
eac_tools-0.47.1 sub/eac_ruby_base0/lib/eac_ruby_base0/jobs_runner.rb
eac_tools-0.47.0 sub/eac_ruby_base0/lib/eac_ruby_base0/jobs_runner.rb
eac_tools-0.46.0 sub/eac_ruby_base0/lib/eac_ruby_base0/jobs_runner.rb
eac_tools-0.45.2 sub/eac_ruby_base0/lib/eac_ruby_base0/jobs_runner.rb
eac_ruby_base0-0.17.1 lib/eac_ruby_base0/jobs_runner.rb