Class: Toys::Middleware::Stack
- Inherits:
-
Object
- Object
- Toys::Middleware::Stack
- Defined in:
- core-docs/toys/middleware.rb
Overview
Defined in the toys-core gem
A stack of middleware specs.
Instance Attribute Summary collapse
-
#default_specs ⇒ Array<Toys::Middleware:Spec>
readonly
The default set of middleware specs.
-
#post_specs ⇒ Array<Toys::Middleware:Spec>
readonly
The middleware specs that follow the default set.
-
#pre_specs ⇒ Array<Toys::Middleware:Spec>
readonly
The middleware specs that precede the default set.
Instance Method Summary collapse
-
#==(other) ⇒ Boolean
(also: #eql?)
Equality check.
-
#add(middleware, *args, **kwargs, &block) ⇒ Object
Add a middleware spec to the stack, in the default location, which is at the end of pre_specs).
-
#build(middleware_lookup) ⇒ Array<Toys::Middleware>
Build the middleware in this stack.
-
#dup ⇒ Toys::Middleware::Stack
Duplicate this stack.
-
#hash ⇒ Integer
Return the hash code.
Instance Attribute Details
#default_specs ⇒ Array<Toys::Middleware:Spec> (readonly)
The default set of middleware specs.
235 236 237 |
# File 'core-docs/toys/middleware.rb', line 235 def default_specs @default_specs end |
#post_specs ⇒ Array<Toys::Middleware:Spec> (readonly)
The middleware specs that follow the default set.
241 242 243 |
# File 'core-docs/toys/middleware.rb', line 241 def post_specs @post_specs end |
#pre_specs ⇒ Array<Toys::Middleware:Spec> (readonly)
The middleware specs that precede the default set.
229 230 231 |
# File 'core-docs/toys/middleware.rb', line 229 def pre_specs @pre_specs end |
Instance Method Details
#==(other) ⇒ Boolean Also known as: eql?
Equality check
280 281 282 |
# File 'core-docs/toys/middleware.rb', line 280 def ==(other) # Source available in the toys-core gem end |
#add(name, *args, **kwargs, &block) ⇒ Object #add(array) ⇒ Object #add(middleware_object) ⇒ Object
Add a middleware spec to the stack, in the default location, which is at the end of pre_specs). See Toys::Middleware.spec for a description of the arguments you can pass.
252 253 254 |
# File 'core-docs/toys/middleware.rb', line 252 def add(middleware, *args, **kwargs, &block) # Source available in the toys-core gem end |
#build(middleware_lookup) ⇒ Array<Toys::Middleware>
Build the middleware in this stack.
270 271 272 |
# File 'core-docs/toys/middleware.rb', line 270 def build(middleware_lookup) # Source available in the toys-core gem end |
#dup ⇒ Toys::Middleware::Stack
Duplicate this stack.
261 262 263 |
# File 'core-docs/toys/middleware.rb', line 261 def dup # Source available in the toys-core gem end |
#hash ⇒ Integer
Return the hash code
290 291 292 |
# File 'core-docs/toys/middleware.rb', line 290 def hash # Source available in the toys-core gem end |