WebControllerServer (Class)

In: libraries/web_controller_server.rb
Parent: Object

Terminology:

  • Static controller: Is a controller that has all it’s show_* and do_* methods mounted by the server

at server start, so the server will handle request rejection of invalid requests

  • Dynamic controller: Is a controller that’s mounted with a responsibility to handle all the request mapping

itself. Hence, the server will never reject a request that’s below the controller in the path.

Methods

new  

Constants

STATIC_MOUNTING = 1
DYNAMIC_MOUNTING = 2
MOUNT_TYPE = DYNAMIC_MOUNTING
SERVER_TYPE = (RUBY_PLATFORM =~ /mswin/ ? SimpleServer : Daemon)

Public Class methods

[Source]

    # File libraries/web_controller_server.rb, line 17
17:   def initialize(port, server_type, controller_path)
18:     @server = WEBrick::HTTPServer::new(:Port => port, :ServerType => server_type || SERVER_TYPE)
19:     @server.logger.info "Your WEBrick server is now running on http://localhost:#{port}"
20:     @controller_path = controller_path
21:     mount_controllers
22:     start_server
23:   end

[Validate]