Class: Rex::Proto::Http::Handler

Inherits:
Object
  • Object
show all
Defined in:
lib/rex/proto/http/handler.rb

Overview

This class acts as the base class for all handlers.

Direct Known Subclasses

Erb, Proc

Defined Under Namespace

Classes: Erb, Proc

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(server) ⇒ Handler

Initializes the handler instance as being associated with the supplied server.



18
19
20
# File 'lib/rex/proto/http/handler.rb', line 18

def initialize(server)
  self.server = server
end

Instance Attribute Details

#serverObject (protected)

:nodoc:



38
39
40
# File 'lib/rex/proto/http/handler.rb', line 38

def server
  @server
end

Class Method Details

.relative_resource_required?Boolean

By default, handlers do not require a relative resource.

Returns:

  • (Boolean)


25
26
27
# File 'lib/rex/proto/http/handler.rb', line 25

def self.relative_resource_required?
  false
end

Instance Method Details

#relative_resource_required?Boolean

Calls the class method.

Returns:

  • (Boolean)


32
33
34
# File 'lib/rex/proto/http/handler.rb', line 32

def relative_resource_required?
  self.class.relative_resource_required?
end