Class: ConvenientService::Support::Middleware::StackBuilder::Entities::Builders::Naive Private
- Inherits:
-
Custom
- Object
- Custom
- ConvenientService::Support::Middleware::StackBuilder::Entities::Builders::Naive
- Defined in:
- lib/convenient_service/support/middleware/stack_builder/entities/builders/naive.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.
Instance Attribute Summary
Attributes inherited from Custom
Instance Method Summary collapse
-
#call(env) ⇒ Object
private
Can be any type.
-
#call_with_original(env, original) ⇒ Object
private
Can be any type.
Methods inherited from Custom
#==, #clear, #delete, #dup, #empty?, #has?, #initialize, #insert, #insert_after, #insert_after_each, #insert_before_each, #replace, #to_a, #unshift, #use
Methods included from AbstractMethod
Methods included from Concern
Constructor Details
This class inherits a constructor from ConvenientService::Support::Middleware::StackBuilder::Entities::Builders::Custom
Instance Method Details
#call(env) ⇒ 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.
Returns Can be any type.
40 41 42 43 44 45 46 47 48 |
# File 'lib/convenient_service/support/middleware/stack_builder/entities/builders/naive.rb', line 40 def call(env) return env if stack.empty? app = Custom::Constants::INITIAL_MIDDLEWARE stack.reverse_each { |middleware| app = middleware.new(app) } app.call(env) end |
#call_with_original(env, original) ⇒ 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.
Returns Can be any type.
23 24 25 |
# File 'lib/convenient_service/support/middleware/stack_builder/entities/builders/naive.rb', line 23 def call_with_original(env, original) dup.use(Custom::Entities::ProcWithNew.new(original)).call(env) end |