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.
844
845
846
847
848
849
|
# File 'lib/active_ldap/ldif.rb', line 844
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.
843
844
845
|
# File 'lib/active_ldap/ldif.rb', line 843
def attribute
@attribute
end
|
#attributes ⇒ Object
Returns the value of attribute attributes.
843
844
845
|
# File 'lib/active_ldap/ldif.rb', line 843
def attributes
@attributes
end
|
#options ⇒ Object
Returns the value of attribute options.
843
844
845
|
# File 'lib/active_ldap/ldif.rb', line 843
def options
@options
end
|
#type ⇒ Object
Returns the value of attribute type.
843
844
845
|
# File 'lib/active_ldap/ldif.rb', line 843
def type
@type
end
|
Instance Method Details
#==(other) ⇒ Object
872
873
874
875
876
877
878
|
# File 'lib/active_ldap/ldif.rb', line 872
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
855
856
857
|
# File 'lib/active_ldap/ldif.rb', line 855
def add?
@type == "add"
end
|
#delete? ⇒ Boolean
859
860
861
|
# File 'lib/active_ldap/ldif.rb', line 859
def delete?
@type == "delete"
end
|
#full_attribute_name ⇒ Object
851
852
853
|
# File 'lib/active_ldap/ldif.rb', line 851
def full_attribute_name
[@attribute, *@options].join(";")
end
|
#replace? ⇒ Boolean
863
864
865
|
# File 'lib/active_ldap/ldif.rb', line 863
def replace?
@type == "replace"
end
|