# class ActiveLdap::Schema::Syntaxes::DistinguishedName

### Public Instance Methods

normalize_value(value) click to toggle source

    # File lib/active_ldap/schema/syntaxes.rb, line 141
    def normalize_value(value)
      if value.is_a?(DN)
        value.to_s
      else
        value
      end
    end

type_cast(value) click to toggle source

    # File lib/active_ldap/schema/syntaxes.rb, line 134
    def type_cast(value)
      return nil if value.nil?
      DN.parse(value)
    rescue DistinguishedNameInvalid
      value
    end

### Private Instance Methods

validate_normalized_value(value, original_value) click to toggle source

    # File lib/active_ldap/schema/syntaxes.rb, line 150
    def validate_normalized_value(value, original_value)
      DN.parse(value)
      nil
    rescue DistinguishedNameInvalid
      $!.message
    end