class Faraday::AdapterRegistry
String or Symbol name.
AdapterRegistry registers adapter class names so they can be looked up by a
def get(name)
def get(name) klass = @lock.synchronize do @constants[name] end return klass if klass Object.const_get(name).tap { |c| set(c, name) } end
def initialize
def initialize @lock = Monitor.new @constants = {} end
def set(klass, name = nil)
def set(klass, name = nil) name ||= klass.to_s @lock.synchronize do @constants[name] = klass end end