The action of ejectment will lie for the recovery of the possession of a mining claim, as well also of any real estate, where the party suing has been wrongfully ousted from the possession thereof, and the possession wrongfully detained.