Class: Hatetepe::Message

Inherits:
Object
  • Object
show all
Defined in:
lib/hatetepe/message.rb

Direct Known Subclasses

Request, Response

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(headers = {}, body = nil, http_version = "1.1") ⇒ Message

Returns a new instance of Message.



8
9
10
11
# File 'lib/hatetepe/message.rb', line 8

def initialize(headers = {}, body = nil, http_version = "1.1")
  @headers, @http_version = headers, http_version
  @body = body || Body.new
end

Instance Attribute Details

#bodyObject

Returns the value of attribute body.



5
6
7
# File 'lib/hatetepe/message.rb', line 5

def body
  @body
end

#connectionObject

Returns the value of attribute connection.



6
7
8
# File 'lib/hatetepe/message.rb', line 6

def connection
  @connection
end

#headersObject

Returns the value of attribute headers.



5
6
7
# File 'lib/hatetepe/message.rb', line 5

def headers
  @headers
end

#http_versionObject

Returns the value of attribute http_version.



5
6
7
# File 'lib/hatetepe/message.rb', line 5

def http_version
  @http_version
end