Class: ActiveLdap::Ldif::ModifyRecord::Operation
- Inherits:
-
Object
- Object
- ActiveLdap::Ldif::ModifyRecord::Operation
show all
- Defined in:
- lib/active_ldap/ldif.rb
Instance Attribute Summary collapse
Instance Method Summary
collapse
Constructor Details
#initialize(type, attribute, options, attributes) ⇒ Operation
Returns a new instance of Operation.
878
879
880
881
882
883
|
# File 'lib/active_ldap/ldif.rb', line 878
def initialize(type, attribute, options, attributes)
@type = type
@attribute = attribute
@options = options
@attributes = attributes
end
|
Instance Attribute Details
#attribute ⇒ Object
Returns the value of attribute attribute.
877
878
879
|
# File 'lib/active_ldap/ldif.rb', line 877
def attribute
@attribute
end
|
#attributes ⇒ Object
Returns the value of attribute attributes.
877
878
879
|
# File 'lib/active_ldap/ldif.rb', line 877
def attributes
@attributes
end
|
#options ⇒ Object
Returns the value of attribute options.
877
878
879
|
# File 'lib/active_ldap/ldif.rb', line 877
def options
@options
end
|
#type ⇒ Object
Returns the value of attribute type.
877
878
879
|
# File 'lib/active_ldap/ldif.rb', line 877
def type
@type
end
|
Instance Method Details
#==(other) ⇒ Object
906
907
908
909
910
911
912
|
# File 'lib/active_ldap/ldif.rb', line 906
def ==(other)
other.is_a?(self.class) and
@type == other.type and
full_attribute_name == other.full_attribute_name and
Attributes.normalize(@attributes) ==
Attributes.normalize(other.attributes)
end
|
#add? ⇒ Boolean
889
890
891
|
# File 'lib/active_ldap/ldif.rb', line 889
def add?
@type == "add"
end
|
#delete? ⇒ Boolean
893
894
895
|
# File 'lib/active_ldap/ldif.rb', line 893
def delete?
@type == "delete"
end
|
#full_attribute_name ⇒ Object
885
886
887
|
# File 'lib/active_ldap/ldif.rb', line 885
def full_attribute_name
[@attribute, *@options].join(";")
end
|
#replace? ⇒ Boolean
897
898
899
|
# File 'lib/active_ldap/ldif.rb', line 897
def replace?
@type == "replace"
end
|