module Tenantify
Constants
- VERSION
Public Class Methods
configuration()
click to toggle source
Tenantify
configuration
@return [Configuration] the current configuration
# File lib/tenantify.rb, line 12 def self.configuration @configuration ||= Configuration.new end
configure() { |configuration| ... }
click to toggle source
A helper to configure Tenantify
@yield [configuration] Configures tenantify
# File lib/tenantify.rb, line 19 def self.configure yield configuration end
current()
click to toggle source
An alias to {Tenant::current}
@see Tenant.current
# File lib/tenantify.rb, line 47 def self.current Tenant.current end
resource(correspondence)
click to toggle source
An alias to {Resource::new}
@see Resource
# File lib/tenantify.rb, line 54 def self.resource correspondence Resource.new(correspondence) end
use!(tenant)
click to toggle source
An alias to {Tenant::use!}
@example Change the current tenant
Tenanfify.use! :a_tenant # using :a_tenant from now on
@see Tenant.use!
# File lib/tenantify.rb, line 40 def self.use! tenant Tenant.use!(tenant) end
using(tenant, &block)
click to toggle source
An alias to {Tenant::using}
@example Run some code on a particular tenant
Tenantify.using :a_tenant do # some code... end
@see Tenant.using
# File lib/tenantify.rb, line 30 def self.using tenant, &block Tenant.using(tenant, &block) end