CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutSign UpSign In
rapid7

Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place.

GitHub Repository: rapid7/metasploit-framework
Path: blob/master/lib/rex/proto/http/handler.rb
Views: 11704
1
# -*- coding: binary -*-
2
module Rex
3
module Proto
4
module Http
5
6
###
7
#
8
# This class acts as the base class for all handlers.
9
#
10
###
11
class Handler
12
13
14
#
15
# Initializes the handler instance as being associated with the supplied
16
# server.
17
#
18
def initialize(server)
19
self.server = server
20
end
21
22
#
23
# By default, handlers do not require a relative resource.
24
#
25
def self.relative_resource_required?
26
false
27
end
28
29
#
30
# Calls the class method.
31
#
32
def relative_resource_required?
33
self.class.relative_resource_required?
34
end
35
36
protected
37
38
attr_accessor :server # :nodoc:
39
40
end
41
42
43
end
44
end
45
end
46
47