Class: Tarquinn::RequestHandler Private

Inherits:
Object
  • Object
show all
Defined in:
lib/tarquinn/request_handler.rb

Overview

This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.

RequestHandler processing a request defining the flow

Instance Method Summary collapse

Constructor Details

#initialize(configs, controller) ⇒ RequestHandler

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns a new instance of RequestHandler.

Parameters:



23
24
25
26
# File 'lib/tarquinn/request_handler.rb', line 23

def initialize(configs, controller)
  @configs = configs
  @controller = controller
end

Instance Method Details

#perform_redirectNilClass, String

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Performs redirection if enabled / needed

The rules / configuratons are processed in order and if any is positive, it will be processed

Returns:

  • (NilClass)

    Nothing when no redirection is performed

  • (String)

    The result of the redirection



35
36
37
38
39
# File 'lib/tarquinn/request_handler.rb', line 35

def perform_redirect
  return unless perform_redirect?

  handler_redirector.redirect
end