Skip to content

Commit b5799f6

Browse files
author
blackhedd
committed
documents
1 parent 4f18bcb commit b5799f6

File tree

1 file changed

+30
-0
lines changed

1 file changed

+30
-0
lines changed

lib/net/ldap.rb

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,36 @@ module Net
3939
# the LDAP protocol itself, and thus presenting as Ruby-like
4040
# a programming interface as possible.
4141
#
42+
# === Quick-start for the Impatient
43+
# require 'rubygems'
44+
# require 'net/ldap'
45+
#
46+
# ldap = Net::LDAP.new :host => server_ip_address,
47+
# :port => 389,
48+
# :auth => {
49+
# :method => :simple,
50+
# :username => "cn=manager,dc=example,dc=com",
51+
# :password => "opensesame"
52+
# }
53+
#
54+
# filter = Net::LDAP::Filter.eq?( "cn", "George*" )
55+
# treebase = "dc=example,dc=com"
56+
#
57+
# ldap.search( :base => treebase, :filter => filter ) do |result|
58+
# result.each do |dn, attrs|
59+
# puts "DN: #{dn}"
60+
# attrs.each do |attr, values|
61+
# puts "***Attr: #{attr}"
62+
# values.each do |value|
63+
# puts " #{value}"
64+
# end
65+
# end
66+
# end
67+
# end
68+
#
69+
# p ldap.get_operation_result
70+
#
71+
#
4272
# == Quick introduction to LDAP
4373
#
4474
# We're going to provide a quick and highly informal introduction to LDAP

0 commit comments

Comments
 (0)