2021-06-01 12:20:20 +00:00
|
|
|
# Copyright (C) 2012-2021 Zammad Foundation, http://zammad-foundation.org/
|
|
|
|
|
2017-04-19 10:09:54 +00:00
|
|
|
# Extends the 'net/ldap' class Net::LDAP::Entry
|
|
|
|
# without overwriting methods.
|
|
|
|
class Net::LDAP::Entry
|
|
|
|
|
|
|
|
# Creates a duplicate of the internal Hash containing the
|
|
|
|
# attributes of the entry.
|
|
|
|
#
|
|
|
|
# @see Net::LDAP::Entry#initialize
|
|
|
|
# @see Net::LDAP::Entry#attribute_names
|
|
|
|
#
|
|
|
|
# @example get the Hash
|
|
|
|
# entry.to_h
|
|
|
|
# #=> {dn: ['...'], another_attribute: ['...', ...], ...}
|
|
|
|
#
|
|
|
|
# @return [Hash{Symbol=>Array<String>}] A duplicate of the internal Hash with the entries attributes.
|
|
|
|
def to_h
|
|
|
|
@myhash.dup
|
|
|
|
end
|
|
|
|
end
|