Module: Tictail::Helper

Included in:
Client
Defined in:
lib/tictail/helper.rb

Instance Method Summary collapse

Instance Method Details

#convert_hash_keys(value) ⇒ Object



3
4
5
6
7
8
9
10
11
12
# File 'lib/tictail/helper.rb', line 3

def convert_hash_keys(value)
  case value
    when Array
      value.map { |v| convert_hash_keys(v) }
    when Hash
      Hash[value.map { |k, v| [k.to_s, convert_hash_keys(v)] }]
    else
      value
  end
end