Class: ActiveLdap::Ldif::ChangeRecord

Inherits:
Record
  • Object
show all
Defined in:
lib/active_ldap/ldif.rb

Defined Under Namespace

Classes: Control

Instance Attribute Summary collapse

Attributes inherited from Record

#attributes, #dn

Instance Method Summary collapse

Methods inherited from Record

#to_hash, #to_s

Constructor Details

#initialize(dn, attributes, controls, change_type) ⇒ ChangeRecord

Returns a new instance of ChangeRecord



675
676
677
678
679
# File 'lib/active_ldap/ldif.rb', line 675

def initialize(dn, attributes, controls, change_type)
  super(dn, attributes)
  @controls = controls
  @change_type = change_type
end

Instance Attribute Details

#change_typeObject (readonly)

Returns the value of attribute change_type



674
675
676
# File 'lib/active_ldap/ldif.rb', line 674

def change_type
  @change_type
end

#controlsObject (readonly)

Returns the value of attribute controls



674
675
676
# File 'lib/active_ldap/ldif.rb', line 674

def controls
  @controls
end

Instance Method Details

#==(other) ⇒ Object



701
702
703
704
705
# File 'lib/active_ldap/ldif.rb', line 701

def ==(other)
  super(other) and
    @controls = other.controls and
    @change_type == other.change_type
end

#add?Boolean

Returns:

  • (Boolean)


681
682
683
# File 'lib/active_ldap/ldif.rb', line 681

def add?
  @change_type == "add"
end

#delete?Boolean

Returns:

  • (Boolean)


685
686
687
# File 'lib/active_ldap/ldif.rb', line 685

def delete?
  @change_type == "delete"
end

#modify?Boolean

Returns:

  • (Boolean)


689
690
691
# File 'lib/active_ldap/ldif.rb', line 689

def modify?
  @change_type == "modify"
end

#modify_dn?Boolean

Returns:

  • (Boolean)


693
694
695
# File 'lib/active_ldap/ldif.rb', line 693

def modify_dn?
  @change_type == "moddn"
end

#modify_rdn?Boolean

Returns:

  • (Boolean)


697
698
699
# File 'lib/active_ldap/ldif.rb', line 697

def modify_rdn?
  @change_type == "modrdn"
end