Module: ActiveJob::QueueAdapter::ClassMethods

Defined in:
lib/active_job/queue_adapter.rb

Instance Method Summary collapse

Instance Method Details

#queue_adapter=(name_or_adapter) ⇒ Object



15
16
17
18
19
20
21
22
23
24
25
# File 'lib/active_job/queue_adapter.rb', line 15

def queue_adapter=(name_or_adapter)
  @@queue_adapter = \
    case name_or_adapter
    when :test
      ActiveJob::QueueAdapters::TestAdapter.new
    when Symbol, String
      load_adapter(name_or_adapter)
    when Class
      name_or_adapter
    end
end