Module: RestClient::Mixin::Response::ClassMethods

Defined in:
lib/rest-client-1.2.0/lib/restclient/mixin/response.rb

Instance Method Summary collapse

Instance Method Details

#beautify_headers(headers) ⇒ Object



39
40
41
42
43
44
# File 'lib/rest-client-1.2.0/lib/restclient/mixin/response.rb', line 39

def beautify_headers(headers)
  headers.inject({}) do |out, (key, value)|
    out[key.gsub(/-/, '_').downcase.to_sym] = value.first
    out
  end
end