Sha256: d78670168c9a8b8766761beaad02b5425aed7ea39dd5456ea42290b2621fe1e7

Contents?: true

Size: 763 Bytes

Versions: 8

Compression:

Stored size: 763 Bytes

Contents

# frozen_string_literal: true

module ConvenientService
  module Service
    module Plugins
      module CanHaveMethodSteps
        class Middleware < MethodChainMiddleware
          intended_for :step, scope: :class, entity: :service

          ##
          # @param args [Array<Object>]
          # @param kwargs [Hash{Symbol => Object}]
          # @param block [Proc, nil]
          # @return [ConvenientService::Service::Plugins::HasJSendResult::Entities::Result]
          #
          def next(*args, **kwargs, &block)
            return chain.next(*args, **kwargs, &block) unless args.first.instance_of?(::Symbol)

            chain.next(entity, *args[1..], **kwargs.merge(method: args.first), &block)
          end
        end
      end
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
convenient_service-0.19.1 lib/convenient_service/service/plugins/can_have_method_steps/middleware.rb
convenient_service-0.19.0 lib/convenient_service/service/plugins/can_have_method_steps/middleware.rb
convenient_service-0.18.0 lib/convenient_service/service/plugins/can_have_method_steps/middleware.rb
convenient_service-0.17.0 lib/convenient_service/service/plugins/can_have_method_steps/middleware.rb
convenient_service-0.16.0 lib/convenient_service/service/plugins/can_have_method_steps/middleware.rb
convenient_service-0.15.0 lib/convenient_service/service/plugins/can_have_method_steps/middleware.rb
convenient_service-0.14.0 lib/convenient_service/service/plugins/can_have_method_steps/middleware.rb
convenient_service-0.13.0 lib/convenient_service/service/plugins/can_have_method_steps/middleware.rb