Class: Shoryuken::Middleware::Entry Private
- Inherits:
-
Object
- Object
- Shoryuken::Middleware::Entry
- Defined in:
- lib/shoryuken/middleware/entry.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.
Represents an entry in a middleware chain, storing the middleware class and any arguments needed for its instantiation.
Instance Attribute Summary collapse
-
#klass ⇒ Class
readonly
private
The middleware class this entry represents.
Instance Method Summary collapse
-
#initialize(klass, *args) ⇒ Entry
constructor
private
Creates a new middleware entry.
-
#make_new ⇒ Object
private
Creates a new instance of the middleware class with the stored arguments.
Constructor Details
#initialize(klass, *args) ⇒ Entry
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.
Creates a new middleware entry.
17 18 19 20 |
# File 'lib/shoryuken/middleware/entry.rb', line 17 def initialize(klass, *args) @klass = klass @args = args end |
Instance Attribute Details
#klass ⇒ Class (readonly)
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 The middleware class this entry represents.
11 12 13 |
# File 'lib/shoryuken/middleware/entry.rb', line 11 def klass @klass end |
Instance Method Details
#make_new ⇒ 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.
Creates a new instance of the middleware class with the stored arguments.
25 26 27 |
# File 'lib/shoryuken/middleware/entry.rb', line 25 def make_new @klass.new(*@args) end |