Sha256: e3116ab90db2baebb108deebde3bd996627ed6c4a3e2ef89fe05085f3589e0b7
Contents?: true
Size: 370 Bytes
Versions: 3
Compression:
Stored size: 370 Bytes
Contents
module Aliyun module Utils def symbolize_hash_keys(object) if object.is_a? Hash object.keys.each { |k| object[(k.to_sym rescue k) || k] = symbolize_hash_keys(object.delete(k)) } elsif object.is_a? Array object.each { |e| symbolize_hash_keys(e) } end object end module_function :symbolize_hash_keys end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
aliyun-sdk-core-0.1.5 | lib/aliyun/utils.rb |
aliyun-sdk-core-0.1.4 | lib/aliyun/utils.rb |
aliyun-sdk-core-0.1.3 | lib/aliyun/utils.rb |