Class: HTTP::Protocol::Headers::Merged

Inherits:
Object
  • Object
show all
Defined in:
lib/http/protocol/headers.rb

Instance Method Summary collapse

Constructor Details

#initialize(*all) ⇒ Merged

Returns a new instance of Merged.



200
201
202
# File 'lib/http/protocol/headers.rb', line 200

def initialize(*all)
  @all = all
end

Instance Method Details

#<<(headers) ⇒ Object



204
205
206
# File 'lib/http/protocol/headers.rb', line 204

def << headers
  @all << headers
end

#each(&block) ⇒ Object



208
209
210
211
212
213
214
# File 'lib/http/protocol/headers.rb', line 208

def each(&block)
  @all.each do |headers|
    headers.each do |key, value|
      yield key, value.to_s
    end
  end
end