module EmmyHttp::Utils
Public Instance Methods
convert_headers(headers)
click to toggle source
CONTENT_TYPE becomes Content-Type
# File lib/emmy_http/utils.rb, line 6 def convert_headers(headers) headers.inject({}) { |h, (k, v)| h[k.split(/[_-]/).map { |w| w.downcase.capitalize }.join('-')] = v; h } end