Class: YARD::Server::RackAdapter
- Includes:
- WEBrick::HTTPUtils
- Defined in:
- lib/yard/server/rack_adapter.rb
Overview
Instance Attribute Summary
Attributes inherited from Adapter
#document_root, #libraries, #options, #router, #server_options
Instance Method Summary collapse
Methods inherited from Adapter
#add_library, #initialize, setup, shutdown
Constructor Details
This class inherits a constructor from YARD::Server::Adapter
Instance Method Details
#call(env) ⇒ Object
18 19 20 21 22 |
# File 'lib/yard/server/rack_adapter.rb', line 18 def call(env) request = Rack::Request.new(env) request.path_info = unescape(request.path_info) # unescape things like %3F router.call(request) end |
#start ⇒ Object
24 25 26 27 28 29 |
# File 'lib/yard/server/rack_adapter.rb', line 24 def start server = Rack::Server.new() server.instance_variable_set("@app", self) trap("INT") { server.shutdown } server.start end |