Class: ActiveLdap::Ldif::ChangeRecord — activeldap - ActiveLdap

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

- (ChangeRecord) initialize(dn, attributes, controls, change_type)

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

- (Object) change_type (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

- (Object) controls (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

- (Object) ==(other)



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

- (Boolean) add?

Returns:

  • (Boolean)


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

def add?
  @change_type == "add"
end

- (Boolean) delete?

Returns:

  • (Boolean)


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

def delete?
  @change_type == "delete"
end

- (Boolean) modify?

Returns:

  • (Boolean)


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

def modify?
  @change_type == "modify"
end

- (Boolean) modify_dn?

Returns:

  • (Boolean)


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

def modify_dn?
  @change_type == "moddn"
end

- (Boolean) modify_rdn?

Returns:

  • (Boolean)


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

def modify_rdn?
  @change_type == "modrdn"
end