# class ActiveLdap::Ldif::ModifyNameRecord

### Attributes

new_rdn[R]
new_superior[R]

### Public Class Methods

new(dn, controls, change_type, new_rdn, delete_old_rdn, new_superior) click to toggle source
Calls superclass method ActiveLdap::Ldif::ChangeRecord.new

    # File lib/active_ldap/ldif.rb, line 786
    def initialize(dn, controls, change_type,
                   new_rdn, delete_old_rdn, new_superior)
      super(dn, {}, controls, change_type)
      @new_rdn = new_rdn
      @delete_old_rdn = normalize_delete_old_rdn(delete_old_rdn)
      @new_superior = new_superior
    end

### Public Instance Methods

delete_old_rdn?() click to toggle source

    # File lib/active_ldap/ldif.rb, line 794
    def delete_old_rdn?
      @delete_old_rdn
    end

### Private Instance Methods

normalize_delete_old_rdn(delete_old_rdn) click to toggle source

    # File lib/active_ldap/ldif.rb, line 799
    def normalize_delete_old_rdn(delete_old_rdn)
      case delete_old_rdn
      when "1", true
        true
      when "0", false
        false
      when nil
        nil
      else
        raise ArgumentError,
              _("invalid deleteoldrdn value: %s") % delete_old_rdn.inspect
      end
    end

to_s_content() click to toggle source
Calls superclass method ActiveLdap::Ldif::ChangeRecord#to_s_content

    # File lib/active_ldap/ldif.rb, line 813
    def to_s_content
      result = super
      result << "newrdn: #{@new_rdn}\n"
      result << "deleteoldrdn: #{@delete_old_rdn ? 1 : 0}\n"
      result << Attribute.encode("newsuperior", @new_superior) if @new_superior
      result
    end