Class: ROM::LDAP::DSML::Exporter Private

Inherits:
Object
  • Object
show all
Extended by:
Initializer
Includes:
LibXML
Defined in:
lib/rom/ldap/extensions/dsml.rb

Overview

This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.

Export Entry objects as DSML files.

Instance Method Summary collapse

Instance Method Details

#to_dsmlString

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

<?xml version=“1.0” encoding=“UTF-8”?>

<dsml>
  <directory-entries>
    <entry dn="dn">

Returns:

  • (String)


41
42
43
44
45
46
47
48
# File 'lib/rom/ldap/extensions/dsml.rb', line 41

def to_dsml
  doc = XML::Document.new
  doc.encoding = XML::Encoding::UTF_8
  doc.root = root = create_node('dsml')
  root << (entries = create_node('directory-entries'))
  map_tuples { |entry| entries << entry }
  doc.to_s
end