class Dry::Types::Constructor::Function::Wrapper

Public Instance Methods

[](input, type, &block)
Alias for: call
arity() click to toggle source
# File lib/dry/types/constructor/function.rb, line 133
def arity
  2
end
call(input, type, &block) click to toggle source

@return [Object]

# File lib/dry/types/constructor/function.rb, line 126
def call(input, type, &block)
  @fn.(input, type, &block)
rescue ::NoMethodError, ::TypeError, ::ArgumentError => e
  CoercionError.handle(e, &block)
end
Also aliased as: []