aboutsummaryrefslogtreecommitdiffstats
path: root/lib/active_job/queue_adapter.rb
diff options
context:
space:
mode:
authorDavid Heinemeier Hansson <david@loudthinking.com>2014-05-20 12:05:26 +0200
committerDavid Heinemeier Hansson <david@loudthinking.com>2014-05-20 12:05:26 +0200
commitfa478329507319571b578ea3dd883405d0b8d4fc (patch)
treee6135979168c74ce822c6bef67834a36a5de9cf3 /lib/active_job/queue_adapter.rb
parentf5c85dc021fd5c66d7f7a40f7de1b3877c88f62a (diff)
downloadrails-fa478329507319571b578ea3dd883405d0b8d4fc.tar.gz
rails-fa478329507319571b578ea3dd883405d0b8d4fc.tar.bz2
rails-fa478329507319571b578ea3dd883405d0b8d4fc.zip
No need for the local variable
Diffstat (limited to 'lib/active_job/queue_adapter.rb')
-rw-r--r--lib/active_job/queue_adapter.rb15
1 files changed, 7 insertions, 8 deletions
diff --git a/lib/active_job/queue_adapter.rb b/lib/active_job/queue_adapter.rb
index 2033f6fe56..0f510530a6 100644
--- a/lib/active_job/queue_adapter.rb
+++ b/lib/active_job/queue_adapter.rb
@@ -6,14 +6,13 @@ module ActiveJob
mattr_reader(:queue_adapter) { ActiveJob::QueueAdapters::InlineAdapter }
def queue_adapter=(name_or_adapter)
- case name_or_adapter
- when Symbol, String
- adapter = load_adapter(name_or_adapter)
- else
- adapter = name_or_adapter
- end
-
- @@queue_adapter = adapter
+ @@queue_adapter = \
+ case name_or_adapter
+ when Symbol, String
+ load_adapter(name_or_adapter)
+ else
+ name_or_adapter
+ end
end
private