aboutsummaryrefslogtreecommitdiffstats
path: root/activejob
diff options
context:
space:
mode:
authorYves Senn <yves.senn@gmail.com>2015-06-01 13:32:35 +0200
committerYves Senn <yves.senn@gmail.com>2015-06-01 13:32:35 +0200
commit2db8414102d1ccbaf2f293e183422c0801d4bccd (patch)
treeef1e49dd2f6bb46bd4db72a779d1ab9f835ec446 /activejob
parent6457fbfe3e68f92fa1662f1c5468b10364791fb5 (diff)
parent528efcbbbed3be4fc7ddbbb6df598319793743ec (diff)
downloadrails-2db8414102d1ccbaf2f293e183422c0801d4bccd.tar.gz
rails-2db8414102d1ccbaf2f293e183422c0801d4bccd.tar.bz2
rails-2db8414102d1ccbaf2f293e183422c0801d4bccd.zip
Merge pull request #20371 from davydovanton/doc-adapter-lookup
Update documentation for QueueAdapters::lookup [ci skip]
Diffstat (limited to 'activejob')
-rw-r--r--activejob/lib/active_job/queue_adapters.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/activejob/lib/active_job/queue_adapters.rb b/activejob/lib/active_job/queue_adapters.rb
index bd69e525bb..1335e3236e 100644
--- a/activejob/lib/active_job/queue_adapters.rb
+++ b/activejob/lib/active_job/queue_adapters.rb
@@ -116,6 +116,10 @@ module ActiveJob
private_constant :ADAPTER
class << self
+ # Returns adapter for specified name.
+ #
+ # ActiveJob::QueueAdapters.lookup(:sidekiq)
+ # # => ActiveJob::QueueAdapters::SidekiqAdapter
def lookup(name)
const_get(name.to_s.camelize << ADAPTER)
end