Utility function to set an objects class.
as_class(x, cls)
x
object to set the class of.
cls
the class to be set.