Skip to content

Commit 999f493

Browse files
author
blackhedd
committed
Added some documentation.
1 parent 013982e commit 999f493

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

lib/net/ldap/entry.rb

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,16 @@ class LDAP
5959
#
6060
# Class Net::LDAP::Entry provides convenience methods for dealing
6161
# with LDAP entries.
62+
# In addition to the methods documented below, you may access individual
63+
# attributes of an entry simply by giving the attribute name as
64+
# the name of a method call. For example:
65+
# ldap.search( ... ) do |entry|
66+
# puts "Common name: #{entry.cn}"
67+
# puts "Email addresses:"
68+
# entry.mail.each {|ma| puts ma}
69+
# end
70+
# If you use this technique to access an attribute that is not present
71+
# in a particular Entry object, a NoMethodError exception will be raised.
6272
#
6373
#--
6474
# Ugly problem to fix someday: We key off the internal hash with

0 commit comments

Comments
 (0)