Class: SidekiqAlive::Server::HttpServer::Response

Inherits:
Object
  • Object
show all
Defined in:
lib/sidekiq_alive/server/http_server.rb

Overview

Response class for HTTP server

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(status = 200) ⇒ Response

Returns a new instance of Response.



37
38
39
40
41
# File 'lib/sidekiq_alive/server/http_server.rb', line 37

def initialize(status = 200)
  @status = status
  @status_message = nil
  @header = {}
end

Instance Attribute Details

#bodyObject

Returns the value of attribute body.



35
36
37
# File 'lib/sidekiq_alive/server/http_server.rb', line 35

def body
  @body
end

#headerObject (readonly)

Returns the value of attribute header.



34
35
36
# File 'lib/sidekiq_alive/server/http_server.rb', line 34

def header
  @header
end

#statusObject

Returns the value of attribute status.



35
36
37
# File 'lib/sidekiq_alive/server/http_server.rb', line 35

def status
  @status
end

#status_messageObject

Returns the value of attribute status_message.



35
36
37
# File 'lib/sidekiq_alive/server/http_server.rb', line 35

def status_message
  @status_message
end