Class: LdapFluff::Config
- Inherits:
-
Object
- Object
- LdapFluff::Config
- Defined in:
- lib/ldap_fluff/config.rb
Defined Under Namespace
Classes: ConfigError
Constant Summary collapse
- ATTRIBUTES =
%w[host port encryption base_dn group_base server_type service_user service_pass anon_queries attr_login search_filter instrumentation_service use_netgroups use_rfc4519_group_membership].freeze
- DEFAULT_CONFIG =
{ 'port' => 389, 'encryption' => nil, 'base_dn' => 'dc=company,dc=com', 'group_base' => 'dc=company,dc=com', 'server_type' => :free_ipa, 'anon_queries' => false, 'instrumentation_service' => nil, 'use_netgroups' => false, 'use_rfc4519_group_membership' => false }.freeze
Instance Method Summary collapse
-
#initialize(config) ⇒ Config
constructor
A new instance of Config.
Constructor Details
#initialize(config) ⇒ Config
Returns a new instance of Config.
20 21 22 23 24 25 26 27 |
# File 'lib/ldap_fluff/config.rb', line 20 def initialize(config) raise ArgumentError unless config.respond_to?(:to_hash) config = validate(convert(config)) ATTRIBUTES.each do |attr| instance_variable_set(:"@#{attr}", config[attr]) end end |