Skip to content

Commit 74bb8b3

Browse files
committed
Document search args with relevant RFC sections
1 parent 4019093 commit 74bb8b3

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

lib/net/ldap/connection.rb

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -315,19 +315,27 @@ def search(args = nil)
315315
args ||= {}
316316

317317
# filtering, scoping, search base
318+
# filter: https://tools.ietf.org/html/rfc4511#section-4.5.1.7
319+
# base: https://tools.ietf.org/html/rfc4511#section-4.5.1.1
320+
# scope: https://tools.ietf.org/html/rfc4511#section-4.5.1.2
318321
filter = args[:filter] || Net::LDAP::Filter.eq("objectClass", "*")
319322
base = args[:base]
320323
scope = args[:scope] || Net::LDAP::SearchScope_WholeSubtree
321324

322325
# attr handling
326+
# attrs: https://tools.ietf.org/html/rfc4511#section-4.5.1.8
327+
# attrs_only: https://tools.ietf.org/html/rfc4511#section-4.5.1.6
323328
attrs = Array(args[:attributes])
324329
attrs_only = args[:attributes_only] == true
325330

326331
# references
332+
# refs: https://tools.ietf.org/html/rfc4511#section-4.5.3
333+
# deref: https://tools.ietf.org/html/rfc4511#section-4.5.1.3
327334
refs = args[:return_referrals] == true
328335
deref = args[:deref] || Net::LDAP::DerefAliases_Never
329336

330337
# limiting, paging, sorting
338+
# size: https://tools.ietf.org/html/rfc4511#section-4.5.1.4
331339
size = args[:size].to_i
332340
paged = args[:paged_searches_supported]
333341
sort = args.fetch(:sort_controls, false)

0 commit comments

Comments
 (0)