# frozen_string_literal: true # @api private # @since 0.1.0 class Sidekiq::Portal::JobManager require_relative 'job_manager/builder' # @param job_registry [Sidekiq::Portal::JobRegistry] # @return [void] # # @api private # @since 0.1.0 def initialize(job_registry) @job_registry = job_registry end # @param job_klass [Class] # @return [void] # # @api private # @since 0.1.0 def runnable?(job_klass) job_registry.include?(job_klass) end # @return [Sidekiq::Portal::Job] # # @api private # @since 0.1.0 def resolve(job_klass) job_registry.resolve(job_klass) end # @param block [Block] # @yield [job] # @yieldparam job [Sidekiq::Portal::Job] # @return [Enumerable] # # @api private # @since 0.1.0 def each_job(&block) block_given? ? job_registry.each(&block) : job_registry.each end # @return [Array