Method: HTTP::Protocol::Headers#slice!

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

#slice!(keys) ⇒ Object



98
99
100
101
102
103
104
105
106
107
108
# File 'lib/http/protocol/headers.rb', line 98

def slice!(keys)
  values, @fields = @fields.partition do |field|
    keys.include?(field.first.downcase)
  end
  
  if @indexed
    keys.each do |key|
      @indexed.delete(key)
    end
  end
end