Class: Array

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

Instance Method Summary collapse

Instance Method Details

#with_indifferent_accessObject



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

def with_indifferent_access
  map do |value|
    case value
    when Hash
      value.with_indifferent_access
    when Array
      value.with_indifferent_access
    else
      value
    end
  end
end