Sha256: 760c521402f6f5927a946c5789750318edc62bd7274532ea2099fba2f15e8eee

Contents?: true

Size: 291 Bytes

Versions: 6

Compression:

Stored size: 291 Bytes

Contents

module Tictail
  module Helper
    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

6 entries across 6 versions & 1 rubygems

Version Path
tictail-api-0.1.3 lib/tictail/helper.rb
tictail-api-0.1.2 lib/tictail/helper.rb
tictail-api-0.1.1 lib/tictail/helper.rb
tictail-api-0.0.6 lib/tictail/helper.rb
tictail-api-0.0.5 lib/tictail/helper.rb
tictail-api-0.0.4 lib/tictail/helper.rb