class Grape::Validations::Types::MultipleTypeCoercer

This class is intended for use with Grape endpoint parameters that have been declared to be of variant-type using the :types option. MultipleTypeCoercer will build a coercer for each type declared in the array passed to :types using {Types.build_coercer}. It will apply these coercers to parameter values in the order given to :types, and will return the value returned by the first coercer to successfully coerce the parameter value. Therefore if String is an allowed type it should be declared last, since it will always successfully “coerce” the value.