Sha256: 8bb4a45c45c57f210a6b701d2598f64d9202001666d34ff685cebbd6d179f230
Contents?: true
Size: 395 Bytes
Versions: 3
Compression:
Stored size: 395 Bytes
Contents
module Tictail module Helper def symbolize_keys hash return hash.inject({}){|memo,(k,v)| memo[k.to_sym] = v; memo} end 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 end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
tictail-api-0.0.3 | lib/tictail/helper.rb |
tictail-api-0.0.2 | lib/tictail/helper.rb |
tictail-api-0.0.1 | lib/tictail/helper.rb |