Class: UcbRails::UserSessionManager::LdapPersonUserWrapper

Inherits:
Object
  • Object
show all
Defined in:
app/models/ucb_rails/user_session_manager/ldap_person_user_wrapper.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(ldap_person_entry) ⇒ LdapPersonUserWrapper

Returns a new instance of LdapPersonUserWrapper.



7
8
9
# File 'app/models/ucb_rails/user_session_manager/ldap_person_user_wrapper.rb', line 7

def initialize(ldap_person_entry)
  self.ldap_person_entry = ldap_person_entry
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(method, *args, &block) ⇒ Object



19
20
21
22
23
24
25
# File 'app/models/ucb_rails/user_session_manager/ldap_person_user_wrapper.rb', line 19

def method_missing(method, *args, &block)
  if ldap_person_entry.respond_to?(method)
    ldap_person_entry.send(method, *args, &block)
  else
    super
  end
end

Instance Attribute Details

#ldap_person_entryObject

Returns the value of attribute ldap_person_entry.



5
6
7
# File 'app/models/ucb_rails/user_session_manager/ldap_person_user_wrapper.rb', line 5

def ldap_person_entry
  @ldap_person_entry
end

Instance Method Details

#admin?Boolean

Returns:

  • (Boolean)


15
16
17
# File 'app/models/ucb_rails/user_session_manager/ldap_person_user_wrapper.rb', line 15

def admin?
  false
end

#idObject



11
12
13
# File 'app/models/ucb_rails/user_session_manager/ldap_person_user_wrapper.rb', line 11

def id
  uid
end