Class: UCB::LDAP::Namespace

Inherits:
Entry
  • Object
show all
Defined in:
lib/ucb_ldap/namespace.rb

Overview

Class for accessing the Namespace/Name part of LDAP.

Constant Summary

Constants inherited from Entry

Entry::TESTING

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Entry

#assigned_attributes, #attributes, canonical, #canonical, combine_filters, create, create!, #delete, #delete!, #dn, entity_name, filter_in, find_by_dn, #initialize, make_search_filter, #method_missing, #modify, #modify_operations, #net_ldap, net_ldap, object_classes, required_attributes, required_schema_attributes, schema_attribute, schema_attributes_array, schema_attributes_hash, search, set_schema_attributes, #setter_method?, tree_base, tree_base=, unique_object_class, #update_attributes, #update_attributes!, #value_getter, #value_setter

Constructor Details

This class inherits a constructor from UCB::LDAP::Entry

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class UCB::LDAP::Entry

Class Method Details

.find_by_cn(cn) ⇒ Object

Returns Namespace instance for cn.



35
36
37
# File 'lib/ucb_ldap/namespace.rb', line 35

def self.find_by_cn(cn)
  search(:filter => "cn=#{cn}").first
end

.find_by_uid(uid) ⇒ Object

Returns an Array of Namespace for uid.



28
29
30
# File 'lib/ucb_ldap/namespace.rb', line 28

def self.find_by_uid(uid)
  search(:filter => "uid=#{uid}")
end

Instance Method Details

#nameObject



10
11
12
# File 'lib/ucb_ldap/namespace.rb', line 10

def name
  cn.first
end

#servicesObject

Returns Array of services



17
18
19
# File 'lib/ucb_ldap/namespace.rb', line 17

def services
  berkeleyEduServices
end

#uidObject



21
22
23
# File 'lib/ucb_ldap/namespace.rb', line 21

def uid
  super.first
end