Module: PactBroker::Client::StringToSymbol

Included in:
BaseClient
Defined in:
lib/pact_broker/client/base_client.rb

Instance Method Summary collapse

Instance Method Details

#string_keys_to_symbols(hash) ⇒ Object

Only works for one level, not recursive!



26
27
28
29
30
# File 'lib/pact_broker/client/base_client.rb', line 26

def string_keys_to_symbols hash
  hash.keys.each_with_object({}) do | key, new_hash |
    new_hash[key.to_sym] = hash[key]
  end
end