Sha256: 26cc4c90a1b9ebba1e3486fbaa9d0a0ccd6f34e5d3bd0e88f9bea229df86f629

Contents?: true

Size: 276 Bytes

Versions: 2

Compression:

Stored size: 276 Bytes

Contents

# frozen_string_literal: true

require 'active_job' unless defined?(::ActiveJob)

module Readymade
  class BackgroundJob < ::ActiveJob::Base
    # queue_as :default

    def perform(**args)
      args.delete(:class_name).to_s.constantize.send(:call, **args)
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
readymade-0.3.5 lib/readymade/background_job.rb
readymade-0.3.0 lib/readymade/background_job.rb