Method: Dhall::Util.transform_keys
- Defined in:
- lib/dhall/util.rb
.transform_keys(hash_or_not) ⇒ Object
156 157 158 159 160 |
# File 'lib/dhall/util.rb', line 156 def self.transform_keys(hash_or_not) return hash_or_not unless hash_or_not.is_a?(Hash) Hash[hash_or_not.map { |k, v| [(yield k), v] }] end |