Project

General

Profile

Download (1.03 KB) Statistics
| Branch: | Tag: | Revision:
#--
# LdapShadows, a Medium-level LDAP Access Library and Tool.
# Copyright (c) 2009 Marc Dequènes (Duck) <Duck@DuckCorp.org>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#++

# for Rails
class Hash
def recursive_symbolize_keys!
symbolize_keys!
values.select { |v| v.is_a?(Hash) }.each { |h| h.recursive_symbolize_keys! }
self
end
end

# for ActiveLDAP
module ActiveLdap
class DistinguishedName
def shift
@rdns.shift
end
end
end

(6-6/7)