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

Methods included from GetTextSupport

included

Constructor Details

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

Returns a new instance of ChangeRecord.



669
670
671
672
673
# File 'lib/active_ldap/ldif.rb', line 669

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.



668
669
670
# File 'lib/active_ldap/ldif.rb', line 668

def change_type
  @change_type
end

#controlsObject (readonly)

Returns the value of attribute controls.



668
669
670
# File 'lib/active_ldap/ldif.rb', line 668

def controls
  @controls
end

Instance Method Details

#==(other) ⇒ Object



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

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

#add?Boolean

Returns:

  • (Boolean)


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

def add?
  @change_type == "add"
end

#delete?Boolean

Returns:

  • (Boolean)


679
680
681
# File 'lib/active_ldap/ldif.rb', line 679

def delete?
  @change_type == "delete"
end

#modify?Boolean

Returns:

  • (Boolean)


683
684
685
# File 'lib/active_ldap/ldif.rb', line 683

def modify?
  @change_type == "modify"
end

#modify_dn?Boolean

Returns:

  • (Boolean)


687
688
689
# File 'lib/active_ldap/ldif.rb', line 687

def modify_dn?
  @change_type == "moddn"
end

#modify_rdn?Boolean

Returns:

  • (Boolean)


691
692
693
# File 'lib/active_ldap/ldif.rb', line 691

def modify_rdn?
  @change_type == "modrdn"
end