Module: UCB::LDAP::GenericAttributes
- Included in:
- Person
- Defined in:
- lib/person/generic_attributes.rb
Instance Method Summary collapse
-
#addresses ⇒ Object
Returns
Array
of Address for this Person. -
#affiliate_affiliations ⇒ Object
Returns
Array
of Affiliation for this Person. - #email ⇒ Object
- #firstname ⇒ Object (also: #first_name)
- #lastname ⇒ Object (also: #last_name)
-
#namespaces ⇒ Object
Returns
Array
of Namespace for this Person. - #phone ⇒ Object
-
#services ⇒ Object
Returns
Array
of Service for this Person. -
#test? ⇒ Boolean
Returns
true
if the entry represents a test entry. - #uid ⇒ Object
Instance Method Details
#addresses ⇒ Object
Returns Array
of Address for this Person. Requires a bind with access to addresses. See UCB::LDAP.authenticate().
42 43 44 |
# File 'lib/person/generic_attributes.rb', line 42 def addresses @addresses ||= Address.find_by_uid(uid) end |
#affiliate_affiliations ⇒ Object
Returns Array
of Affiliation for this Person. Requires a bind with access to affiliations. See UCB::LDAP.authenticate().
35 36 37 |
# File 'lib/person/generic_attributes.rb', line 35 def affiliate_affiliations @affiliate_affiliations ||= Affiliation.find_by_uid(uid) end |
#email ⇒ Object
25 26 27 |
# File 'lib/person/generic_attributes.rb', line 25 def email mail.first end |
#firstname ⇒ Object Also known as: first_name
15 16 17 |
# File 'lib/person/generic_attributes.rb', line 15 def firstname givenname.first end |
#lastname ⇒ Object Also known as: last_name
20 21 22 |
# File 'lib/person/generic_attributes.rb', line 20 def lastname sn.first end |
#namespaces ⇒ Object
Returns Array
of Namespace for this Person. Requires a bind with access to namespaces. See UCB::LDAP.authenticate().
49 50 51 |
# File 'lib/person/generic_attributes.rb', line 49 def namespaces @namespaces ||= Namespace.find_by_uid(uid) end |
#phone ⇒ Object
29 30 31 |
# File 'lib/person/generic_attributes.rb', line 29 def phone telephoneNumber.first end |
#services ⇒ Object
Returns Array
of Service for this Person. Requires a bind with access to services. See UCB::LDAP.authenticate().
56 57 58 |
# File 'lib/person/generic_attributes.rb', line 56 def services @services ||= Service.find_by_uid(uid) end |
#test? ⇒ Boolean
Returns true
if the entry represents a test entry.
7 8 9 |
# File 'lib/person/generic_attributes.rb', line 7 def test? berkeleyEduTestIDFlag end |
#uid ⇒ Object
11 12 13 |
# File 'lib/person/generic_attributes.rb', line 11 def uid super.first end |