Method: Protocol::HTTP::Headers#extract

Defined in:
lib/protocol/http/headers.rb

#extract(keys) ⇒ Object



164
165
166
167
168
169
170
171
172
173
174
175
176
# File 'lib/protocol/http/headers.rb', line 164

def extract(keys)
	deleted, @fields = @fields.partition do |field|
		keys.include?(field.first.downcase)
	end
	
	if @indexed
		keys.each do |key|
			@indexed.delete(key)
		end
	end
	
	return deleted
end