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.45.1 sub/eac_ruby_base0/lib/eac_ruby_base0/jobs_runner.rb
eac_tools-0.45.0 sub/eac_ruby_base0/lib/eac_ruby_base0/jobs_runner.rb
eac_tools-0.44.0 sub/eac_ruby_base0/lib/eac_ruby_base0/jobs_runner.rb
eac_tools-0.43.0 sub/eac_ruby_base0/lib/eac_ruby_base0/jobs_runner.rb
eac_tools-0.42.0 sub/eac_ruby_base0/lib/eac_ruby_base0/jobs_runner.rb
eac_tools-0.41.0 sub/eac_ruby_base0/lib/eac_ruby_base0/jobs_runner.rb
eac_tools-0.40.0 sub/eac_ruby_base0/lib/eac_ruby_base0/jobs_runner.rb
eac_tools-0.39.0 sub/eac_ruby_base0/lib/eac_ruby_base0/jobs_runner.rb
eac_tools-0.38.0 sub/eac_ruby_base0/lib/eac_ruby_base0/jobs_runner.rb
eac_tools-0.37.2 sub/eac_ruby_base0/lib/eac_ruby_base0/jobs_runner.rb
eac_tools-0.37.1 sub/eac_ruby_base0/lib/eac_ruby_base0/jobs_runner.rb
eac_tools-0.37.0 sub/eac_ruby_base0/lib/eac_ruby_base0/jobs_runner.rb
eac_tools-0.36.1 sub/eac_ruby_base0/lib/eac_ruby_base0/jobs_runner.rb
eac_tools-0.36.0 sub/eac_ruby_base0/lib/eac_ruby_base0/jobs_runner.rb
eac_tools-0.35.0 sub/eac_ruby_base0/lib/eac_ruby_base0/jobs_runner.rb
eac_tools-0.34.0 sub/eac_ruby_base0/lib/eac_ruby_base0/jobs_runner.rb
eac_tools-0.33.0 sub/eac_ruby_base0/lib/eac_ruby_base0/jobs_runner.rb
eac_tools-0.32.0 sub/eac_ruby_base0/lib/eac_ruby_base0/jobs_runner.rb
eac_tools-0.31.1 sub/eac_ruby_base0/lib/eac_ruby_base0/jobs_runner.rb
eac_tools-0.31.0 sub/eac_ruby_base0/lib/eac_ruby_base0/jobs_runner.rb