Class: Dry::Types::Constructor::Function::Wrapper Private
- Inherits:
-
Dry::Types::Constructor::Function
- Object
- Dry::Types::Constructor::Function
- Dry::Types::Constructor::Function::Wrapper
- Defined in:
- lib/dry/types/constructor/function.rb
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.
Instance Attribute Summary
Attributes inherited from Dry::Types::Constructor::Function
Instance Method Summary collapse
- #arity ⇒ Object private
- #call(input, type, &block) ⇒ Object (also: #[]) private
Methods inherited from Dry::Types::Constructor::Function
#<<, #>>, [], #initialize, #to_ast, #wrapper?, yields_block?
Constructor Details
This class inherits a constructor from Dry::Types::Constructor::Function
Instance Method Details
#arity ⇒ 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.
132 133 134 |
# File 'lib/dry/types/constructor/function.rb', line 132 def arity 2 end |
#call(input, type, &block) ⇒ Object Also known as: []
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.
125 126 127 128 129 |
# File 'lib/dry/types/constructor/function.rb', line 125 def call(input, type, &block) @fn.(input, type, &block) rescue ::NoMethodError, ::TypeError, ::ArgumentError => e CoercionError.handle(e, &block) end |