Class: ConvenientService::Common::Plugins::CanHaveCallbacks::Middleware Private

Inherits:
MethodChainMiddleware
  • Object
show all
Defined in:
lib/convenient_service/common/plugins/can_have_callbacks/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.

Since:

  • 1.0.0

Instance Method Summary collapse

Instance Method Details

#any_methodObject

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.

Since:

  • 1.0.0



17
# File 'lib/convenient_service/common/plugins/can_have_callbacks/middleware.rb', line 17

intended_for any_method, entity: any_entity

#next(*args, **kwargs, &block) ⇒ 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.

Parameters:

  • args (Array<Object>)
  • kwargs (Hash{Symbol => Object})
  • block (Proc, nil)

Returns:

  • (Object)

    Can be any type.

Since:

  • 1.0.0



28
29
30
31
32
33
34
35
36
# File 'lib/convenient_service/common/plugins/can_have_callbacks/middleware.rb', line 28

def next(*args, **kwargs, &block)
  run_before_callbacks(*args, **kwargs, &block)

  original_value = run_around_callbacks(*args, **kwargs, &block)

  run_after_callbacks(original_value, *args, **kwargs, &block)

  original_value
end