Class: YARD::Server::WebrickServlet
Relationships & Source Files | |
Super Chains via Extension / Inclusion / Inheritance | |
Class Chain:
self,
WEBrick::HTTPServlet::AbstractServlet
|
|
Instance Chain:
self,
WEBrick::HTTPServlet::AbstractServlet
|
|
Inherits: |
WEBrick::HTTPServlet::AbstractServlet
|
Defined in: | lib/yard/server/webrick_adapter.rb |
Overview
The main WEBrick servlet implementation, accepting only GET requests.
Class Method Summary
- .new(server, adapter) ⇒ WebrickServlet constructor
Instance Attribute Summary
- #adapter rw
Instance Method Summary
- #do_GET(request, response) Internal use only Internal use only
Constructor Details
.new(server, adapter) ⇒ WebrickServlet
Instance Attribute Details
#adapter (rw)
# File 'lib/yard/server/webrick_adapter.rb', line 21
attr_accessor :adapter
Instance Method Details
#do_GET(request, response)
This method is for internal use only.
# File 'lib/yard/server/webrick_adapter.rb', line 29
def do_GET(request, response) # rubocop:disable Style/MethodName status, headers, body = *adapter.router.call(request) response.status = status response.body = body.is_a?(Array) ? body[0] : body headers.each do |key, value| response[key] = value end end