Class/Module Index [+]

Quicksearch

ActiveLdap::Attributes

Public Class Methods

included(base) click to toggle source
# File lib/active_ldap/attributes.rb, line 3
def self.included(base)
  base.class_eval do
    extend(ClassMethods)
    extend(Normalizable)
    include(Normalizable)
  end
end

Private Instance Methods

attributes_protected_by_default() click to toggle source
# File lib/active_ldap/attributes.rb, line 172
def attributes_protected_by_default
  begin
    _dn_attribute = dn_attribute_with_fallback
  rescue DistinguishedNameInvalid
  end
  [_dn_attribute, 'objectClass'].compact
end
normalize_attribute_name(name) click to toggle source
# File lib/active_ldap/attributes.rb, line 180
def normalize_attribute_name(name)
  self.class.normalize_attribute_name(name)
end
remove_attributes_protected_from_mass_assignment(targets) click to toggle source
# File lib/active_ldap/attributes.rb, line 152
def remove_attributes_protected_from_mass_assignment(targets)
  needless_attributes = {}
  (attributes_protected_by_default +
   (self.class.protected_attributes || [])).each do |name|
    needless_attributes[to_real_attribute_name(name)] = true
  end

  _dn_attribute = nil
  begin
    _dn_attribute = dn_attribute_with_fallback
  rescue DistinguishedNameInvalid
  end
  targets.collect do |key, value|
    key = _dn_attribute if ["id", "dn"].include?(key.to_s)
    [to_real_attribute_name(key) || key, value]
  end.reject do |key, value|
    needless_attributes[key]
  end
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.