Class: Zipmark::Util

Inherits:
Object
  • Object
show all
Defined in:
lib/zipmark/util.rb

Overview

Public: Utility methods for the Zipmark API Client

Class Method Summary collapse

Class Method Details

.stringify_keys(hash) ⇒ Object

Public: Method which converts all of a hash’s keys to strings

hash - The hash whose keys you would like to convert

Returns the converted Hash



9
10
11
12
13
14
# File 'lib/zipmark/util.rb', line 9

def self.stringify_keys(hash)
  hash.inject({}) do |options, (key, value)|
    options[key.to_s] = value
    options
  end
end