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.

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Entry

#attributes, #canonical, canonical, combine_filters, create, create!, #delete, #delete!, #dn, entity_name, find_by_dn, hydrate, #initialize, make_search_filter, #method_missing, #modify, #modify_operations, #net_ldap, net_ldap, #new_record?, object_classes, required_attributes, schema_attribute, schema_attributes_array, schema_attributes_hash, search, set_schema_attributes, #setter_method?, #tainted_attributes, 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.



34
35
36
# File 'lib/ucb_ldap_namespace.rb', line 34

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

.find_by_uid(uid) ⇒ Object

Returns an Array of Namespace for uid.



29
30
31
# File 'lib/ucb_ldap_namespace.rb', line 29

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

Instance Method Details

#nameObject

Returns name



11
12
13
# File 'lib/ucb_ldap_namespace.rb', line 11

def name
  cn.first
end

#servicesObject

Returns Array of services



16
17
18
# File 'lib/ucb_ldap_namespace.rb', line 16

def services
  berkeleyEduServices
end

#uidObject

Returns uid



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

def uid
  super.first
end