%a{annotate:rdoc:skip} module URI # # LDAP URI SCHEMA (described in RFC2255). # class LDAP < Generic # # A Default port of 389 for URI::LDAP. # DEFAULT_PORT: Integer # # An Array of the available components for URI::LDAP. # COMPONENT: Array[Symbol] # # Scopes available for the starting point. # # * SCOPE_BASE - the Base DN # * SCOPE_ONE - one level under the Base DN, not including the base DN and # not including any entries under this # * SCOPE_SUB - subtrees, all entries at all levels # SCOPE: Array[String] # # ## Description # # Creates a new URI::LDAP object from components, with syntax checking. # # The components accepted are host, port, dn, attributes, scope, filter, and # extensions. # # The components should be provided either as an Array, or as a Hash with keys # formed by preceding the component names with a colon. # # If an Array is used, the components must be passed in the order `[host, port, # dn, attributes, scope, filter, extensions]`. # # Example: # # uri = URI::LDAP.build({:host => 'ldap.example.com', # :dn => '/dc=example'}) # # uri = URI::LDAP.build(["ldap.example.com", nil, # "/dc=example;dc=com", "query", nil, nil, nil]) # def self.build: (Array[nil | String | Integer] args) -> URI::LDAP | ({ host: String?, port: Integer?, dn: String?, attributes: String?, scope: String?, filter: String?, extensions: String? }) -> URI::LDAP # # ## 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: # # uri = URI::LDAP.new("ldap", nil, "ldap.example.com", nil, nil, # "/dc=example;dc=com", nil, "query", nil) # # See also URI::Generic.new. # def initialize: (String schema, String? userinfo, String host, Integer? port, String? registry, String? path, String? opaque, String query, String? fragment) -> void # # Private method to cleanup `dn` from using the `path` component attribute. # def parse_dn: () -> nil # # Private method to cleanup `attributes`, `scope`, `filter`, and `extensions` # from using the `query` component attribute. # def parse_query: () -> nil # # Private method to assemble `query` from `attributes`, `scope`, `filter`, and # `extensions`. # def build_path_query: () -> String # # Returns dn. # def dn: () -> String # # Private setter for dn `val`. # def set_dn: (String val) -> String # # Setter for dn `val`. # def dn=: (String val) -> String # # Returns attributes. # def attributes: () -> String # # Private setter for attributes `val`. # def set_attributes: (String val) -> String # # Setter for attributes `val`. # def attributes=: (String val) -> String # # Returns scope. # def scope: () -> String # # Private setter for scope `val`. # def set_scope: (String val) -> String # # Setter for scope `val`. # def scope=: (String val) -> String # # Returns filter. # def filter: () -> String # # Private setter for filter `val`. # def set_filter: (String val) -> String # # Setter for filter `val`. # def filter=: (String val) -> String # # Returns extensions. # def extensions: () -> untyped # # Private setter for extensions `val`. # def set_extensions: (String val) -> String # # Setter for extensions `val`. # def extensions=: (String val) -> String # # Checks if URI has a path. For URI::LDAP this will return `false`. # def hierarchical?: () -> ::FalseClass end end