Maintenance Ruby 3.4 gets fixes, but no new features. Switch to Ruby 4.0 →
class method
URI::LDAP.new
(::String schema, ::String? userinfo, ::String host, ::Integer? port, ::String? registry, ::String? path, ::String? opaque, ::String query, ::String? fragment) -> ::URI::LDAP
new(*arg)
lib/uri/ldap.rb
View on GitHub ↗
# File tmp/rubies/ruby-3.4.1/lib/uri/ldap.rb, line 108
def initialize(*arg)
super(*arg)
if @fragment
raise InvalidURIError, 'bad LDAP URL'
end
parse_dn
parse_query
end
Description
Creates a new URI::LDAP object from generic URI components as per RFC 2396. No LDAP-specific syntax checking is performed.
Arguments are scheme, userinfo, host, port, registry, path, opaque, query, and fragment, in that order.
Example:
Example
uri = URI::LDAP.new("ldap", nil, "ldap.example.com", nil, nil, "/dc=example;dc=com", nil, "query", nil)
See also URI::Generic.new.