Method: Dry::Types::Composition#success

Defined in:
lib/dry/types/composition.rb

#success(input) ⇒ 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.



96
97
98
99
100
101
102
103
# File 'lib/dry/types/composition.rb', line 96

def success(input)
  result = try(input)
  if result.success?
    result
  else
    raise ::ArgumentError, "Invalid success value '#{input}' for #{inspect}"
  end
end