Class: Tenantify::Middleware::Strategies::Default
- Inherits:
-
Object
- Object
- Tenantify::Middleware::Strategies::Default
- Defined in:
- lib/tenantify/middleware/strategies/default.rb
Overview
Strategy to return always the same tenant.
Constant Summary collapse
- NoTenantGivenError =
No tenant given.
Class.new(StandardError)
Instance Method Summary collapse
-
#initialize(config) ⇒ Default
constructor
Constructor.
-
#tenant_for(_env) ⇒ Symbol?
Finds a tenant for the given env.
Constructor Details
#initialize(config) ⇒ Default
Constructor.
20 21 22 |
# File 'lib/tenantify/middleware/strategies/default.rb', line 20 def initialize config @config = config end |
Instance Method Details
#tenant_for(_env) ⇒ Symbol?
Finds a tenant for the given env.
28 29 30 |
# File 'lib/tenantify/middleware/strategies/default.rb', line 28 def tenant_for _env tenant end |