Skip to content

Meddleware::Stack

Daniel Pepper edited this page Sep 14, 2022 · 1 revision

Methods to add, remove, and execute middleware.


call(*args, &block)

Execute the middleware chain.

  • args - any arguments that should be passed through.
  • block - a final block that should be executed and whose returned value is passed back up the chain.

Helpers

include?(middleware)

Check if middleware has been added to the chain.

count

Returns the chain count.

clear

Clears the chain of middleware.

empty?

Checks whether the chain is empty.

Clone this wiki locally