Class: Hash

Inherits:
Object
  • Object
show all
Defined in:
lib/mr_video/core_ext.rb

Instance Method Summary collapse

Instance Method Details

#transform_keysObject



3
4
5
6
7
8
9
# File 'lib/mr_video/core_ext.rb', line 3

def transform_keys
  result = self.class.new
  each_key do |key|
    result[yield(key)] = self[key]
  end
  result
end