Class: ConvenientService::Service::Plugins::SetsParentToForeignResult::Middleware
- Inherits:
-
MethodChainMiddleware
- Object
- ConvenientService::Service::Plugins::SetsParentToForeignResult::Middleware
- Defined in:
- lib/convenient_service/service/plugins/sets_parent_to_foreign_result/middleware.rb
Instance Method Summary collapse
Instance Method Details
#next ⇒ ConvenientService::Service::Plugins::HasJSendResult::Entities::Result
45 46 47 48 49 50 51 |
# File 'lib/convenient_service/service/plugins/sets_parent_to_foreign_result/middleware.rb', line 45 def next(...) result = chain.next(...) return result unless result.foreign_result_for?(entity) result.copy(overrides: {kwargs: {service: entity, step: nil, parent: result}}) end |