When in a summons-case the accused appears or is brought before the Magistrate, the particulars of the offence of which he is accused shall be stated to him, and he shall be asked whether he pleads guilty or has any defence to make, but it shall not be necessary to frame a formal charge:
Provided that if the Magistrate considers the accusation as groundless, he shall, after recording reasons in writing, release the accused and such release shall have the effect of discharge.