Sha256: b21e8d48080932e3392c21cc64999b2a60a646b242f210bb3b8a5cc83636635c

Contents?: true

Size: 466 Bytes

Versions: 1

Compression:

Stored size: 466 Bytes

Contents

require 'delegate'

module Cul
  class LDAP::Entry < SimpleDelegator
    def name
      self[:cn].first
    end

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

    def first_name
      self[:givenname].first
    end

    def last_name
      self[:sn].first
    end

    def organizational_unit
      self[:ou].first
    end

    def uni
      self[:uni].first
    end

    def title
      self[:title].first
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
cul-ldap-0.0.1 lib/cul/ldap/entry.rb