Class: Zipmark::Util
- Inherits:
-
Object
- Object
- Zipmark::Util
- Defined in:
- lib/zipmark/util.rb
Overview
Public: Utility methods for the Zipmark API Client
Class Method Summary collapse
-
.stringify_keys(hash) ⇒ Object
Public: Method which converts all of a hash’s keys to strings.
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 |, (key, value)| [key.to_s] = value end end |