Class: Reifier::Response

Inherits:
Object
  • Object
show all
Defined in:
lib/reifier/response.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#bodyObject

Returns the value of attribute body.



3
4
5
# File 'lib/reifier/response.rb', line 3

def body
  @body
end

#headersObject

Returns the value of attribute headers.



3
4
5
# File 'lib/reifier/response.rb', line 3

def headers
  @headers
end

#protocolObject

Returns the value of attribute protocol.



3
4
5
# File 'lib/reifier/response.rb', line 3

def protocol
  @protocol
end

#request_methodObject

Returns the value of attribute request_method.



3
4
5
# File 'lib/reifier/response.rb', line 3

def request_method
  @request_method
end

#request_uriObject

Returns the value of attribute request_uri.



3
4
5
# File 'lib/reifier/response.rb', line 3

def request_uri
  @request_uri
end

#statusObject

Returns the value of attribute status.



3
4
5
# File 'lib/reifier/response.rb', line 3

def status
  @status
end

Instance Method Details

#<<(rack_return) ⇒ Object



11
12
13
14
15
# File 'lib/reifier/response.rb', line 11

def <<(rack_return)
  @status  = rack_return[0]
  @headers = rack_return[1]
  @body    = rack_return[2]
end

#handle(socket) ⇒ Object



5
6
7
8
9
# File 'lib/reifier/response.rb', line 5

def handle(socket)
  handle_request_line(socket)
  handle_headers(socket)
  handle_body(socket)
end