module Faraday::MiddlewareRegistry
def load_middleware(key)
def load_middleware(key) value = registered_middleware[key] case value when Module value when Symbol, String middleware_mutex do @registered_middleware[key] = const_get(value) end when Proc middleware_mutex do @registered_middleware[key] = value.call end end end