Sha256: 5a9910b8d3546878b351b64ba367ef612e46f87c69dc6afe76d549f9051f47a5

Contents?: true

Size: 542 Bytes

Versions: 10

Compression:

Stored size: 542 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
          def instance_exec(*args, &block)
            super(*args.take(block.parameters.length), &block)
          end
        end
      end
    end
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
workato-connector-sdk-1.3.10 lib/workato/connector/sdk/block_invocation_refinements.rb
workato-connector-sdk-1.3.9 lib/workato/connector/sdk/block_invocation_refinements.rb
workato-connector-sdk-1.3.8 lib/workato/connector/sdk/block_invocation_refinements.rb
workato-connector-sdk-1.3.7 lib/workato/connector/sdk/block_invocation_refinements.rb
workato-connector-sdk-1.3.6 lib/workato/connector/sdk/block_invocation_refinements.rb
workato-connector-sdk-1.3.5 lib/workato/connector/sdk/block_invocation_refinements.rb
workato-connector-sdk-1.3.4 lib/workato/connector/sdk/block_invocation_refinements.rb
workato-connector-sdk-1.3.3 lib/workato/connector/sdk/block_invocation_refinements.rb
workato-connector-sdk-1.3.2 lib/workato/connector/sdk/block_invocation_refinements.rb
workato-connector-sdk-1.3.1 lib/workato/connector/sdk/block_invocation_refinements.rb