Sha256: 9a1b14e7a88eee52f3d9491483e6c462f48886ef3a5871e6d3a49a8b5e8ffa67

Contents?: true

Size: 557 Bytes

Versions: 3

Compression:

Stored size: 557 Bytes

Contents

# typed: false
# frozen_string_literal: true

module Workato
  module Connector
    module Sdk
      # Match proc's arguments, even if it's a lambda.
      # @api private
      module BlockInvocationRefinements
        refine Proc do
          def call(*args, &block)
            super(*args.take(parameters.length), &block)
          end
        end

        refine BasicObject do
          ruby2_keywords def instance_exec(*args, &block)
            super(*args.take(block.parameters.length), &block)
          end
        end
      end
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
workato-connector-sdk-1.3.13 lib/workato/connector/sdk/block_invocation_refinements.rb
workato-connector-sdk-1.3.12 lib/workato/connector/sdk/block_invocation_refinements.rb
workato-connector-sdk-1.3.11 lib/workato/connector/sdk/block_invocation_refinements.rb