Module: ActiveSambaLdap::Configuration::ClassMethods
- Defined in:
- lib/active_samba_ldap/configuration.rb
Defined Under Namespace
Classes: Private, ValidHash
Instance Method Summary
collapse
Instance Method Details
#merge_configuration(config, *rest) ⇒ Object
60
61
62
63
64
|
# File 'lib/active_samba_ldap/configuration.rb', line 60
def merge_configuration(config, *rest)
config = config.symbolize_keys
config = (configurations["common"] || {}).symbolize_keys.merge(config)
ValidHash.new.merge(super(Private.new(config).merge, *rest))
end
|
51
52
53
54
55
56
57
58
|
# File 'lib/active_samba_ldap/configuration.rb', line 51
def remove_connection_related_configuration(config)
target_keys = Private::VARIABLES.collect do |name|
name.to_sym
end - ActiveLdap::Adapter::Base::VALID_ADAPTER_CONFIGURATION_KEYS
super(config).reject do |key, value|
target_keys.include?(key)
end
end
|
#required_configuration_variables(*names) ⇒ Object
66
67
68
69
70
71
72
73
74
75
76
77
78
|
# File 'lib/active_samba_ldap/configuration.rb', line 66
def required_configuration_variables(*names)
config = configuration
if config.nil?
missing_variables = names
else
missing_variables = names.find_all do |name|
config[name.to_sym].nil?
end
end
unless missing_variables.empty?
raise MissingRequiredVariableError.new(missing_variables)
end
end
|