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.
872
873
874
875
876
877
|
# File 'lib/active_ldap/ldif.rb', line 872
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.
871
872
873
|
# File 'lib/active_ldap/ldif.rb', line 871
def attribute
@attribute
end
|
#attributes ⇒ Object
Returns the value of attribute attributes.
871
872
873
|
# File 'lib/active_ldap/ldif.rb', line 871
def attributes
@attributes
end
|
#options ⇒ Object
Returns the value of attribute options.
871
872
873
|
# File 'lib/active_ldap/ldif.rb', line 871
def options
@options
end
|
#type ⇒ Object
Returns the value of attribute type.
871
872
873
|
# File 'lib/active_ldap/ldif.rb', line 871
def type
@type
end
|
Instance Method Details
#==(other) ⇒ Object
900
901
902
903
904
905
906
|
# File 'lib/active_ldap/ldif.rb', line 900
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
883
884
885
|
# File 'lib/active_ldap/ldif.rb', line 883
def add?
@type == "add"
end
|
#delete? ⇒ Boolean
887
888
889
|
# File 'lib/active_ldap/ldif.rb', line 887
def delete?
@type == "delete"
end
|
#full_attribute_name ⇒ Object
879
880
881
|
# File 'lib/active_ldap/ldif.rb', line 879
def full_attribute_name
[@attribute, *@options].join(";")
end
|
#replace? ⇒ Boolean
891
892
893
|
# File 'lib/active_ldap/ldif.rb', line 891
def replace?
@type == "replace"
end
|