Method: Puppet::Util::Ldap::Connection#initialize
- Defined in:
- lib/vendor/puppet/util/ldap/connection.rb
#initialize(host, port, options = {}) ⇒ Connection
Returns a new instance of Connection.
34 35 36 37 38 39 40 41 42 43 44 45 46 |
# File 'lib/vendor/puppet/util/ldap/connection.rb', line 34 def initialize(host, port, = {}) raise Puppet::Error, "Could not set up LDAP Connection: Missing ruby/ldap libraries" unless Puppet.features.ldap? @host, @port = host, port .each do |param, value| begin send(param.to_s + "=", value) rescue raise ArgumentError, "LDAP connections do not support #{param} parameters" end end end |