Method: ActiveLdap::Adapter::JndiConnection#add

Defined in:
lib/active_ldap/adapter/jndi_connection.rb

#add(dn, records) ⇒ Object



166
167
168
169
170
171
172
173
# File 'lib/active_ldap/adapter/jndi_connection.rb', line 166

def add(dn, records)
  attributes = BasicAttributes.new
  records.each do |record|
    attributes.put(record.to_java_attribute)
  end
  @context.set_request_controls([])
  @context.create_subcontext(escape_dn(dn), attributes)
end