Method: Dry::Types::Intersection#try
- Defined in:
- lib/dry/types/intersection.rb
#try(input) ⇒ Object
36 37 38 39 40 41 42 43 44 |
# File 'lib/dry/types/intersection.rb', line 36 def try(input) try_sides(input) do |failure| if block_given? yield(failure) else failure end end end |