# URI::LDAP (Class)

In: | uri/ldap.rb
Parent: | Generic

LDAP URI SCHEMA (described in RFC2255) ldap://<host>/<dn>[?<attrs>[?<scope>[?<filter>[?<extensions>]]]]

## Methods

attributes attributes= build dn dn= extensions extensions= filter filter= new scope scope=

## Constants

DEFAULT_PORT | = | 389
COMPONENT | = | [ :scheme, :host, :port, :dn, :attributes, :scope, :filter, :extensions, ].freeze
SCOPE | = | [ SCOPE_ONE = 'one', SCOPE_SUB = 'sub', SCOPE_BASE = 'base', ].freeze

## Public Class methods

build(args)

[Source]

    # File uri/ldap.rb, line 57
        def self.build(args)
          tmp = Util::make_components_hash(self, args)

          if tmp[:dn]
            tmp[:path] = tmp[:dn]
          end

          query = []
          [:extensions, :filter, :scope, :attributes].collect do |x|
            next if !tmp[x] && query.size == 0
            query.unshift(tmp[x])
          end

          tmp[:query] = query.join('?')

          return super(tmp)
        end

new(*arg)

[Source]

    # File uri/ldap.rb, line 75
        def initialize(*arg)
          super(*arg)

          if @fragment
            raise InvalidURIError, 'bad LDAP URL'
          end

          parse_dn
          parse_query
        end

## Public Instance methods

dn()

[Source]

    # File uri/ldap.rb, line 130
        def dn
          @dn
        end

dn=(val)

[Source]

    # File uri/ldap.rb, line 141
        def dn=(val)
          set_dn(val)
          val
        end

attributes()

[Source]

    # File uri/ldap.rb, line 154
        def attributes
          @attributes
        end

attributes=(val)

[Source]

    # File uri/ldap.rb, line 165
        def attributes=(val)
          set_attributes(val)
          val
        end

scope()

[Source]

    # File uri/ldap.rb, line 178
        def scope
          @scope
        end

scope=(val)

[Source]

    # File uri/ldap.rb, line 189
        def scope=(val)
          set_scope(val)
          val
        end

filter()

[Source]

    # File uri/ldap.rb, line 202
        def filter
          @filter
        end

filter=(val)

[Source]

    # File uri/ldap.rb, line 213
        def filter=(val)
          set_filter(val)
          val
        end

extensions()

[Source]

    # File uri/ldap.rb, line 226
        def extensions
          @extensions
        end

extensions=(val)

[Source]

    # File uri/ldap.rb, line 237
        def extensions=(val)
          set_extensions(val)
          val
        end

[Validate]