Class: Cul::LDAP::Entry

Inherits:
SimpleDelegator
  • Object
show all
Defined in:
lib/cul/ldap/entry.rb

Instance Method Summary collapse

Instance Method Details

#emailObject



9
10
11
# File 'lib/cul/ldap/entry.rb', line 9

def email
  (self[:mail].empty?) ? "#{uni}@columbia.edu" : mail.first
end

#first_nameObject



13
14
15
# File 'lib/cul/ldap/entry.rb', line 13

def first_name
  self[:givenname].first
end

#last_nameObject



17
18
19
# File 'lib/cul/ldap/entry.rb', line 17

def last_name
  self[:sn].first
end

#nameObject



5
6
7
# File 'lib/cul/ldap/entry.rb', line 5

def name
  self[:cn].first
end

#organizational_unitObject



21
22
23
# File 'lib/cul/ldap/entry.rb', line 21

def organizational_unit
  self[:ou].first
end

#titleObject



29
30
31
# File 'lib/cul/ldap/entry.rb', line 29

def title
  self[:title].first
end

#uniObject



25
26
27
# File 'lib/cul/ldap/entry.rb', line 25

def uni
  self[:uni].first
end