Class: LDAP::Entry
- Inherits:
-
Object
- Object
- LDAP::Entry
- Defined in:
- lib/ldap/ldif.rb
Instance Method Summary collapse
-
#to_ldif ⇒ Object
(also: #to_s)
Convert an LDAP::Entry to LDIF.
Instance Method Details
#to_ldif ⇒ Object Also known as: to_s
Convert an LDAP::Entry to LDIF.
523 524 525 526 527 528 529 530 531 532 533 |
# File 'lib/ldap/ldif.rb', line 523 def to_ldif ldif = "dn: %s\n" % get_dn get_attributes.each do |attr| get_values( attr ).each do |val| ldif << LDIF.to_ldif( attr, [ val ] ) end end LDIF::Entry.new( ldif ) end |