instance method interpret_adapter

Ruby on Rails 5.0.7.2

Since v5.0.7.2 Last seen in v5.1.7 Private — implementation detail, not part of the public API

Available in: v5.0.7.2 v5.1.7

Signature

interpret_adapter(name_or_adapter_or_class)

No documentation comment.

Parameters

name_or_adapter_or_class req
Source
# File activejob/lib/active_job/queue_adapter.rb, line 33
      def interpret_adapter(name_or_adapter_or_class)
        case name_or_adapter_or_class
        when Symbol, String
          ActiveJob::QueueAdapters.lookup(name_or_adapter_or_class).new
        else
          if queue_adapter?(name_or_adapter_or_class)
            name_or_adapter_or_class
          elsif queue_adapter_class?(name_or_adapter_or_class)
            ActiveSupport::Deprecation.warn "Passing an adapter class is deprecated " \
              "and will be removed in Rails 5.1. Please pass an adapter name " \
              "(.queue_adapter = :#{name_or_adapter_or_class.name.demodulize.remove('Adapter').underscore}) " \
              "or an instance (.queue_adapter = #{name_or_adapter_or_class.name}.new) instead."
              name_or_adapter_or_class.new
          else
            raise ArgumentError
          end
        end
      end

Defined in activejob/lib/active_job/queue_adapter.rb line 33 · View on GitHub · Improve this page · Find usages on GitHub

Defined in ActiveJob::QueueAdapter::ClassMethods

Type at least 2 characters to search.

Use the arrow keys to navigate results, Enter to open one, Escape to close.

Keyboard shortcuts

/
Focus search
⌘K / Ctrl-K
Command palette
?
This help
Esc
Close