summaryrefslogtreecommitdiff
path: root/vendor/bundle/ruby/3.4.0/gems/webrick-1.9.1/sig/httpservlet/abstract.rbs
blob: b067deba2c5ab3ab0eab0129e00848b4f1d653b6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
module WEBrick
  module HTTPServlet
    class HTTPServletError < StandardError
    end

    class AbstractServlet
      @server: HTTPServer

      interface _Config
        def []: (Symbol) -> untyped
      end

      @config: _Config

      @logger: Log

      @options: untyped # Array[untyped] causes RBS::InstanceVariableTypeError

      def self.get_instance: (HTTPServer server, *untyped options) -> instance

      def initialize: (HTTPServer server, *untyped options) -> void

      def service: (HTTPRequest req, HTTPResponse res) -> void

      def do_GET: (HTTPRequest req, HTTPResponse res) -> bot

      def do_HEAD: (HTTPRequest req, HTTPResponse res) -> bot

      def do_OPTIONS: (HTTPRequest req, HTTPResponse res) -> void

      private

      def redirect_to_directory_uri: (HTTPRequest req, HTTPResponse res) -> void
    end
  end
end