Class: Hobix::WebApp::Response

Inherits:
Message
  • Object
show all
Defined in:
lib/hobix/webapp/message.rb

Instance Attribute Summary collapse

Attributes inherited from Message

#body_object, #header_object

Instance Method Summary collapse

Methods inherited from Message

#freeze, #output_body, #output_header, #output_message

Constructor Details

#initialize(status_line = '200 OK', header = {}, body = '') ⇒ Response

Returns a new instance of Response.



165
166
167
168
# File 'lib/hobix/webapp/message.rb', line 165

def initialize(status_line='200 OK', header={}, body='')
  @status_line = status_line
  super header, body
end

Instance Attribute Details

#status_lineObject

Returns the value of attribute status_line.



169
170
171
# File 'lib/hobix/webapp/message.rb', line 169

def status_line
  @status_line
end

Instance Method Details

#output_cgi_status_field(out) ⇒ Object



171
172
173
# File 'lib/hobix/webapp/message.rb', line 171

def output_cgi_status_field(out)
  out << "Status: #{self.status_line}\n"
end