This repository has been archived on 2023-12-11. You can view files and clone it, but cannot push or open issues or pull requests.
pgls/lib/pg_ldap_sync/compat.rb
2022-12-03 12:23:26 +01:00

11 lines
194 B
Ruby

#!/usr/bin/env ruby
class Hash
# transform_keys was added in ruby-2.5
def transform_keys
map do |k, v|
[yield(k), v]
end.to_h
end unless method_defined? :transform_keys
end