Class: Midori::Middleware

Inherits:
Object
  • Object
show all
Defined in:
lib/em-midori/middleware.rb

Overview

Ancestor of all middlewares

Instance Method Summary collapse

Constructor Details

#initializeMiddleware

Init a middleware


5
6
# File 'lib/em-midori/middleware.rb', line 5

def initialize
end

Instance Method Details

#after(_request, response) ⇒ Midori::Response

run after processing a request

Parameters:

Returns:


19
20
21
# File 'lib/em-midori/middleware.rb', line 19

def after(_request, response)
  response
end

#before(request) ⇒ Midori::Request

run before processing a request

Parameters:

Returns:


11
12
13
# File 'lib/em-midori/middleware.rb', line 11

def before(request)
  request
end

#body_acceptArray<Class>

Acceptable body

Returns:

  • (Array<Class>)

    array of acceptable type's class


30
31
32
# File 'lib/em-midori/middleware.rb', line 30

def body_accept
  [String]
end

#helpernil

code to be inserted inside CleanRoom

Returns:

  • (nil)

    nil


25
26
# File 'lib/em-midori/middleware.rb', line 25

def helper
end