Sha256: 0f9adc321798006ee8246da7570ceff184cbf3d24ad9972073c04225862a810f
Contents?: true
Size: 440 Bytes
Versions: 13
Compression:
Stored size: 440 Bytes
Contents
module Dry module Monads # @private module Curry # @private def self.call(value) func = value.is_a?(Proc) ? value : value.method(:call) seq_args = func.parameters.count { |type, _| type == :req || type == :opt } seq_args += 1 if func.parameters.any? { |type, _| type == :keyreq } if seq_args > 1 func.curry else func end end end end end
Version data entries
13 entries across 13 versions & 1 rubygems