Module: Mode::Sdk::HashUtil

Included in:
Column
Defined in:
lib/mode/sdk/hash_util.rb

Overview

Provides simple utility methods for manipulating a Hash

Instance Method Summary collapse

Instance Method Details

#stringify_keys(hash) ⇒ Hash

Stringify hash keys


14
15
16
17
18
# File 'lib/mode/sdk/hash_util.rb', line 14

def stringify_keys(hash)
  hash.each_with_object({}) do |(key, value), result|
    result[key.to_s] = value
  end
end