Module: Webbed::GenericMessage Abstract
Overview
Instance Attribute Summary collapse
-
#entity_body ⇒ #to_s
The Entity Body of the message.
-
#headers ⇒ Headers
The Headers of the message.
-
#http_version ⇒ HTTPVersion
The HTTP-Version of the message.
Instance Method Summary collapse
-
#to_s ⇒ String
Converts the message into an HTTP Message as per RFC 2616.
Instance Attribute Details
#entity_body ⇒ #to_s
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 |
#http_version ⇒ HTTPVersion
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
#to_s ⇒ String
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 |