module H2::HeaderStringifier

Private Instance Methods

stringify_headers(hash) click to toggle source
# File lib/h2.rb, line 165
def stringify_headers hash
  hash.keys.each do |k|
    hash[k] = hash[k].to_s unless String === hash[k]
    if Symbol === k
      key = k.to_s.gsub '_', '-'
      hash[key] = hash.delete k
    end
  end
  hash
end