ldap_fluff 0.2.1 → 0.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/lib/ldap_fluff/config.rb +2 -2
- metadata +1 -1
data/lib/ldap_fluff/config.rb
CHANGED
|
@@ -7,8 +7,8 @@ class LdapFluff
|
|
|
7
7
|
ATTRIBUTES.each { |attr| attr_reader attr }
|
|
8
8
|
|
|
9
9
|
def initialize(options)
|
|
10
|
-
raise ArgumentError unless options.
|
|
11
|
-
options = options.inject({}) { |hash, (k, v)| hash.update k.to_s => v }
|
|
10
|
+
raise ArgumentError unless options.respond_to?(:to_hash)
|
|
11
|
+
options = options.to_hash.inject({}) { |hash, (k, v)| hash.update k.to_s => v }
|
|
12
12
|
ATTRIBUTES.each { |attr| instance_variable_set :"@#{attr}", options[attr.to_s] }
|
|
13
13
|
@encryption = @encryption.to_sym if @encryption
|
|
14
14
|
@server_type = @server_type.to_sym if @server_type
|