Sha256: 5818a8f4a5253adfb91bd16d2c476778b35005437dac69bd38957d18f4593122

Contents?: true

Size: 677 Bytes

Versions: 6

Compression:

Stored size: 677 Bytes

Contents

# frozen_string_literal: true

# @api private
# @since 0.1.0
module Sidekiq::Portal::Job::Builder
  class << self
    # @option klass [Class]
    # @option initial_time [Time]
    # @option cron_pattern [String, NilClass]
    # @option every_pattern [String, NilClass]
    # @option timezone [String]
    # @return [Sidekiq::Portal::Job]
    #
    # @api private
    # @sine 0.1.0
    def build(klass, initial_time:, cron_pattern:, every_pattern:, timezone:)
      timeline = Sidekiq::Portal::Timeline::Builder.build(
        initial_time,
        cron_pattern,
        every_pattern,
        timezone
      )

      Sidekiq::Portal::Job.new(klass, timeline)
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
sidekiq_portal-0.3.2 lib/portal/job/builder.rb
sidekiq_portal-0.3.1 lib/portal/job/builder.rb
sidekiq_portal-0.3.0 lib/portal/job/builder.rb
sidekiq_portal-0.2.0 lib/portal/job/builder.rb
sidekiq_portal-0.1.1 lib/portal/job/builder.rb
sidekiq_portal-0.1.0 lib/portal/job/builder.rb