class ActiveLdap::Ldif::ModifyNameRecord

def delete_old_rdn?

def delete_old_rdn?
  @delete_old_rdn
end

def initialize(dn, controls, change_type,

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

def normalize_delete_old_rdn(delete_old_rdn)

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

def to_s_content

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