class Protocol::HTTP::Headers::Merged

Used for merging objects into a sequential list of headers. Normalizes header keys and values.

Public Class Methods

new(*all) click to toggle source
# File lib/protocol/http/headers.rb, line 324
def initialize(*all)
        @all = all
end

Public Instance Methods

<<(headers) click to toggle source
# File lib/protocol/http/headers.rb, line 332
def << headers
        @all << headers
        
        return self
end
clear() click to toggle source
# File lib/protocol/http/headers.rb, line 328
def clear
        @all.clear
end
each() { |downcase, value| ... } click to toggle source

@yield [String, String] header key (lower case) and value (as string).

# File lib/protocol/http/headers.rb, line 339
def each(&block)
        @all.each do |headers|
                headers.each do |key, value|
                        yield key.downcase, value.to_s
                end
        end
end