Class: Hanami::Configuration::Middleware Private
- Inherits:
-
Object
- Object
- Hanami::Configuration::Middleware
- Defined in:
- lib/hanami/configuration/middleware.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.
Middleware configuration
Instance Method Summary collapse
- #each(&blk) ⇒ Object private
-
#initialize ⇒ Middleware
constructor
private
A new instance of Middleware.
-
#use(middleware, *args, &blk) ⇒ Object
private
Use a Rack middleware.
Constructor Details
#initialize ⇒ Middleware
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 Middleware.
11 12 13 |
# File 'lib/hanami/configuration/middleware.rb', line 11 def initialize @middleware = Concurrent::Array.new end |
Instance Method Details
#each(&blk) ⇒ Object
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.
35 36 37 |
# File 'lib/hanami/configuration/middleware.rb', line 35 def each(&blk) @middleware.each(&blk) end |
#use(middleware, *args, &blk) ⇒ Object
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.
Use a Rack middleware
29 30 31 |
# File 'lib/hanami/configuration/middleware.rb', line 29 def use(middleware, *args, &blk) @middleware.push([middleware, args, blk]) end |