This is a special kind of servlet that is only instantiated once, when mounted. Whenever WEBrick needs an instance of this servlet, the instance that was given when it was mounted is returned.
Does nothing. This is a dummy method that is intended only to prevent the constructor for the parent AbstractServlet class from being called.
# File lib/copland/webrick/httpservlet/singleton.rb, line 48 48: def initialize 49: end
This is to conform to the interface for AbstractServlet. Whenever WEBrick needs an instance of this servlet, it will invoke this method. This makes sure that the AbstractServlet initialize method gets called with the arguments, so that the servlet is properly initialized.
# File lib/copland/webrick/httpservlet/singleton.rb, line 56 56: def get_instance( server, *options ) 57: setup_servlet( server, *options ) 58: self 59: end