Class: Rack::MultiTenant::TenantStrategies::Default

Inherits:
Object
  • Object
show all
Defined in:
lib/rack/multitenant/tenant_strategies/default.rb

Overview

Always returns the intial value for tenant.

>> default = Rack::MultiTenant::TenantStrategies::Default.new(:foo)
>> default.call(:stub_request)
=> :foo

Instance Method Summary collapse

Constructor Details

#initialize(default) ⇒ Default

Returns a new instance of Default.



10
11
12
# File 'lib/rack/multitenant/tenant_strategies/default.rb', line 10

def initialize(default)
  @default = default
end

Instance Method Details

#call(_) ⇒ Object



14
15
16
# File 'lib/rack/multitenant/tenant_strategies/default.rb', line 14

def call(_)
  @default
end