class Volt::HttpResponseHeader
Wrapper around a Hash
for easy http header creation / manipulation with indifferent access. header == header == header == header ['Content_Type']
Public Instance Methods
[](key)
click to toggle source
Calls superclass method
# File lib/volt/server/rack/http_response_header.rb, line 13 def [](key) super(key.to_s.headerize) end
[]=(key, value)
click to toggle source
Calls superclass method
# File lib/volt/server/rack/http_response_header.rb, line 9 def []=(key, value) super(key.to_s.headerize, value) end
delete(key)
click to toggle source
Calls superclass method
# File lib/volt/server/rack/http_response_header.rb, line 17 def delete(key) super(key.to_s.headerize) end
merge(other)
click to toggle source
# File lib/volt/server/rack/http_response_header.rb, line 21 def merge(other) dup.merge!(other) end
merge!(other)
click to toggle source
# File lib/volt/server/rack/http_response_header.rb, line 25 def merge!(other) new_hash = {} other.each_with_object(new_hash) do |(key, value), hash| self[key.to_s.headerize] = value end self end