method

coerce_to

coerce_to(obj, cls, meth)
public

Helper method to coerce a value into a specific class. Raises a TypeError if the coercion fails or the returned value is not of the right class. (from Rubinius)