Class: Hash

Inherits:
Object show all
Defined in:
lib/bauk/utils/symbolize.rb

Instance Method Summary collapse

Instance Method Details

#symbolizeObject



9
10
11
12
13
14
15
# File 'lib/bauk/utils/symbolize.rb', line 9

def symbolize
  reduce({}) do |memo, (k, v)|
    memo.tap do |m|
      m[k.to_sym] = v.respond_to?(:symbolize) ? v.symbolize() : v
    end
  end
end