Module: ActiveSambaLdap::Entry

Included in:
Computer, Group, User
Defined in:
lib/active_samba_ldap/entry.rb

Defined Under Namespace

Modules: ClassMethods

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.included(base) ⇒ Object



3
4
5
6
# File 'lib/active_samba_ldap/entry.rb', line 3

def self.included(base)
  super
  base.extend(ClassMethods)
end

Instance Method Details

#ensure_unix_availabilityObject



113
114
115
# File 'lib/active_samba_ldap/entry.rb', line 113

def ensure_unix_availability
  add_class(*unix_object_classes)
end

#remove_unix_availabilityObject



109
110
111
# File 'lib/active_samba_ldap/entry.rb', line 109

def remove_unix_availability
  remove_class(*unix_object_classes)
end

#samba4?Boolean

Returns:

  • (Boolean)


101
102
103
# File 'lib/active_samba_ldap/entry.rb', line 101

def samba4?
  self.class.samba4?
end

#unix_available?Boolean

Returns:

  • (Boolean)


105
106
107
# File 'lib/active_samba_ldap/entry.rb', line 105

def unix_available?
  (unix_object_classes - classes).empty?
end

#unix_object_classesObject



117
118
119
# File 'lib/active_samba_ldap/entry.rb', line 117

def unix_object_classes
  self.class.unix_object_classes
end