Class: ActiveLdap::Ldif::ModifyRecord
- Inherits:
-
ChangeRecord
- Object
- Record
- ChangeRecord
- ActiveLdap::Ldif::ModifyRecord
- Includes:
- Enumerable
- Defined in:
- lib/active_ldap/ldif.rb
Defined Under Namespace
Classes: AddOperation, DeleteOperation, Operation, ReplaceOperation
Instance Attribute Summary collapse
-
#operations ⇒ Object
readonly
Returns the value of attribute operations.
Attributes inherited from ChangeRecord
Attributes inherited from Record
Instance Method Summary collapse
- #<<(operation) ⇒ Object
- #==(other) ⇒ Object
- #add_operation(type, attribute, options, attributes) ⇒ Object
- #each(&block) ⇒ Object
-
#initialize(dn, controls = [], operations = []) ⇒ ModifyRecord
constructor
A new instance of ModifyRecord.
Methods inherited from ChangeRecord
#add?, #delete?, #modify?, #modify_dn?, #modify_rdn?
Methods inherited from Record
Methods included from GetTextSupport
Constructor Details
#initialize(dn, controls = [], operations = []) ⇒ ModifyRecord
Returns a new instance of ModifyRecord.
844 845 846 847 |
# File 'lib/active_ldap/ldif.rb', line 844 def initialize(dn, controls=[], operations=[]) super(dn, {}, controls, "modify") @operations = operations end |
Instance Attribute Details
#operations ⇒ Object (readonly)
Returns the value of attribute operations.
843 844 845 |
# File 'lib/active_ldap/ldif.rb', line 843 def operations @operations end |
Instance Method Details
#<<(operation) ⇒ Object
853 854 855 |
# File 'lib/active_ldap/ldif.rb', line 853 def <<(operation) @operations << operation end |
#==(other) ⇒ Object
862 863 864 |
# File 'lib/active_ldap/ldif.rb', line 862 def ==(other) super(other) and @operations == other.operations end |
#add_operation(type, attribute, options, attributes) ⇒ Object
857 858 859 860 |
# File 'lib/active_ldap/ldif.rb', line 857 def add_operation(type, attribute, , attributes) klass = self.class.const_get("#{type.to_s.capitalize}Operation") self << klass.new(attribute, , attributes) end |
#each(&block) ⇒ Object
849 850 851 |
# File 'lib/active_ldap/ldif.rb', line 849 def each(&block) @operations.each(&block) end |