module ActiveEndpoint::Routes::Cache::Proxy

Constants

CLIENTS

Public Class Methods

build(adapter) click to toggle source
# File lib/active_endpoint/routes/cache/proxy.rb, line 11
def self.build(adapter)
  unless CLIENTS.keys.include?(adapter)
    message "You try to use unsupported cache store adapter! #{adapter}\n"
    raise ActiveEndpoint::Routes::Cache::Proxy::AdapterError.new(message)
  end

  "ActiveEndpoint::Routes::Cache::Proxy::#{CLIENTS[adapter]}".constantize.new
end