Class: NaiveHttpResponse::HttpHeader

Inherits:
Object
  • Object
show all
Defined in:
lib/bane/naive_http_response.rb

Instance Method Summary collapse

Constructor Details

#initialize(headers) ⇒ HttpHeader

Returns a new instance of HttpHeader.



8
9
10
# File 'lib/bane/naive_http_response.rb', line 8

def initialize(headers)
  @headers = headers
end

Instance Method Details

#to_sObject



12
13
14
# File 'lib/bane/naive_http_response.rb', line 12

def to_s
  @headers.map { |k, v| "#{k}: #{v}" }.join(CRLF)
end