A writ of mandamus is issued from a court of superior jurisdiction that commands an inferior tribunal, municipal corporation or individual to perform or refrain from performing a particular act, the performance or omission of which is required by law as an obligation.