Module: Webbed::GenericMessage Abstract
Overview
Instance Attribute Summary (collapse)
-
- (#to_s) entity_body
The Entity Body of the message.
-
- (Headers) headers
The Headers of the message.
-
- (HTTPVersion) http_version
The HTTP-Version of the message.
Instance Method Summary (collapse)
-
- (String) to_s
Converts the message into an HTTP Message as per RFC 2616.
Instance Attribute Details
- (#to_s) entity_body
The Entity Body of the message
33 34 35 |
# File 'lib/webbed/generic_message.rb', line 33 def entity_body @entity_body end |
- (Headers) headers
The Headers of the message
The method automatically converts the new value to an instance of Headers if it is not already one.
24 25 26 |
# File 'lib/webbed/generic_message.rb', line 24 def headers @headers end |
- (HTTPVersion) http_version
The HTTP-Version of the message
The method automatically converts the new value to an instance of HTTPVersion if it is not already one.
12 13 14 |
# File 'lib/webbed/generic_message.rb', line 12 def http_version @http_version end |
Instance Method Details
- (String) to_s
Converts the message into an HTTP Message as per RFC 2616.
38 39 40 |
# File 'lib/webbed/generic_message.rb', line 38 def to_s "#{start_line}#{headers.to_s}\r\n#{entity_body}" end |