Module: ActiveSambaLdap::ComputerAccountEntry
- Included in:
- Computer
- Defined in:
- lib/active_samba_ldap/computer_account_entry.rb
Defined Under Namespace
Modules: ClassMethods
Constant Summary collapse
- NAME_RE =
/\A#{AccountEntry::NAME_RE_SRC}\$\z/
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.included(base) ⇒ Object
5 6 7 8 9 |
# File 'lib/active_samba_ldap/computer_account_entry.rb', line 5 def self.included(base) super base.extend(ClassMethods) base.validates_format_of :uid, :with => NAME_RE end |
Instance Method Details
#created_group_name ⇒ Object
30 31 32 |
# File 'lib/active_samba_ldap/computer_account_entry.rb', line 30 def created_group_name super.sub(/\$$/, '') end |
#default_gid_number ⇒ Object
26 27 28 |
# File 'lib/active_samba_ldap/computer_account_entry.rb', line 26 def default_gid_number self.class.configuration[:default_computer_gid] end |
#remove_from_group(group) ⇒ Object
22 23 24 |
# File 'lib/active_samba_ldap/computer_account_entry.rb', line 22 def remove_from_group(group) group.computers.delete(self) end |