Sha256: 8eeb06da1a8e8e1349b2e574360cecdb2db3ef242a81df0d1cd38ead73f764dc
Contents?: true
Size: 842 Bytes
Versions: 23
Compression:
Stored size: 842 Bytes
Contents
# # This class provides an abstract for the router interface. Whilst any Proc # could be used, it's safest for people to sub-class to ensure that any future # interface changes are catered for. # # A router class's responsibility in Penthouse is to receive a Rack::Request # object from the App instance and return an identifier for that tenant # module Penthouse module Routers class BaseRouter # @abstract typically used by the App to receive a request and return a tenant that can be switched to # @param request [Rack::Request] The request from the Rack app, used to determine the tenant # @return [String, Symbol] A tenant identifier # @raise [Penthouse::TenantNotFound] if the tenant cannot be found/switched to def self.call(request) raise NotImplementedError end end end end
Version data entries
23 entries across 23 versions & 1 rubygems