Class: Dry::Types::Constructor::Function::MethodCall::PrivateSafeCall Private
- Inherits:
-
PrivateCall
- Object
- Dry::Types::Constructor::Function
- Dry::Types::Constructor::Function::MethodCall
- PrivateCall
- Dry::Types::Constructor::Function::MethodCall::PrivateSafeCall
- Defined in:
- lib/dry/types/constructor/function.rb
Overview
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
Coercion via an unsafe private method call
Instance Method Summary collapse
- #call(input, &block) ⇒ Object private
Constructor Details
This class inherits a constructor from Dry::Types::Constructor::Function::MethodCall
Instance Method Details
#call(input, &block) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
95 96 97 98 99 |
# File 'lib/dry/types/constructor/function.rb', line 95 def call(input, &block) @target.send(@name, input) rescue ::NoMethodError, ::TypeError, ::ArgumentError => e CoercionError.handle(e, &block) end |