Sha256: 67c5760016045d115faac79318f19deedd10914284d89240d96cf4b593cdd325

Contents?: true

Size: 521 Bytes

Versions: 1

Compression:

Stored size: 521 Bytes

Contents

# typed: false
# frozen_string_literal: true

module Workato
  module Connector
    module Sdk
      # match proc's arguments, even if it's a lambda.
      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

1 entries across 1 versions & 1 rubygems

Version Path
workato-connector-sdk-1.3.0 lib/workato/connector/sdk/block_invocation_refinements.rb