build(ary) -> URI::LDAP[permalink][rdoc][edit]build(hash) -> URI::LDAP-
引数で与えられた URI 構成要素から URI::LDAP オブジェクトを生成します。引数の正当性を検査します。
- [PARAM]
ary: -
構成要素を表す配列を与えます。要素は次の順です。
[:host, :port, :dn, :attributes, :scope, :filter, :extensions] - [PARAM]
hash: -
構成要素を表すハッシュを与えます。ハッシュのキーは
のいずれかです。:host, :port, :dn, :attributes, :scope, :filter, :extensions - [EXCEPTION]
URI::InvalidComponentError: - 各要素が適合しない場合に発生します。
require 'uri' p URI::LDAP.build(["example.com", "1", "/a", "b", "c", "d", "e=f"]).to_s #=> "ldap://example.com:1/a?b?c?d?e=f" - [PARAM]