Module: TenantsHelper
- Defined in:
- lib/tenants_helper.rb,
lib/tenants_helper/tenants.rb,
lib/tenants_helper/version.rb,
lib/tenants_helper/config_loader.rb
Defined Under Namespace
Classes: ConfigLoader, Tenant, Tenants
Constant Summary
collapse
- Error =
Class.new(StandardError)
- VERSION =
'0.3.0'
Class Method Summary
collapse
Class Method Details
.set_path(config_dir:, config_filename: 'tenants.yml') ⇒ Object
9
10
11
|
# File 'lib/tenants_helper.rb', line 9
def set_path(config_dir:, config_filename: 'tenants.yml')
@config_path_string = config_dir + '/' + config_filename
end
|
.tenants(config_path: @config_path_string) ⇒ Object
3
4
5
6
7
|
# File 'lib/tenants_helper.rb', line 3
def tenants(config_path: @config_path_string)
config_loader = TenantsHelper::ConfigLoader.new(config_path: config_path)
config_content = config_loader.load_content
TenantsHelper::Tenants.new(tenants_config_hash: config_content)
end
|