Class: Racket::Current

Inherits:
Object
  • Object
show all
Defined in:
lib/racket/current.rb

Overview

Represents the current state of Racket while processing a request. The state gets mixed into the controller instance at the start of the request, making it easy to keep track on everything from within the controller instance.

Defined Under Namespace

Classes: State

Class Method Summary collapse

Class Method Details

.init(router_params) ⇒ Module

Called whenever a new request needs to be processed.

Parameters:

  • router_params (RouterParams)

Returns:

  • (Module)

    A module encapsulating all state relating to the current request



32
33
34
# File 'lib/racket/current.rb', line 32

def self.init(router_params)
  init_module(init_properties(*router_params.to_a))
end