Methods

Class/Module Index [+]

Quicksearch

ActiveSambaLdap::Entry::ClassMethods

Public Instance Methods

create(attributes=nil) click to toggle source
# File lib/active_samba_ldap/entry.rb, line 9
def create(attributes=nil)
  pool = nil
  number_key = nil
  attributes ||= {}
  attributes = attributes.stringify_keys
  ensure_ou(attributes[dn_attribute])
  entry = super do |entry|
    options, pool, number_key = prepare_create_options(entry, attributes)
    entry.fill_default_values(options)
    yield entry if block_given?
  end
  if entry.errors.empty? and pool
    pool[number_key] = Integer(entry[number_key]).succ
    unless pool.save
      pool.each do |key, value|
        entry.add("pool: #{key}", value)
      end
    end
  end
  entry
end
samba4?() click to toggle source
# File lib/active_samba_ldap/entry.rb, line 31
def samba4?
  configuration[:samba4]
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.