Class: HashWithIndifferentAccess

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

Class Method Summary collapse

Class Method Details

.deep_transform(hash) ⇒ Object



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

def self.deep_transform hash
  a = HashWithIndifferentAccess.new(hash)
  a.each do |k, v|
    if v.is_a? Hash
      v = deep_transform(v)
    end
  end
  a
end