From fa478329507319571b578ea3dd883405d0b8d4fc Mon Sep 17 00:00:00 2001 From: David Heinemeier Hansson Date: Tue, 20 May 2014 12:05:26 +0200 Subject: No need for the local variable --- lib/active_job/queue_adapter.rb | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) (limited to 'lib/active_job/queue_adapter.rb') 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 -- cgit v1.2.3